-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add environment variable to suppress HTTP span creation #17969
Comments
@lmolkova I'm reviewing our remaining issues and was wondering if this is still needed? |
I believe it it's relevant (as I believe we see duplicates if we enable auto-collection for our http client in otel), except I'd love to explore this suppression path instead: it's defined in otel-core package and we can do it after we start http span, along with making it current. |
) ### Packages impacted by this PR @azure/opentelemetry-instrumentation-azure-sdk ### Issues associated with this PR Resolves #17969 ### Describe the problem that is addressed by this PR In order to mitigate duplication of AZ SDK HTTP spans with auto-instrumentation HTTP spans, the tracing feature crew would like to add the AZURE_HTTP_TRACING_DISABLED environment variable to disable any dowstream HTTP spans from being created. In addition, I realized that when migrating off-of `createSpan` we did not migrate the logic to suppress _all_ tracing using AZURE_TRACING_DISABLED environment variable. This PR fixes both of these issues. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? The alternatives really were: - Add this logic in core-tracing for global suppression - Add this logic in tracingPolicy for HTTP span suppression Since we use a no-op instrumenter by default there's no reason to add additional logic to core-tracing. Further, using it in the OTel package allows us to take advantage of OTel provided APIs which will be honored downstream as well. Quick summary of requirements here: - When AZURE_TRACING_DISABLED is set, we want to suppress our Azure SDK spans from being recorded - When AZURE_HTTP_TRACING_DISABLED is set, we want to suppress any children of our SDK's HTTP spans from being recorded, this avoids the HTTP span duplication problem while OTel works out a solution on their end - Finally, if _both_ are set, we suppress our Azure SDK spans from being recorded, but _not_ suppress any children of our HTTP spans (since there's no duplication)
…re#20776) ### Packages impacted by this PR @azure/opentelemetry-instrumentation-azure-sdk ### Issues associated with this PR Resolves Azure#17969 ### Describe the problem that is addressed by this PR In order to mitigate duplication of AZ SDK HTTP spans with auto-instrumentation HTTP spans, the tracing feature crew would like to add the AZURE_HTTP_TRACING_DISABLED environment variable to disable any dowstream HTTP spans from being created. In addition, I realized that when migrating off-of `createSpan` we did not migrate the logic to suppress _all_ tracing using AZURE_TRACING_DISABLED environment variable. This PR fixes both of these issues. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? The alternatives really were: - Add this logic in core-tracing for global suppression - Add this logic in tracingPolicy for HTTP span suppression Since we use a no-op instrumenter by default there's no reason to add additional logic to core-tracing. Further, using it in the OTel package allows us to take advantage of OTel provided APIs which will be honored downstream as well. Quick summary of requirements here: - When AZURE_TRACING_DISABLED is set, we want to suppress our Azure SDK spans from being recorded - When AZURE_HTTP_TRACING_DISABLED is set, we want to suppress any children of our SDK's HTTP spans from being recorded, this avoids the HTTP span duplication problem while OTel works out a solution on their end - Finally, if _both_ are set, we suppress our Azure SDK spans from being recorded, but _not_ suppress any children of our HTTP spans (since there's no duplication)
…re#20776) ### Packages impacted by this PR @azure/opentelemetry-instrumentation-azure-sdk ### Issues associated with this PR Resolves Azure#17969 ### Describe the problem that is addressed by this PR In order to mitigate duplication of AZ SDK HTTP spans with auto-instrumentation HTTP spans, the tracing feature crew would like to add the AZURE_HTTP_TRACING_DISABLED environment variable to disable any dowstream HTTP spans from being created. In addition, I realized that when migrating off-of `createSpan` we did not migrate the logic to suppress _all_ tracing using AZURE_TRACING_DISABLED environment variable. This PR fixes both of these issues. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? The alternatives really were: - Add this logic in core-tracing for global suppression - Add this logic in tracingPolicy for HTTP span suppression Since we use a no-op instrumenter by default there's no reason to add additional logic to core-tracing. Further, using it in the OTel package allows us to take advantage of OTel provided APIs which will be honored downstream as well. Quick summary of requirements here: - When AZURE_TRACING_DISABLED is set, we want to suppress our Azure SDK spans from being recorded - When AZURE_HTTP_TRACING_DISABLED is set, we want to suppress any children of our SDK's HTTP spans from being recorded, this avoids the HTTP span duplication problem while OTel works out a solution on their end - Finally, if _both_ are set, we suppress our Azure SDK spans from being recorded, but _not_ suppress any children of our HTTP spans (since there's no duplication)
In order to mitigate duplication of AZ SDK HTTP spans with auto-instrumentation HTTP spans the tracing crew is adding AZURE_HTTP_TRACING_DISABLED env var support to disable downstream spans from being recorded after our tracing policy
This issue tracks that effort for JS
The text was updated successfully, but these errors were encountered: