diff --git a/internal/exporter/exporter.go b/internal/exporter/exporter.go index 5ede92b3..5956a99f 100644 --- a/internal/exporter/exporter.go +++ b/internal/exporter/exporter.go @@ -26,6 +26,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" sdktrace "go.opentelemetry.io/otel/sdk/trace" + "strings" ) type exporter struct { @@ -33,7 +34,7 @@ type exporter struct { func exportSpan(_ context.Context, s sdktrace.ReadOnlySpan) { evt := reporter.CreateEntryEvent(s.SpanContext(), s.StartTime(), s.Parent()) - layer := fmt.Sprintf("%s:%s", s.SpanKind().String(), s.Name()) + layer := fmt.Sprintf("%s:%s", strings.ToUpper(s.SpanKind().String()), s.Name()) evt.SetLayer(layer) evt.AddKVs([]attribute.KeyValue{ attribute.String("sw.span_name", s.Name()), diff --git a/internal/exporter/exporter_test.go b/internal/exporter/exporter_test.go index 9e2a873d..e4093da1 100644 --- a/internal/exporter/exporter_test.go +++ b/internal/exporter/exporter_test.go @@ -80,7 +80,7 @@ func TestExportSpan(t *testing.T) { "Hostname": host.Hostname(), "Label": "entry", "Language": "Go", - "Layer": "internal:foo", + "Layer": "INTERNAL:foo", "PID": host.PID(), "Timestamp_u": start.UnixMicro(), "TransactionName": "foo", @@ -145,7 +145,7 @@ func TestExportSpan(t *testing.T) { "sw.parent_span_id": spanId, "Hostname": host.Hostname(), "Label": "exit", - "Layer": "internal:foo", + "Layer": "INTERNAL:foo", "PID": host.PID(), "Timestamp_u": end.UnixMicro(), "X-Trace": exit.GetXTrace(),