feat: add attributes from resource to gelf exports
This commit is contained in:
parent
019de457c9
commit
4654238920
@ -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]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user