-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
HTTP Request Server Span semantic convention seems broken? #29423
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @sncariad, thanks for filing and including the references! I believe there's currently some level of ambiguity before this can be declared a bug or not. It seems like we're dealing with an issue of deciding the correct way to convert data from pdata to the format AppInsights uses. As you're showing, the opentelemetry-collector-contrib/exporter/azuremonitorexporter/trace_to_envelope.go Line 368 in 103eb7b
Note the comment on the
So I believe the first question that needs answered here is whether the RemoteDependencyData struct's I realize that maybe a check should be added just in case in the method you've referenced, but no matter what value it's set to (or not set to) it will be overwritten in the current call stack you're hitting. |
@sncariad This behavior is intentional. The Azure Monitor Exporter sets the status field to |
Thanks for the help here @rajkumar-rangaraj! It looks like setting the Please let us know if you have any other questions @sncariad, I'm going to close for now. |
Can you confirm the same for the scenario where we export via otlp to a collector and then into azure monitor via the golang azure monitor exporter? Previously it was possible to override the success/failure within Azure App Insights SDK to allow 404s to be seen as successes. I've written a processor within a dotnet otel extension to try and recreate this functionality but are you saying that app insights will swap any client error to failure in otel regardless? @rajkumar-rangaraj |
Thanks for response and sharing the reference to .net version of exporter which does same as go version. But to my understanding; in either case they don't follow Semantic Conventions where they ignore to check if it is Request trace and not Dependency before considering Status to be Success or Failure for http status codes above 400. Once again thank you for your support. |
From @sncariad:
The Semantic Conventions referenced apply only to the OpenTelemetry data format. In the code here, data is being converted to the format used by AppInsights. What we're saying here is that the Semantic Conventions are not relevant once converted to this other format, since it's no longer within the OpenTelemetry realm. If data was being exported using OTLP, then your point would be correct, the status code would need to be set to the values you're expecting. However, since it's being exported in this ApplicationInsights format, it follows different conventions. Please let me know if I've misunderstood your comment here. |
Can you confirm the same for the scenario where we export via otlp to a collector and then into azure monitor via the golang azure monitor exporter? Like to really dumb it down, Applicaiton -> Otlp -> Otel Collector -> Azure Monitor Exporter would follow the OTLP format and not the in-code exporter format? |
Exporting in OTLP to the Otel Collector should follow the OTEL semantic conventions. The collector exporting data using the Azure Monitor exporter does not need to follow conventions. Does that make sense? Did I answer the question here? |
Component(s)
exporter/azuremonitor
Describe the issue you're reporting
Semantic Conventions for HTTP Spans #Status states the following:
However Azure Monitor Exporter does not consider SpanKind when setting Success=false/true.
opentelemetry-collector-contrib/exporter/azuremonitorexporter/trace_to_envelope.go
Lines 698 to 702 in 103eb7b
So in Log Analytics workspace, trace table all activities of Kind=Server with 404 gets Success=false. I believe it is incorrect and the code should consider SpanKind when deciding success or failure.
Expected Result
As per Semantic Convention for HTTP Span, when trace is of Server Kind, the 400 status codes are considered successful.
Actual Result
The text was updated successfully, but these errors were encountered: