Skip to content

test: add upstream compatibility contracts - #249

Merged
Hector Hernandez (hectorhdzg) merged 3 commits into
microsoft:mainfrom
hectorhdzg:hectorh-microsoft-upstream-contract-tests
Oct 1, 2026
Merged

Hector Hernandez (hectorhdzg) merged 3 commits into
microsoft:mainfrom
hectorhdzg:hectorh-microsoft-upstream-contract-tests

Conversation

@hectorhdzg

Copy link
Copy Markdown
Member

Summary

Adds test-only compatibility coverage for upstream OpenTelemetry behavior relied upon by the distro.

The contracts cover:

  • Azure App Service, Functions, Container Apps, AKS, and VM resource detectors
  • Positive, absent, partial, malformed, and transport-failure detector paths
  • Resource environment parsing, merging, schema handling, and asynchronous attributes
  • service.instance.id precedence, opt-in behavior, stability, and worker uniqueness
  • Kubernetes pod precedence when deriving Azure Monitor cloud_RoleInstance
  • Host, OS, process, and service-instance detection
  • Trace, metric, log, and W3C trace-context SDK behavior

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The log contract passes an incompatible wrapper to SimpleLogRecordProcessor, preventing the test from validating log export.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds compatibility tests for upstream OpenTelemetry behavior relied upon by the distro.

Changes:

  • Covers Azure and core resource detectors.
  • Verifies resource identity and precedence behavior.
  • Tests trace, metric, log, and W3C propagation contracts.
File Description
azureResourceDetectors.test.ts Tests Azure environment detection paths.
resourceDetectors.test.ts Tests core resource detection and merging.
resourceIdentityContracts.test.ts Tests instance identity and precedence.
telemetrySdkContracts.test.ts Tests telemetry SDK and propagation behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/internal/unit/upstream/telemetrySdkContracts.test.ts
Copilot AI balanced review requested due to automatic review settings September 30, 2026 23:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The stale, conflicted branch introduces unrelated changelog history and uses an incompatible log processor constructor.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)

Comment thread CHANGELOG.md
Preserve the upstream compatibility contract entry and current release history.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit 986aa43 into microsoft:main Oct 1, 2026
7 checks passed
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.

4 participants