Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exceptions throws from instrumented code #5159

Merged
merged 1 commit into from
May 10, 2023

Conversation

jpbempel
Copy link
Member

@jpbempel jpbempel commented May 5, 2023

What Does This Do

Motivation

Avoid modifying behavior of user code when instrumenting code

Additional Notes

@jpbempel jpbempel requested a review from a team as a code owner May 5, 2023 12:05
@jpbempel jpbempel requested review from ojung and removed request for a team May 5, 2023 12:05
@pr-commenter
Copy link

pr-commenter bot commented May 5, 2023

Benchmarks

Parameters

Baseline Candidate
commit 1.14.0-SNAPSHOT~41ae2f7dec 1.14.0-SNAPSHOT~08ecec9b10
config baseline candidate
See matching parameters
Baseline Candidate
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

See unchanged results
scenario Δ mean execution_time
scenario:Startup-base-Agent same
scenario:Startup-base-Agent.start same
scenario:Startup-base-BytebuddyAgent same
scenario:Startup-base-GlobalTracer same
scenario:Startup-base-AppSec same
scenario:Startup-base-Remote Config same
scenario:Startup-base-Telemetry same
scenario:Startup-iast-Agent same
scenario:Startup-iast-Agent.start same
scenario:Startup-iast-BytebuddyAgent same
scenario:Startup-iast-GlobalTracer same
scenario:Startup-iast-AppSec same
scenario:Startup-iast-IAST same
scenario:Startup-iast-Remote Config same
scenario:Startup-iast-Telemetry same
scenario:Startup-waf-Agent same
scenario:Startup-waf-Agent.start same
scenario:Startup-waf-BytebuddyAgent same
scenario:Startup-waf-GlobalTracer same
scenario:Startup-waf-AppSec same
scenario:Startup-waf-Remote Config same
scenario:Startup-waf-Telemetry same

@jpbempel jpbempel added the comp: debugger Dynamic Instrumentation label May 5, 2023
Copy link
Contributor

@ojung ojung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

}
forwarder.count(name, delta, tags);
} catch (Exception ex) {
LOGGER.debug("Error in count method: ", ex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a rate limited logger here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm not easy as we are in bootstrap module, let me see if I can pull something

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking about this because a user could put a probe in a very hot code path, which is totally valid with metrics. If we log on every invocation it might be very spammy.

Copy link
Member Author

@jpbempel jpbempel May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but we are in debug here, and rate limited logger already makes the difference on DEBUG or not for rate limiting.

Copy link
Contributor

@ojung ojung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Contributor

@ojung ojung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@jpbempel jpbempel merged commit d26e320 into master May 10, 2023
@jpbempel jpbempel deleted the jpbempel/catch-exceptions branch May 10, 2023 07:36
@github-actions github-actions bot added this to the 1.14.0 milestone May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: debugger Dynamic Instrumentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants