Skip to content
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

Azure Monitor OpenTelemetry Exporter using deprecated semantic conventions #34246

Open
dasiths opened this issue Feb 8, 2024 · 7 comments
Open
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Monitor - Exporter Monitor OpenTelemetry Exporter Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@dasiths
Copy link
Member

dasiths commented 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") 
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-triage Workflow: This issue needs the team to triage. labels Feb 8, 2024
@mccoyp
Copy link
Member

mccoyp commented Feb 8, 2024

Hi @dasiths, thank you for opening an issue! I'll get this routed to the appropriate folks; we'll take a look as soon as possible.

@mccoyp mccoyp added bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention Workflow: This issue is responsible by Azure service team. and removed needs-team-triage Workflow: This issue needs the team to triage. labels Feb 8, 2024
Copy link

github-actions bot commented Feb 8, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jeremydvoss @lzchen.

@lzchen
Copy link
Member

lzchen commented Feb 8, 2024

This is an issue for upstream OpenTelemetry. We are in the process of adding new semantic conventions to various http instrumentations. See the tracking issue here. Once these are done, the exporters will be changed to allow for those new signals.

@dasiths
Copy link
Member Author

dasiths commented Feb 9, 2024

This is an issue for upstream OpenTelemetry. We are in the process of adding new semantic conventions to various http instrumentations. See the tracking issue here. Once these are done, the exporters will be changed to allow for those new signals.

Thanks for the update. Is there a recommended workaround or migration guidance until this is completed? i.e. Do we use db.system or az.namespace attribute until then or keep using the deprecated http attributes?

EDIT: I've just seen this and assume we keep using existing http semantic conventions. https://github.com/open-telemetry/semantic-conventions/tree/main/docs/http#semantic-conventions-for-http

@lzchen
Copy link
Member

lzchen commented Feb 9, 2024

@dasiths
Yes, please continue to use old semantic attributes until otherwise notified.

@lzchen
Copy link
Member

lzchen commented Jun 5, 2024

Tracking issue: #35933

@lzchen
Copy link
Member

lzchen commented Jun 14, 2024

Tracking issue in OT upstream for implementing migration plan for instrumentations: open-telemetry/opentelemetry-python-contrib#2453

@dasiths dasiths changed the title Azure Monitor OpenTelemetry Exporter using depreciated semantic conventions Azure Monitor OpenTelemetry Exporter using deprecated semantic conventions Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Monitor - Exporter Monitor OpenTelemetry Exporter Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants