Skip to content

Conversation

@pvaneck
Copy link
Member

@pvaneck pvaneck commented Mar 6, 2025

These are technically breaking changes in the sense that some span-related things are renamed, but these shouldn't really break people in practice.

  • Renamed some Microsoft specific span attributes. The OTel tracing plugin has already been remapping these attribute names for a while now, so this shouldn't really have any impact on users.
  • Updated the default HTTP span name to just the HTTP method per OpenTelemetry HTTP semantic conventions. We've been violating this convention for a while now, and it's time to fix it.

- Renamed some Microsoft specific span attributes
- Updated default HTTP span name to just the HTTP method.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@pvaneck pvaneck force-pushed the core-tracing-semconv-updates branch from 2b44b8f to fe968b3 Compare March 6, 2025 03:07
@pvaneck pvaneck requested a review from Copilot March 6, 2025 03:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR updates the DistributedTracingPolicy spans following OpenTelemetry conventions by changing the default span name from the URL path to the HTTP method and renaming certain span attribute names.

  • Updated the CHANGELOG to document the changes in span naming and attribute renaming.
  • Modified tests to assert the updated span names and attribute keys.
  • Updated the default network span namer and adjusted attribute extraction in DistributedTracingPolicy.

Reviewed Changes

File Description
sdk/core/azure-core/CHANGELOG.md Documented changes to span naming and attribute renaming
sdk/core/azure-core-tracing-opentelemetry/tests/test_storage_live.py Updated expected span name for HTTP spans
sdk/core/azure-core/tests/test_tracing_policy.py Adjusted span name checks from URL path to HTTP method in tests
sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py Changed default network span namer to use HTTP method and updated attribute mapping

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@pvaneck pvaneck marked this pull request as ready for review March 6, 2025 03:52
@pvaneck pvaneck merged commit aa5f6ee into Azure:main Mar 6, 2025
66 checks passed
@pvaneck pvaneck deleted the core-tracing-semconv-updates branch March 6, 2025 22:09
allenkim0129 pushed a commit to allenkim0129/azure-sdk-for-python that referenced this pull request Mar 11, 2025
- Renamed some Microsoft specific span attributes
- Updated default HTTP span name to just the HTTP method.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants