Skip to content

Commit

Permalink
Allow setting environment variable for enabling experimental aws attr…
Browse files Browse the repository at this point in the history
…ibutes. (open-telemetry#69)
  • Loading branch information
Anuraag Agrawal authored Apr 23, 2021
1 parent 49def41 commit 50e70b6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ public class AutoconfiguredTracingExecutionInterceptor implements ExecutionInter

public AutoconfiguredTracingExecutionInterceptor() {
delegate =
AwsSdkTracing.newBuilder(GlobalOpenTelemetry.get()).build().newExecutionInterceptor();
AwsSdkTracing.newBuilder(GlobalOpenTelemetry.get())
// TODO(anuraaga): Replace this by adding ability to configure default property values
// via sdk-extension-autoconfigure.
.setCaptureExperimentalSpanAttributes(
"true"
.equals(
System.getenv("OTEL_INSTRUMENTATION_AWS_SDK_EXPERIMENTAL_SPAN_ATTRIBUTES")))
.build()
.newExecutionInterceptor();
}

@Override
Expand Down

0 comments on commit 50e70b6

Please sign in to comment.