Skip to content

Commit

Permalink
docs(main): correct function name and fix formatting in OpenTelemetry…
Browse files Browse the repository at this point in the history
… Hook documentation (#583)

Signed-off-by: JamesWang <[email protected]>
Co-authored-by: james_wang <[email protected]>
  • Loading branch information
jame2408 and james_wang authored Sep 24, 2024
1 parent 0e3ceb2 commit fd3c4d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hooks/open-telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ span.End()

### Options

### WithErrorStatusEnabled
#### WithErrorStatusEnabled

Enable setting span status to `Error` in case of an error. Default behavior is disabled, span status is unset for errors.

### WithTracesAttributeSetter
#### WithTracesAttributeSetter

This constructor options allows to provide a custom callback to extract dimensions from `FlagMetadata`.
These attributes are added at the `After` stage of the hook.

```go

NewTracesHook(WithMetricsAttributeSetter(
NewTracesHook(WithTracesAttributeSetter(
func(metadata openfeature.FlagMetadata) []attribute.KeyValue {
// custom attribute extraction logic

Expand Down

0 comments on commit fd3c4d7

Please sign in to comment.