Repository navigation
[MTP] Add initial support for OTel - #6511
Merged
Merged
Conversation
Amaury Levé (Evangelink)
requested review from
Marco Rossignoli (MarcoRossignoli),
Youssef Fahmy (Youssef1313) and
Copilot
and removed request for
Marco Rossignoli (MarcoRossignoli) and
Youssef Fahmy (Youssef1313)
September 3, 2025 20:24
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces OpenTelemetry support to the Microsoft Testing Platform, enabling distributed tracing and metrics collection for test runs. The implementation provides instrumentation capabilities while maintaining compatibility with the platform's netstandard2.0 target framework.
Key changes include:
- Added new
Microsoft.Testing.Extensions.OpenTelemetryextension project with OpenTelemetry integration - Introduced telemetry interfaces and platform services for activity tracking, counters, and histograms
- Updated existing services to accept the new OpenTelemetry service parameter and instrument test execution flows
- Enhanced the Playground sample to demonstrate OpenTelemetry usage with OTLP exporters
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Platform/Microsoft.Testing.Platform/Telemetry/TelemetryManager.cs |
Added OpenTelemetry provider support and renamed BuildAsync to BuildTelemetryAsync |
src/Platform/Microsoft.Testing.Platform/Services/TestApplicationResult.cs |
Added OpenTelemetry service integration and test execution instrumentation |
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/ |
New extension project providing OpenTelemetry wrappers and platform service implementation |
test/UnitTests/ |
Updated test constructors to accommodate new OpenTelemetry service parameter |
src/Platform/Microsoft.Testing.Platform/Hosts/ |
Added activity tracking throughout host execution flows |
samples/Playground/ |
Added OpenTelemetry configuration example with tracing and metrics |
Amaury Levé (Evangelink)
enabled auto-merge (squash)
September 4, 2025 07:40
filzrev
reviewed
Sep 4, 2025
# Conflicts: # Directory.Packages.props
Youssef Fahmy (Youssef1313)
left a comment
Member
There was a problem hiding this comment.
It's probably nice if we can have a complete sample, whether it's using Aspire or something else.
# Conflicts: # samples/Playground/Program.cs
# Conflicts: # Directory.Packages.props # test/UnitTests/Microsoft.Testing.Platform.UnitTests/ServerMode/ServerTests.cs
Marco Rossignoli (MarcoRossignoli)
approved these changes
Dec 12, 2025
Amaury Levé (Evangelink)
enabled auto-merge (squash)
December 12, 2025 10:29
Marco Rossignoli (MarcoRossignoli)
approved these changes
Dec 12, 2025
Marco Rossignoli (MarcoRossignoli)
approved these changes
Dec 12, 2025
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 PR introduces OpenTelemetry support to the platform, enabling distributed tracing and metrics collection for test runs. The main changes include adding a new extension project for OpenTelemetry integration, updating dependencies and sample usage, and instrumenting the test execution flow to emit telemetry data.
Added new project
Microsoft.Testing.Extensions.OpenTelemetrywith wrappers for activities, counters, and histograms, and a platform service implementation for telemetry instrumentation.Modified
Playground.csprojandProgram.csto demonstrate enabling OpenTelemetry tracing and metrics via the new provider and exporter.View on Aspire: