diff --git a/pkg/exporters/gelf_exporter/trace.go b/pkg/exporters/gelf_exporter/trace.go index 0d10d25..476187c 100644 --- a/pkg/exporters/gelf_exporter/trace.go +++ b/pkg/exporters/gelf_exporter/trace.go @@ -79,8 +79,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) Timestamp: stub.StartTime, // Defaults to ALERT since we consider lack of the level a serious error that should be fixed ASAP. // Otherwise some dangerous unexpected behaviour could go unnoticed. - Level: syslog.ALERT, - ExtraFields: attributes, + Level: syslog.ALERT, } for _, attrKV := range event.Attributes { if attrKV.Key == attr.LogMessageLongKey { @@ -100,6 +99,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) attributes[string(attrKV.Key)] = GetByType(attrKV.Value) } + gelf.ExtraFields = attributes Log(e.gelfWriter, gelf) }