Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.
Nginx 1.21.6
opentelemetry module autoinstrumented from this image: registry.k8s.io/ingress-nginx/opentelemetry@sha256:40f766ac4a9832f36f217bb0e98d44c8d38faeccbfe861fbc1a76af7e9ab257f (but the current master branch has the same issue)
When Nginx Open Telemetry instrumentation is enabled using the otel_ngx_module.so module, the spans created from Nginx don't have a status, even if the HTTP status code is 500.
Make a call to the /errorTest location, then look for OpenTelemetry data to see that the span status is not set to Error.
What is the expected behavior?
When the http status is in the 5xx range, the span status to be set to Error.
What is the actual behavior?
Span status is not set in any scenario (regardles of the http status code)
Additional context
We are trying to export the OpenTelemetry data to Instana and due to missing Span status, the erroneous calls are not properly identified.
Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch. Nginx 1.21.6 opentelemetry module autoinstrumented from this image: registry.k8s.io/ingress-nginx/opentelemetry@sha256:40f766ac4a9832f36f217bb0e98d44c8d38faeccbfe861fbc1a76af7e9ab257f (but the current master branch has the same issue)
When Nginx Open Telemetry instrumentation is enabled using the otel_ngx_module.so module, the spans created from Nginx don't have a status, even if the HTTP status code is 500.
Here is an example location set to return 500:
I would expect, per the documentation from here and here to have the span status set as error (status.code = 2) instead of Unset (0).
Steps to reproduce Start Nginx with OpenTelemetry module enabled, create a location in the default server with the following specs:
Make a call to the /errorTest location, then look for OpenTelemetry data to see that the span status is not set to Error.
What is the expected behavior? When the http status is in the 5xx range, the span status to be set to Error.
What is the actual behavior? Span status is not set in any scenario (regardles of the http status code)
Additional context We are trying to export the OpenTelemetry data to Instana and due to missing Span status, the erroneous calls are not properly identified.