Skip to content

Conversation

@dylan-asos
Copy link
Contributor

Purpose

This pull request introduces significant changes to the Asos.OpenTelemetry project, focusing on adding custom sampling functionality for OpenTelemetry in ASP.NET Core applications, updating project configurations, and improving documentation. The most important changes include the implementation of route-based sampling, the addition of tests for the new functionality, and updates to project files to target .NET 8.0.

New functionality: Route-based sampling

Unit tests for sampling functionality

Project updates

Documentation improvements

@dylan-asos dylan-asos requested a review from Copilot June 4, 2025 12:05
Copy link

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 restructures the sampling functionality for the Asos.OpenTelemetry project by introducing custom, route-based sampling for ASP.NET Core applications while updating project configurations and documentation for .NET 8.0.

  • Added new classes for configuring and processing sampling rules based on HTTP routes and methods.
  • Updated project files to target .NET 8.0 and improved README documentation with usage examples.
  • Implemented comprehensive unit tests to validate the new custom sampling behavior.

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Asos.OpenTelemetry.Exporter.EventHubs.csproj Updated project targeting to .NET 8.0 and metadata adjustments for packaging
SamplingRule.cs Added class representing individual sampling rules with regex support
RouteSamplingOptions.cs Introduced options class to define default and route-specific sampling rates
OpenTelemetryExtensions.cs Added extension methods to integrate custom sampling with Azure Monitor trace exporter
ConfigurableRouteSampler.cs Implemented sampler logic based on HTTP request path and method
README.md Updated documentation to illustrate configuration and usage of custom sampling
OpenTelemetrySetupTests.cs Added tests for validating service registration and binding of sampling options
ConfigurableRouteSamplerTests.cs Comprehensive tests for various scenarios of the route-based sampler
Asos.OpenTelemetry.AspNetCore.csproj & Tests.csproj Updated project files to target .NET 8.0 and align with new features

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.

2 participants