Minor dependency updates
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package tracing
|
||||
|
||||
// todo, review:
|
||||
// https://github.com/ttys3/tracing-go/blob/main/tracing.go#L136
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
@@ -89,13 +92,18 @@ func InitTracer(ctx context.Context, cfg *TracerConfig) (TpShutdownFunc, error)
|
||||
|
||||
func newOLTPExporter(ctx context.Context, cfg *TracerConfig) (otelsdktrace.SpanExporter, error) {
|
||||
|
||||
logger.Setup().Warn("newOLTPExporter")
|
||||
|
||||
opts := []otlptracehttp.Option{otlptracehttp.WithCompression(otlptracehttp.GzipCompression)}
|
||||
|
||||
if cfg.CertificateProvider != nil {
|
||||
logger.Setup().Info("setting up cert provider")
|
||||
opts = append(opts, otlptracehttp.WithTLSClientConfig(&tls.Config{
|
||||
GetClientCertificate: cfg.CertificateProvider,
|
||||
RootCAs: cfg.RootCAs,
|
||||
}))
|
||||
} else {
|
||||
logger.Setup().Info("no cert provider")
|
||||
}
|
||||
|
||||
if len(cfg.Endpoint) > 0 {
|
||||
|
Reference in New Issue
Block a user