Slackbot
01/10/2024, 11:46 PMDhruv B
01/10/2024, 11:55 PMDhruv B
01/10/2024, 11:56 PMdiff --git a/zap_otlp_sync/zap_otlp_sync.go b/zap_otlp_sync/zap_otlp_sync.go
index 6e09c70..6dfeb97 100644
--- a/zap_otlp_sync/zap_otlp_sync.go
+++ b/zap_otlp_sync/zap_otlp_sync.go
@@ -20,8 +20,6 @@ import (
"<http://google.golang.org/protobuf/proto|google.golang.org/protobuf/proto>"
)
-var otlpHeaders = os.Getenv("OTEL_EXPORTER_OTLP_HEADERS")
-
type OtelSyncer struct {
ctx context.Context
close context.CancelFunc
@@ -71,6 +69,7 @@ func NewOtlpSyncer(conn *grpc.ClientConn, options Options) *OtelSyncer {
}
// check if there is md in the env
+ otlpHeaders := os.Getenv("OTEL_EXPORTER_OTLP_HEADERS")
headers := map[string]string{}
for _, header := range strings.Split(otlpHeaders, ",") {
splittedHeader := strings.Split(header, "=")
Dhruv B
01/10/2024, 11:56 PMVishal Sharma
01/11/2024, 5:28 AMDhruv B
01/11/2024, 10:38 PMnitya-signoz
01/12/2024, 3:49 AMDhruv B
01/12/2024, 3:49 AM