Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Sep 11, 2024
1 parent 8379079 commit e5f3a29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tracing/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,14 @@ func FromCLIContext(c *cli.Context) (*Client, error) {
return s
}

// static span attributes
// span attributes
cfg.SpanAttributes = keyValueSliceToMap(c.StringSlice("tracing.span.attributes"), identityFn)

// static tracestate attributes
// tracestate attributes
cfg.TraceStateAttributes = keyValueSliceToMap(c.StringSlice("tracing.tracestate.attributes"), identityFn)

// static resource attributes
// merge static resource attributes with those fetched from the environment using os.Getenv
cfg.ResourceAttributes = keyValueSliceToMap(c.StringSlice("tracing.resource.attributes"), identityFn)

// merge static resource attributes with those fetched from the environment
m := keyValueSliceToMap(c.StringSlice("tracing.resource.env_attributes"), os.Getenv)
maps.Copy(cfg.ResourceAttributes, m)

Expand Down

0 comments on commit e5f3a29

Please sign in to comment.