feat: add attributes from resource to gelf exports

This commit is contained in:
Natalia Goc 2024-09-24 16:05:58 +02:00
parent 019de457c9
commit 4654238920

View File

@ -61,10 +61,15 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan)
stub := &stubs[i] stub := &stubs[i]
var attributes = make(map[string]interface{}) var attributes = make(map[string]interface{})
for _, attr := range stub.Attributes { for _, attr := range stub.Attributes {
attributes[string(attr.Key)] = GetByType(attr.Value) attributes[string(attr.Key)] = GetByType(attr.Value)
} }
for _, attr := range stub.Resource.Attributes() {
attributes[string(attr.Key)] = GetByType(attr.Value)
}
for i := range stub.Events { for i := range stub.Events {
event := stub.Events[i] event := stub.Events[i]