Skip to content

Commit

Permalink
datadog-reporter: support pod name as a custom attribute (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandem committed Jun 26, 2024
1 parent e8c272e commit 767d031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reporter/datadog_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (r *DatadogReporter) reportProfile(ctx context.Context) error {

tags := strings.Split(config.ValidatedTags(), ";")

customAttributes := []string{"container_id", "container_name", "thread_name"}
customAttributes := []string{"container_id", "container_name", "thread_name", "pod_name"}
for _, attr := range customAttributes {
tags = append(tags, "ddprof.custom_ctx:"+attr)
}
Expand Down Expand Up @@ -547,7 +547,7 @@ func addTraceLabels(labels map[string][]string, i traceFramesCounts) {
}

if i.podName != "" {
labels["podName"] = append(labels["podName"], i.podName)
labels["pod_name"] = append(labels["pod_name"], i.podName)
}

if i.containerID != "" {
Expand Down

0 comments on commit 767d031

Please sign in to comment.