Skip to content

Azure Monitor OpenTelemetry Exporter using deprecated semantic conventions #34246

Open

Description

  • 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

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Monitor - ExporterMonitor OpenTelemetry ExporterService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions