Skip to content

Commit 45078cc

Browse files
committed
Add CPU ID label to custom context tags
1 parent e77f227 commit 45078cc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

reporter/datadog_reporter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ func createTags(userTags Tags, runtimeTag, version string, splitByServiceEnabled
503503
tags := append(Tags{}, userTags...)
504504

505505
customContextTagKey := "ddprof.custom_ctx"
506+
tags = append(tags, MakeTag(customContextTagKey, pprof.CPUIDLabel))
506507
if !splitByServiceEnabled {
507508
tags = append(tags,
508509
MakeTag(customContextTagKey, "container_id"),

reporter/pprof/profile_builder.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020

2121
const (
2222
unknownStr = "UNKNOWN"
23+
CPUIDLabel = "cpu.logical_number"
2324
)
2425

2526
type Config struct {
@@ -270,7 +271,7 @@ func addTraceLabels(labels map[string][]string, i samples.TraceAndMetaKey, proce
270271
labels["process name"] = append(labels["process name"], processName)
271272
}
272273

273-
labels["cpu.logical_number"] = append(labels["cpu.logical_number"], strconv.Itoa(int(i.CPU)))
274+
labels[CPUIDLabel] = append(labels[CPUIDLabel], strconv.Itoa(int(i.CPU)))
274275

275276
containerMetadata := processMeta.ContainerMetadata
276277
if containerMetadata.PodName != "" {

0 commit comments

Comments
 (0)