-
Couldn't load subscription status.
- Fork 168
add declarative config support for AWS X-Ray #2296
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
base: main
Are you sure you want to change the base?
add declarative config support for AWS X-Ray #2296
Conversation
f958075 to
0f09056
Compare
| +++ NEW CLASS: PUBLIC(+) io.opentelemetry.contrib.awsxray.AwsXrayRemoteSamplerComponentProvider (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW CONSTRUCTOR: PUBLIC(+) AwsXrayRemoteSamplerComponentProvider() | ||
| +++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.trace.samplers.Sampler create(io.opentelemetry.api.incubator.config.DeclarativeConfigProperties) | ||
| +++ NEW METHOD: PUBLIC(+) java.lang.String getName() | ||
| +++ NEW METHOD: PUBLIC(+) java.lang.Class<io.opentelemetry.sdk.trace.samplers.Sampler> getType() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these be part of the public api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to internal
|
|
||
| @Override | ||
| public Sampler create(DeclarativeConfigProperties config) { | ||
| Resource resource = io.opentelemetry.contrib.awsxray.ResourceHolder.getResource(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this work? The resource in resource holder is set from an AutoConfigurationCustomizerProvider, would that be called for declarative config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not - the test was just not catching it
Fixes open-telemetry/opentelemetry-java-instrumentation#14323
Blocked: Declarative config does not offer a workaround to access the resource, which is used by this module:
opentelemetry-java-contrib/aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/SamplingRuleApplier.java
Line 245 in 712ad7c
Tracking issue: open-telemetry/opentelemetry-java-instrumentation#14325