Skip to content

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented Sep 3, 2025

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 and Program.cs to demonstrate enabling OpenTelemetry tracing and metrics via the new provider and exporter.

View on Aspire:

  • Traces:
image image
  • Metrics:
image

@Evangelink Evangelink requested review from MarcoRossignoli, Youssef1313 and Copilot and removed request for MarcoRossignoli and Youssef1313 September 3, 2025 20:24
Copy link
Contributor

@Copilot Copilot AI left a 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

@Evangelink Evangelink enabled auto-merge (squash) September 4, 2025 07:40
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