-
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]>
Signed-off-by: André Silva <[email protected]>
c95eefa
to
47cd3f4
Compare
Signed-off-by: André Silva <[email protected]>
…mental status Signed-off-by: André Silva <[email protected]>
… related tests Signed-off-by: André Silva <[email protected]>
…cing Signed-off-by: André Silva <[email protected]>
…ne error handling Signed-off-by: André Silva <[email protected]>
…acingConstants class Signed-off-by: André Silva <[email protected]>
…uationEventBuilder Signed-off-by: André Silva <[email protected]>
…okTests Signed-off-by: André Silva <[email protected]>
Signed-off-by: André Silva <[email protected]>
…iption Signed-off-by: André Silva <[email protected]>
… sample Signed-off-by: André Silva <[email protected]>
@beeme1mr, @toddbaert, @kinyoklion, and @kylejuliandev, I made a couple of changes since your last review. Please look to see if they make sense. |
🤖 I have created a release *beep* *boop* --- ## [2.7.0](v2.6.0...v2.7.0) (2025-07-03) ### 🐛 Bug Fixes * Add generic to evaluation event builder ([#500](#500)) ([68af649](68af649)) * ArgumentNullException when creating a client with optional name ([#508](#508)) ([9151dcd](9151dcd)) ### ✨ New Features * Move OTEL hooks to the SDK ([#338](#338)) ([77f6e1b](77f6e1b)) ### 🧹 Chore * **deps:** update actions/attest-build-provenance action to v2.4.0 ([#495](#495)) ([349c073](349c073)) * **deps:** update actions/attest-sbom action to v2.4.0 ([#496](#496)) ([f7ca416](f7ca416)) * **deps:** update dependency benchmarkdotnet to 0.15.0 ([#481](#481)) ([714425d](714425d)) * **deps:** update dependency benchmarkdotnet to 0.15.2 ([#494](#494)) ([cab3807](cab3807)) * **deps:** update dependency microsoft.net.test.sdk to 17.14.0 ([#482](#482)) ([520d383](520d383)) * **deps:** update dependency microsoft.net.test.sdk to 17.14.1 ([#485](#485)) ([78bfdbf](78bfdbf)) * **deps:** update dependency opentelemetry.instrumentation.aspnetcore to 1.12.0 ([#505](#505)) ([241d880](241d880)) * **deps:** update dependency reqnroll.xunit to 2.4.1 ([#483](#483)) ([99f7584](99f7584)) * **deps:** update dependency system.valuetuple to 4.6.1 ([#503](#503)) ([39f884d](39f884d)) * **deps:** update github/codeql-action digest to 39edc49 ([#504](#504)) ([08ff43c](08ff43c)) * **deps:** update github/codeql-action digest to ce28f5b ([#492](#492)) ([cce224f](cce224f)) * **deps:** update github/codeql-action digest to fca7ace ([#486](#486)) ([e18ad50](e18ad50)) * **deps:** update opentelemetry-dotnet monorepo to 1.12.0 ([#506](#506)) ([69dc186](69dc186)) * **deps:** update spec digest to 1965aae ([#499](#499)) ([2e3dffd](2e3dffd)) * **deps:** update spec digest to 42340bb ([#493](#493)) ([909c51d](909c51d)) * **deps:** update spec digest to c37ac17 ([#502](#502)) ([38f63fc](38f63fc)) * **deps:** update spec digest to f014806 ([#479](#479)) ([dbe8b08](dbe8b08)) * fix sample build warning ([#498](#498)) ([08a00e1](08a00e1)) ### 📚 Documentation * add XML comment on FeatureClient ([#507](#507)) ([f923cea](f923cea)) * updated contributing link on the README ([8435bf7](8435bf7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <[email protected]>
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
TraceEnricherHook
andMetricsHook
classes, integration of OpenTelemetry in the ASP.NET Core sample, and updates to dependencies to support telemetry features.Telemetry Enhancements
TraceEnricherHook
to enrich telemetry traces with feature flag evaluation details, including tags and events for tracing purposes. This hook integrates with the currentActivity
and supports error handling.MetricsHook
for capturing metrics such as evaluation requests, successes, errors, and active evaluations. Metrics are collected using OpenTelemetry'sMeter
API. [1] [2]Dependency Updates
OpenTelemetry.Extensions.Hosting
,OpenTelemetry.Instrumentation.AspNetCore
, andOpenTelemetry.Exporter.OpenTelemetryProtocol
to the ASP.NET Core sample project to support telemetry features. [1] [2]System.Diagnostics.DiagnosticSource
in the main project and centralized dependency management. [1] [2]Documentation and Examples
TraceEnricherHook
andMetricsHook
, including detailed descriptions, examples, and usage instructions for integrating these hooks with OpenTelemetry.TraceEnricherHook
andMetricsHook
with OpenTelemetry tracing and metrics. [1] [2]Testing
MetricsHook
to verify metrics collection during different stages of feature flag evaluation (e.g.,BeforeAsync
,AfterAsync
,ErrorAsync
,FinallyAsync
).Related Issues
Fixes #175
Notes
samples
application. This allow us to see the metrics and traces in any OTEL tool.Check the screenshots below:
Follow-up Tasks