Repository navigation
Add New Azure Functions OpenTelemetry Attributes - #3514
Open
E. Lewis (Lewis-E) wants to merge 1 commit into
Open
E. Lewis (Lewis-E) wants to merge 1 commit into
E. Lewis (Lewis-E) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
@microsoft-github-policy-service agree company="Datadog" |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds Azure Functions OpenTelemetry resource attributes for subscription, resource group, and instance identity.
Changes:
- Detects new semantic convention attributes from Azure environment variables.
- Preserves explicit
OTEL_RESOURCE_ATTRIBUTESvalues. - Adds constants, documentation, release notes, and test coverage.
| File | Description |
|---|---|
test/DotNetWorker.OpenTelemetry.Tests/EndToEndTests.cs |
Tests detection, fallback, and precedence behavior. |
src/DotNetWorker.OpenTelemetry/ResourceSemanticConventions.cs |
Defines new attribute names. |
src/DotNetWorker.OpenTelemetry/release_notes.md |
Records the new functionality. |
src/DotNetWorker.OpenTelemetry/README.md |
Documents attribute sources and behavior. |
src/DotNetWorker.OpenTelemetry/OpenTelemetryConstants.cs |
Defines related environment variable constants. |
src/DotNetWorker.OpenTelemetry/FunctionsResourceDetector.cs |
Implements attribute detection and precedence handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue describing the changes in this PR
Adds:
cloud.account.idfrom the subscription portion ofWEBSITE_OWNER_NAME, reusing the existing resource-ID parsing behavior.azure.resource_group.namefromWEBSITE_RESOURCE_GROUP.faas.instancefrom the first non-empty value ofWEBSITE_INSTANCE_ID,WEBSITE_POD_NAME, orCONTAINER_NAME, in that order.Missing values are omitted; the detector does not infer a resource group or generate an instance ID.
No open issue. PR opened based on Rohit Ranjan (@RohitRanjanMS) 's recommendation on opentelemetry-dotnet-contrib#5165.
Pull request checklist
release_notes.mdAdditional information
Tested with dedicated & flex live test apps and saw the expected properties.
Related changes being discussed at Microsoft re: Node & Python SDKs: open-telemetry/opentelemetry-python-contrib#5007 (comment)
AI disclosure: Pi Coding Agent was used to draft this PR.