Skip to content

Commit 962e48d

Browse files
authored
Upgrade open telemetry protobufs from v0.10.0 to v1.3.2 (#1974)
1 parent 970a54a commit 962e48d

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

bazel/repository_locations.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ REPOSITORY_LOCATIONS = dict(
177177
urls = ["https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip"],
178178
),
179179
com_github_opentelemetry_proto = dict(
180-
urls = ["https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v0.10.0.tar.gz"],
181-
strip_prefix = "opentelemetry-proto-0.10.0",
182-
sha256 = "f1004a49f40d7acb43e86b1fd95f73e80c778acb163e309bba86f0cbd7fa8a71",
180+
urls = ["https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.3.2.tar.gz"],
181+
strip_prefix = "opentelemetry-proto-1.3.2",
182+
sha256 = "c069c0d96137cf005d34411fa67dd3b6f1f8c64af1e7fb2fe0089a41c425acd7",
183183
),
184184
com_github_packetzero_dnsparser = dict(
185185
sha256 = "bdf6c7f56f33725c1c32e672a4779576fb639dd2df565115778eb6be48296431",

src/carnot/exec/otel_export_sink_node.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ Status OTelExportSinkNode::ConsumeMetrics(ExecState* exec_state, const RowBatch&
233233
// TODO(philkuz) optimize by pooling metrics by resource within a batch.
234234
// TODO(philkuz) optimize by pooling data per metric per resource.
235235

236-
auto library_metrics = resource_metrics.add_instrumentation_library_metrics();
236+
auto scope_metrics = resource_metrics.add_scope_metrics();
237237
for (const auto& metric_pb : plan_node_->metrics()) {
238-
auto metric = library_metrics->add_metrics();
238+
auto metric = scope_metrics->add_metrics();
239239
metric->set_name(metric_pb.name());
240240
metric->set_description(metric_pb.description());
241241
metric->set_unit(metric_pb.unit());
@@ -349,9 +349,9 @@ Status OTelExportSinkNode::ConsumeSpans(ExecState* exec_state, const RowBatch& r
349349
auto resource = resource_spans.mutable_resource();
350350
AddAttributes(resource->mutable_attributes(), plan_node_->resource_attributes_normal_encoding(),
351351
rb, row_idx);
352-
auto library_spans = resource_spans.add_instrumentation_library_spans();
352+
auto scope_spans = resource_spans.add_scope_spans();
353353
for (const auto& span_pb : plan_node_->spans()) {
354-
auto span = library_spans->add_spans();
354+
auto span = scope_spans->add_spans();
355355
if (span_pb.has_name_string()) {
356356
span->set_name(span_pb.name_string());
357357
} else {

src/carnot/exec/otel_export_sink_node_test.cc

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ metrics {
200200
tester.ConsumeNext(rb1, 1, 0);
201201
EXPECT_EQ(non_utf_8_bytes, actual_protos[0]
202202
.resource_metrics(0)
203-
.instrumentation_library_metrics(0)
203+
.scope_metrics(0)
204204
.metrics(0)
205205
.gauge()
206206
.data_points(0)
@@ -300,7 +300,7 @@ eos: true)pb"},
300300
{R"pb(
301301
resource_metrics {
302302
resource {}
303-
instrumentation_library_metrics {
303+
scope_metrics {
304304
metrics {
305305
name: "http.resp.latency"
306306
summary {
@@ -329,7 +329,7 @@ resource_metrics {
329329
}
330330
resource_metrics {
331331
resource {}
332-
instrumentation_library_metrics {
332+
scope_metrics {
333333
metrics {
334334
name: "http.resp.latency"
335335
summary {
@@ -398,7 +398,7 @@ resource_metrics {
398398
}
399399
}
400400
}
401-
instrumentation_library_metrics {
401+
scope_metrics {
402402
metrics {
403403
name: "http.resp.latency"
404404
gauge {
@@ -425,7 +425,7 @@ resource_metrics {
425425
}
426426
}
427427
}
428-
instrumentation_library_metrics {
428+
scope_metrics {
429429
metrics {
430430
name: "http.resp.latency"
431431
gauge {
@@ -460,7 +460,7 @@ eos: true)pb"},
460460
{R"pb(
461461
resource_metrics {
462462
resource {}
463-
instrumentation_library_metrics {
463+
scope_metrics {
464464
metrics {
465465
name: "http.resp.latency"
466466
gauge {
@@ -474,7 +474,7 @@ resource_metrics {
474474
}
475475
resource_metrics {
476476
resource {}
477-
instrumentation_library_metrics {
477+
scope_metrics {
478478
metrics {
479479
name: "http.resp.latency"
480480
gauge {
@@ -503,7 +503,7 @@ eos: true)pb"},
503503
{R"pb(
504504
resource_metrics {
505505
resource {}
506-
instrumentation_library_metrics {
506+
scope_metrics {
507507
metrics {
508508
name: "http.resp.latency"
509509
gauge {
@@ -517,7 +517,7 @@ resource_metrics {
517517
}
518518
resource_metrics {
519519
resource {}
520-
instrumentation_library_metrics {
520+
scope_metrics {
521521
metrics {
522522
name: "http.resp.latency"
523523
gauge {
@@ -547,7 +547,7 @@ eos: true)pb"},
547547
{R"pb(
548548
resource_metrics {
549549
resource {}
550-
instrumentation_library_metrics {
550+
scope_metrics {
551551
metrics {
552552
name: "http.resp.latency"
553553
description: "tracks the response latency of http requests"
@@ -581,7 +581,7 @@ eos: true)pb"},
581581
{R"pb(
582582
resource_metrics {
583583
resource {}
584-
instrumentation_library_metrics {
584+
scope_metrics {
585585
metrics {
586586
name: "http.resp.latency"
587587
gauge {
@@ -596,7 +596,7 @@ resource_metrics {
596596
R"pb(
597597
resource_metrics {
598598
resource {}
599-
instrumentation_library_metrics {
599+
scope_metrics {
600600
metrics {
601601
name: "http.resp.latency"
602602
gauge {
@@ -632,7 +632,7 @@ eos: true)pb"},
632632
{R"pb(
633633
resource_metrics {
634634
resource {}
635-
instrumentation_library_metrics {
635+
scope_metrics {
636636
metrics {
637637
name: "http.resp.latency"
638638
summary {
@@ -670,7 +670,7 @@ eos: true)pb"},
670670
{R"pb(
671671
resource_metrics {
672672
resource {}
673-
instrumentation_library_metrics {
673+
scope_metrics {
674674
metrics {
675675
name: "metric1"
676676
gauge {
@@ -740,7 +740,7 @@ resource_metrics {
740740
}
741741
}
742742
}
743-
instrumentation_library_metrics {
743+
scope_metrics {
744744
metrics {
745745
name: "http.resp.latency"
746746
gauge {
@@ -767,7 +767,7 @@ resource_metrics {
767767
}
768768
}
769769
}
770-
instrumentation_library_metrics {
770+
scope_metrics {
771771
metrics {
772772
name: "http.resp.latency"
773773
gauge {
@@ -794,7 +794,7 @@ resource_metrics {
794794
}
795795
}
796796
}
797-
instrumentation_library_metrics {
797+
scope_metrics {
798798
metrics {
799799
name: "http.resp.latency"
800800
gauge {
@@ -821,7 +821,7 @@ resource_metrics {
821821
}
822822
}
823823
}
824-
instrumentation_library_metrics {
824+
scope_metrics {
825825
metrics {
826826
name: "http.resp.latency"
827827
gauge {
@@ -881,7 +881,7 @@ eos: true)pb"},
881881
{R"pb(
882882
resource_metrics {
883883
resource {}
884-
instrumentation_library_metrics {
884+
scope_metrics {
885885
metrics {
886886
name: "http.resp.latency"
887887
gauge {
@@ -950,7 +950,7 @@ resource_metrics {
950950
}
951951
}
952952
}
953-
instrumentation_library_metrics {
953+
scope_metrics {
954954
metrics {
955955
name: "http.resp.latency"
956956
gauge {
@@ -977,7 +977,7 @@ resource_metrics {
977977
}
978978
}
979979
}
980-
instrumentation_library_metrics {
980+
scope_metrics {
981981
metrics {
982982
name: "http.resp.latency"
983983
gauge {
@@ -1092,7 +1092,7 @@ resource_spans {
10921092
}
10931093
}
10941094
}
1095-
instrumentation_library_spans {
1095+
scope_spans {
10961096
spans {
10971097
name: "span"
10981098
start_time_unix_nano: 10
@@ -1135,7 +1135,7 @@ eos: true)pb"},
11351135
{R"pb(
11361136
resource_spans {
11371137
resource { }
1138-
instrumentation_library_spans {
1138+
scope_spans {
11391139
spans {
11401140
name: "span"
11411141
start_time_unix_nano: 10
@@ -1173,7 +1173,7 @@ eos: true)pb"},
11731173
{R"pb(
11741174
resource_spans {
11751175
resource {}
1176-
instrumentation_library_spans {
1176+
scope_spans {
11771177
spans {
11781178
name: "span1"
11791179
start_time_unix_nano: 10
@@ -1188,7 +1188,7 @@ resource_spans {
11881188
}
11891189
resource_spans {
11901190
resource {}
1191-
instrumentation_library_spans {
1191+
scope_spans {
11921192
spans {
11931193
name: "span2"
11941194
start_time_unix_nano: 20
@@ -1257,7 +1257,7 @@ resource_spans {
12571257
}
12581258
}
12591259
}
1260-
instrumentation_library_spans {
1260+
scope_spans {
12611261
spans {
12621262
name: "span"
12631263
start_time_unix_nano: 10
@@ -1284,7 +1284,7 @@ resource_spans {
12841284
}
12851285
}
12861286
}
1287-
instrumentation_library_spans {
1287+
scope_spans {
12881288
spans {
12891289
name: "span"
12901290
start_time_unix_nano: 10
@@ -1311,7 +1311,7 @@ resource_spans {
13111311
}
13121312
}
13131313
}
1314-
instrumentation_library_spans {
1314+
scope_spans {
13151315
spans {
13161316
name: "span"
13171317
start_time_unix_nano: 10
@@ -1338,7 +1338,7 @@ resource_spans {
13381338
}
13391339
}
13401340
}
1341-
instrumentation_library_spans {
1341+
scope_spans {
13421342
spans {
13431343
name: "span"
13441344
start_time_unix_nano: 10
@@ -1365,7 +1365,7 @@ resource_spans {
13651365
}
13661366
}
13671367
}
1368-
instrumentation_library_spans {
1368+
scope_spans {
13691369
spans {
13701370
name: "span"
13711371
start_time_unix_nano: 20
@@ -1432,7 +1432,7 @@ eos: true)pb"},
14321432
{R"pb(
14331433
resource_spans {
14341434
resource {}
1435-
instrumentation_library_spans {
1435+
scope_spans {
14361436
spans {
14371437
name: "span"
14381438
start_time_unix_nano: 10
@@ -1530,7 +1530,7 @@ TEST_P(SpanIDTests, generate_ids) {
15301530
tester.ConsumeNext(*rb.get(), 1, 0);
15311531

15321532
for (const auto& [s_idx, span] : Enumerate(actual_proto.resource_spans())) {
1533-
for (const auto& ilm : span.instrumentation_library_spans()) {
1533+
for (const auto& ilm : span.scope_spans()) {
15341534
for (const auto& span : ilm.spans()) {
15351535
SCOPED_TRACE(absl::Substitute("span $0", s_idx));
15361536
{

0 commit comments

Comments
 (0)