Repository navigation
Demonstrate application-owned OpenTelemetry providers - #11525
Merged
Amaury Levé (Evangelink) merged 2 commits intoSep 25, 2026
Conversation
Amaury Levé (Evangelink)
force-pushed
the
dev/amauryleve/split-telemetry-resources
branch
from
September 25, 2026 10:38
c8799a2 to
c5ab62e
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink)
force-pushed
the
dev/amauryleve/validate-telemetry-topology
branch
from
September 25, 2026 10:52
0b90a4f to
1bf7feb
Compare
Petr Pokorny (0101)
approved these changes
Sep 25, 2026
Amaury Levé (Evangelink)
merged commit Sep 25, 2026
446870e
into
microsoft:dev/amauryleve/split-telemetry-resources
34 of 36 checks passed
Amaury Levé (Evangelink)
deleted the
dev/amauryleve/validate-telemetry-topology
branch
September 25, 2026 11:46
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.
This follow-up to #11505 demonstrates the intended composition model when a test application already owns its OpenTelemetry providers through
HostApplicationBuilder. MTP activates and emits diagnostics, while the application remains responsible for provider, exporter, resource, and lifetime ownership.Approach
MTPOTelsample to configure application-owned tracing and metrics, subscribe withAddTestingPlatformInstrumentation(), and activate MTP diagnostics withAddTestingPlatformDiagnostics().service.name, host, OS, and process identity remain intact.test.run.duration, and checks the trace and metric resources.Trace topology
The application-owned root activity contains the MTP builder and run. During test execution, the custom application activity and MTP's asynchronously produced test-result activity share the same trace and are siblings under
TestFramework. The test asserts this architecturally valid relationship rather than forcing the result span to be a child of ambient user test code, which would be unsafe with parallel and asynchronous result processing.Validation
Build.cmd -pack -blnet8.0andnet9.0: 25/25 passed on eachnet11.0: 1/1 passedMTPOTelsample onnet9.0: 5/5 passed, including five custom test activitiesBuild.cmd -rebuild -blgit diff --checkThe full
Build.cmd -test -blrun passed the changed areas but encountered unrelated environment-sensitiveNamedPipeServerSecurityTestsfailures on Windows due to OS error 1346 being surfaced asIOExceptioninstead ofUnauthorizedAccessException.