Open
Description
openedon Feb 8, 2024
- Package Name: azure-monitor-opentelemetry-exporter
- Package Version: latest
- Operating System: n/a/
- Python Version: n/a
Describe the bug
The azure monitor opentelemetry exporter uses deprecated semantic conventions.
Example:
Uses the SpanAttributes.HTTP_METHOD
which is deprecated as per https://github.com/open-telemetry/opentelemetry-python/blob/d03a62245357eb40cac81d5e671fc2df83aef767/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py#L49
When using a span with SpanKind.Client
you have to rely on the deprecated semantic conventions for Azure Monitor to pick it up.
with tracer.start_as_current_span("OpenAI completion api request", kind=SpanKind.CLIENT) as span:
span.set_attribute("http.method", "GET")
span.set_attribute("http.url", "https://my-deployed-service.openai.azure.com/")
# or span.set_attribute("db.system", "my-deployed-service.openai.azure.com")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment