-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Move OTEL hooks to the SDK #338
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
Conversation
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 87.02% 87.23% +0.21%
==========================================
Files 45 47 +2
Lines 1757 1794 +37
Branches 184 182 -2
==========================================
+ Hits 1529 1565 +36
- Misses 188 190 +2
+ Partials 40 39 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
# Conflicts: # Directory.Packages.props
Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
|
Thanks for starting this PR but I think we should wait until this spec PR is merged before moving this hook to the SDK. |
Signed-off-by: André Silva <[email protected]>
c95eefa to
47cd3f4
Compare
Move OTEL hooks to the SDK
This pull request introduces telemetry enhancements to the OpenFeature .NET SDK by adding new hooks for tracing and metrics, updating dependencies, and providing examples and tests. The most significant changes include the addition of the
TraceEnricherHookandMetricsHookclasses, integration of OpenTelemetry in the ASP.NET Core sample, and updates to dependencies to support telemetry features.Telemetry Enhancements
TraceEnricherHookto enrich telemetry traces with feature flag evaluation details, including tags and events for tracing purposes. This hook integrates with the currentActivityand supports error handling.MetricsHookfor capturing metrics such as evaluation requests, successes, errors, and active evaluations. Metrics are collected using OpenTelemetry'sMeterAPI. [1] [2]Dependency Updates
OpenTelemetry.Extensions.Hosting,OpenTelemetry.Instrumentation.AspNetCore, andOpenTelemetry.Exporter.OpenTelemetryProtocolto the ASP.NET Core sample project to support telemetry features. [1] [2]System.Diagnostics.DiagnosticSourcein the main project and centralized dependency management. [1] [2]Documentation and Examples
TraceEnricherHookandMetricsHook, including detailed descriptions, examples, and usage instructions for integrating these hooks with OpenTelemetry.TraceEnricherHookandMetricsHookwith OpenTelemetry tracing and metrics. [1] [2]Testing
MetricsHookto verify metrics collection during different stages of feature flag evaluation (e.g.,BeforeAsync,AfterAsync,ErrorAsync,FinallyAsync).Related Issues
Fixes #175
Notes
samplesapplication. This allow us to see the metrics and traces in any OTEL tool.Check the screenshots below:
Follow-up Tasks