We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When an error occured and after I set span status to ERROR, the span doesn't show up as error in Google Cloud Trace.
ERROR
Consider the following example:
#!/usr/bin/env python3 from opentelemetry import trace from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter from opentelemetry.sdk.resources import SERVICE_NAME, Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.trace import Status, StatusCode def setup(): exporter = CloudTraceSpanExporter() # exporter = OTLPSpanExporter(endpoint="127.0.0.1:4317", insecure=True) print(f"Using tracing exporter {exporter}") processor = BatchSpanProcessor(exporter) resource = Resource(attributes={SERVICE_NAME: "test"}) tracer_provider = TracerProvider(resource=resource) tracer_provider.add_span_processor(processor) trace.set_tracer_provider(tracer_provider) def main(): setup() tracer = trace.get_tracer(__name__) with tracer.start_as_current_span("first") as span: try: raise Exception("oh no") except Exception as exc: span.record_exception(exc) span.set_status(Status(StatusCode.ERROR)) # span.set_attribute("http.status_code", 500) if __name__ == "__main__": main()
It shows up like this in Google Cloud Trace:
If I switch the exporter from CloudTraceSpanExporter to the OTLPSpanExporter (towards Jaeger), it shows up correctly in Jaeger:
CloudTraceSpanExporter
OTLPSpanExporter
Setting the span attribute http.status_code to 500 shows up correctly though, but this doesn't use the "official" status mechanism from OpenTelemetry:
http.status_code
500
The text was updated successfully, but these errors were encountered:
@multani this was also reported in GoogleCloudPlatform/opentelemetry-operations-go#730
Unfortunately we can't do anything in the exporter to fix it. Please follow along on that bug.
Sorry, something went wrong.
No branches or pull requests
When an error occured and after I set span status to
ERROR
, the span doesn't show up as error in Google Cloud Trace.Consider the following example:
It shows up like this in Google Cloud Trace:
If I switch the exporter from
CloudTraceSpanExporter
to theOTLPSpanExporter
(towards Jaeger), it shows up correctly in Jaeger:Setting the span attribute
http.status_code
to500
shows up correctly though, but this doesn't use the "official" status mechanism from OpenTelemetry:The text was updated successfully, but these errors were encountered: