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 authored Jun 18, 2024
1 parent 47faa2f commit 612ff65
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 @@ -346,7 +346,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, fmt.Sprintf("ddprof.custom_ctx:%s", attr))
}
Expand Down Expand Up @@ -603,7 +603,7 @@ func addTraceLabels(labels map[string][]string, i traceInfo) {
}

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 612ff65

Please sign in to comment.