Skip to content

Commit 2634558

Browse files
authored
Merge pull request #663 from maximhq/10-22-header_fix_for_otel
header fix for otel
2 parents 3e9a028 + 952e9d3 commit 2634558

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/otel/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"net/http"
9+
"strings"
910
"time"
1011

1112
collectorpb "go.opentelemetry.io/proto/otlp/collector/trace/v1"
@@ -49,7 +50,7 @@ func (c *OtelClientHTTP) Emit(ctx context.Context, rs []*ResourceSpan) error {
4950
req.Header.Set("Content-Type", "application/x-protobuf")
5051
if c.headers != nil {
5152
for key, value := range c.headers {
52-
if key == "Content-Type" {
53+
if strings.ToLower(key) == "content-type" {
5354
continue
5455
}
5556
req.Header.Set(key, value)

0 commit comments

Comments
 (0)