Skip to content

Fix potential issue with apache-httpclient call-depth tracking#5110

Merged
mcculls merged 1 commit into
masterfrom
mcculls/fix-httpclient-call-depth-tracking
Apr 25, 2023
Merged

Fix potential issue with apache-httpclient call-depth tracking#5110
mcculls merged 1 commit into
masterfrom
mcculls/fix-httpclient-call-depth-tracking

Conversation

@mcculls

@mcculls mcculls commented Apr 24, 2023

Copy link
Copy Markdown
Contributor

What Does This Do

We only reset the call-depth when we're finishing an HTTP span, so we must only increment it when we know we'll create and activate an HTTP span.

Motivation

Previously it was possible the call-depth would be incremented, but an HTTP span might then not be created if the request came from the AWS SDK.

Additional Notes

Workaround when using versions of the tracer without this fix - either add this JVM option:

-Ddd.aws-sdk.legacy.tracing.enabled=true

or set this environment variable:

DD_AWS_SDK_LEGACY_TRACING_ENABLED=true

We only reset the call-depth when we're finishing an HTTP span, so we must only increment it when we know we'll create and activate an HTTP span.

Previously it was possible the call-depth would be incremented, but an HTTP span might then not be created if the request came from the AWS SDK.
@mcculls mcculls added inst: others All other instrumentations inst: aws sdk AWS SDK instrumentation labels Apr 24, 2023
@mcculls
mcculls requested a review from a team as a code owner April 24, 2023 22:11
@pr-commenter

pr-commenter Bot commented Apr 24, 2023

Copy link
Copy Markdown

Benchmarks

Parameters

Baseline Candidate
commit 1.13.0-SNAPSHOT~a40147a890 1.13.0-SNAPSHOT~3352ae8aa6
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 unsure
[+0.000s; +0.247s] or [+0.000%; +2.698%]
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 unsure
[-44.546µs; -0.125µs] or [-7.232%; -0.020%]
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

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only a minor struction question. Otherwise LGTM 👍

@mcculls
mcculls merged commit 5dc72ce into master Apr 25, 2023
@mcculls
mcculls deleted the mcculls/fix-httpclient-call-depth-tracking branch April 25, 2023 15:53
@github-actions github-actions Bot added this to the 1.13.0 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: aws sdk AWS SDK instrumentation inst: others All other instrumentations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants