-
Notifications
You must be signed in to change notification settings - Fork 123
OpenTelemetry and Azure Monitor Exporter support #578
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: main
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 adds support for using OpenTelemetry with Azure Monitor Exporter as an alternative to Application Insights for feature flag telemetry. The implementation uses structured logging instead of direct TelemetryClient calls, making it more flexible and aligned with modern .NET logging patterns.
Key changes:
- New
Microsoft.FeatureManagement.Telemetry.AzureMonitorpackage with OpenTelemetry-based telemetry - New test project
Tests.FeatureManagement.Telemetry.AzureMonitorwith comprehensive test coverage - New example application
VariantAndAzureMonitorDemodemonstrating the usage
Reviewed changes
Copilot reviewed 38 out of 91 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/Microsoft.FeatureManagement.Telemetry.AzureMonitor/*.cs |
Core implementation of Azure Monitor telemetry using OpenTelemetry processors and structured logging |
src/Microsoft.FeatureManagement.Telemetry.AzureMonitor/*.csproj |
Package configuration with OpenTelemetry dependencies |
tests/Tests.FeatureManagement.Telemetry.AzureMonitor/*.cs |
Test suite covering telemetry logging and processor ordering |
examples/VariantAndAzureMonitorDemo/* |
Demo application showing migration from Application Insights to Azure Monitor |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why this PR?
This change adds support for using OpenTelemetry with Azure Monitor Exporter instead of Application Insights.
Visible Changes
Microsoft.FeatureManagement.Telemetry.AzureMonitor. This package looks very similar toMicrosoft.FeatureManagement.Telemetry.ApplicationInsightsand works similarly.VariantAndAzureMonitorDemo. It is a clone of VariantAndTelemetry demo but uses OTel and Azure Monitor.Migrating from .ApplicationInsights to .AzureMonitor
Package
Builder extension
Emitting events
*Note: Even better, use High-performance logging, like the
LoggerExtension.csin the example.