Skip to content

Commit

Permalink
modify OTLP init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cedi committed Feb 22, 2023
1 parent 939e7d7 commit 3a46996
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/observability/opentelemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func InitTracer(serviceName, serviceVersion string) (*sdkTrace.TracerProvider, t
if strings.ToLower(otlpInsecure) == "true" {
otlpOptions = append(otlpOptions, otlptracehttp.WithInsecure())
}
} else {
otlpOptions = append(otlpOptions, otlptracehttp.WithEndpoint("localhost:4318"))
otlpOptions = append(otlpOptions, otlptracehttp.WithInsecure())
}

client := otlptracehttp.NewClient(otlpOptions...)
Expand Down

0 comments on commit 3a46996

Please sign in to comment.