Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions reporter/base_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func (b *baseReporter) ReportTraceEvent(trace *libpf.Trace, meta *samples.TraceE
Timestamps: []uint64{uint64(meta.Timestamp)},
OffTimes: []int64{meta.OffTime},
EnvVars: meta.EnvVars,
Labels: trace.CustomLabels,
}
return nil
}
8 changes: 8 additions & 0 deletions reporter/internal/pdata/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ func (p *Pdata) setProfile(
attribute.Key("process.environment_variable."+key),
value)
}
for key, value := range traceInfo.Labels {
// Once https://github.com/open-telemetry/semantic-conventions/issues/2561
// reached an agreement, use the actual OTel SemConv attribute.
attrMgr.AppendOptionalString(
sample.AttributeIndices(),
attribute.Key("process.context.label."+key),
value)
}

if p.ExtraSampleAttrProd != nil {
extra := p.ExtraSampleAttrProd.ExtraSampleAttrs(attrMgr, traceKey.ExtraMeta)
Expand Down
1 change: 1 addition & 0 deletions reporter/samples/samples.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type TraceEvents struct {
Timestamps []uint64 // in nanoseconds
OffTimes []int64 // in nanoseconds
EnvVars map[string]string
Labels map[string]string
}

// TraceAndMetaKey is the deduplication key for samples. This **must always**
Expand Down
Loading