Skip to content

Commit

Permalink
propagate err from resource creation
Browse files Browse the repository at this point in the history
  • Loading branch information
cjs committed Apr 14, 2022
1 parent a557210 commit b9a185a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ func OpenTelemetryRunE(flagPrefix string, prerunLevel zerolog.Level) CobraRunFun
}

func initOtelTracer(exporter trace.SpanExporter, serviceName string, propagators []string) error {
res, _ := setResource(serviceName)
res, err := setResource(serviceName)

if err == nil {
return err
}

tp := trace.NewTracerProvider(
trace.WithSampler(trace.AlwaysSample()),
Expand Down

0 comments on commit b9a185a

Please sign in to comment.