Skip to content

Commit 857830e

Browse files
authored
fix(pprof): do not use - in sample type names (#41)
1 parent ce60ebf commit 857830e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

profiler/src/ProfilerEngine/Datadog.Profiler.Native/AllocationsProvider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
std::vector<SampleValueType> AllocationsProvider::SampleTypeDefinitions(
2323
{
24-
{"alloc-samples", "count"},
25-
{"alloc-size", "bytes"}
24+
{"alloc_samples", "count"},
25+
{"alloc_size", "bytes"}
2626
});
2727

2828

profiler/src/ProfilerEngine/Datadog.Profiler.Native/ContentionProvider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
std::vector<SampleValueType> ContentionProvider::SampleTypeDefinitions(
1717
{
18-
{"lock-count", "count"},
19-
{"lock-time", "nanoseconds"}
18+
{"lock_count", "count"},
19+
{"lock_time", "nanoseconds"}
2020
});
2121

2222

profiler/src/ProfilerEngine/Datadog.Profiler.Native/LiveObjectsProvider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
std::vector<SampleValueType> LiveObjectsProvider::SampleTypeDefinitions(
1414
{
15-
{"inuse-objects", "count"},
16-
{"inuse-space", "bytes"}
15+
{"inuse_objects", "count"},
16+
{"inuse_space", "bytes"}
1717
});
1818

1919
const uint32_t MAX_LIVE_OBJECTS = 1024;

profiler/src/ProfilerEngine/Datadog.Profiler.Native/PyroscopePprofSink.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ void PyroscopePprofSink::upload(Pprof pprof, ProfileTime& startTime, ProfileTime
100100
data.emplace_back(httplib::MultipartFormData{
101101
.name = "sample_type_config",
102102
.content = "{\n"
103-
" \"alloc-samples\": {\n"
103+
" \"alloc_samples\": {\n"
104104
" \"units\": \"objects\",\n"
105105
" \"display-name\": \"alloc_objects\"\n"
106106
" },\n"
107-
" \"alloc-size\": {\n"
107+
" \"alloc_size\": {\n"
108108
" \"units\": \"bytes\",\n"
109109
" \"display-name\": \"alloc_space\"\n"
110110
" },\n"
@@ -116,24 +116,24 @@ void PyroscopePprofSink::upload(Pprof pprof, ProfileTime& startTime, ProfileTime
116116
" \"units\": \"exceptions\",\n"
117117
" \"display-name\": \"exceptions\"\n"
118118
" },\n"
119-
" \"lock-count\": {\n"
119+
" \"lock_count\": {\n"
120120
" \"units\": \"lock_samples\",\n"
121121
" \"display-name\": \"mutex_count\"\n"
122122
" },\n"
123-
" \"lock-time\": {\n"
123+
" \"lock_time\": {\n"
124124
" \"units\": \"lock_nanoseconds\",\n"
125125
" \"display-name\": \"mutex_duration\"\n"
126126
" },\n"
127127
" \"wall\": {\n"
128128
" \"units\": \"samples\",\n"
129129
" \"sampled\": true\n"
130130
" },\n"
131-
" \"inuse-objects\": {\n"
131+
" \"inuse_objects\": {\n"
132132
" \"units\": \"objects\",\n"
133133
" \"display-name\": \"inuse_objects\",\n"
134134
" \"aggregation\": \"average\"\n"
135135
" },\n"
136-
" \"inuse-space\": {\n"
136+
" \"inuse_space\": {\n"
137137
" \"units\": \"bytes\",\n"
138138
" \"display-name\": \"inuse_space\",\n"
139139
" \"aggregation\": \"average\"\n"

0 commit comments

Comments
 (0)