You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR was automatically generated via the update-sdk-docs GitHub
workflow.
Signed-off-by: OpenFeature Bot <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
@@ -432,7 +432,7 @@ Hooks support passing per-evaluation data between that stages using `hook data`.
432
432
433
433
Built a new hook? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=hook&projects=&template=document-hook.yaml&title=%5BHook%5D%3A+) so we can add it to the docs!
434
434
435
-
### DependencyInjection
435
+
### Dependency Injection
436
436
437
437
> [!NOTE]
438
438
> The OpenFeature.DependencyInjection and OpenFeature.Hosting packages are currently experimental. They streamline the integration of OpenFeature within .NET applications, allowing for seamless configuration and lifecycle management of feature flag providers using dependency injection and hosting services.
The `TraceEnricherHook` enriches telemetry traces with additional information during the feature flag evaluation lifecycle. This hook adds relevant flag evaluation details as tags and events to the current `Activity` for tracing purposes.
540
+
541
+
For this hook to function correctly, an active span must be set in the current `Activity`, otherwise the hook will no-op.
| feature_flag.key | The lookup key of the feature flag | Hook context flag key |
548
+
| feature_flag.provider.name | The name of the feature flag provider | Provider metadata |
549
+
| feature_flag.result.reason | The reason code which shows how a feature flag value was determined | Evaluation details |
550
+
| feature_flag.result.variant | A semantic identifier for an evaluated flag value | Evaluation details |
551
+
| feature_flag.result.value | The evaluated value of the feature flag | Evaluation details |
552
+
| feature_flag.context.id | The unique identifier for the flag evaluation context | Flag metadata (if available) |
553
+
| feature_flag.set.id | The identifier of the flag set to which the feature flag belongs | Flag metadata (if available) |
554
+
| feature_flag.version | The version of the ruleset used during the evaluation | Flag metadata (if available) |
555
+
| error.type | Describes a class of error the operation ended with | Evaluation details (if error) |
556
+
| error.message | A message explaining the nature of an error occurring during flag evaluation | Evaluation details (if error) |
557
+
558
+
#### Example
559
+
560
+
The following example demonstrates the use of the `TraceEnricherHook` with the `OpenFeature dotnet-sdk`. The traces are sent to a `jaeger` OTLP collector running at `localhost:4317`.
0 commit comments