-
Notifications
You must be signed in to change notification settings - Fork 285
[MTP] Add initial support for OTel #6511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rel/4.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.OpenTelemetry
extension 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 |
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.OpenTelemetry
with wrappers for activities, counters, and histograms, and a platform service implementation for telemetry instrumentation.Modified
Playground.csproj
andProgram.cs
to demonstrate enabling OpenTelemetry tracing and metrics via the new provider and exporter.View on Aspire: