[exporter/azuremonitor] add configurable HTTP success mapping#49399
Open
tombiddulph wants to merge 5 commits into
Open
[exporter/azuremonitor] add configurable HTTP success mapping#49399tombiddulph wants to merge 5 commits into
tombiddulph wants to merge 5 commits into
Conversation
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Azure Monitor exporter currently marks any HTTP span with a status code
outside 100–399 as
Success = falseon the resulting Application InsightsRequestData / RemoteDependencyDataThis causes expected 4xx responses (most notably 404 for cache misses,
existence checks, optional resources, etc.) to show up as failed
requests/dependencies in Application Insights dashboards and alerts. It also
diverges from the OpenTelemetry HTTP semantic conventions, which state that
4xx on server spans should not set the span status to Error.
Spec for reference.
This pr adds two opt-in settings to the Azure Monitor exporter:
non_error_http_status_codes(list of HTTP status codes treated as Success on both server and client HTTP spans) andalign_http_server_request_success_with_otel_spec(when true, 4xx responses on HTTP server spans are treated as Success, matching the OpenTelemetry HTTP semantic conventions). Defaults preserve the existing exporter behaviour.Link to tracking issue
Fixes #47691
Testing
-Added a unit test for the existing behaviour and the opt in features
Documentation
Authorship