Skip to content

Commit 2ebc3f9

Browse files
authored
cleanup(otel): explicit span ctor (#13994)
1 parent 0f19f2e commit 2ebc3f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

google/cloud/internal/trace_propagator.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "google/cloud/internal/absl_str_cat_quiet.h"
1818
#include "absl/strings/numbers.h"
1919
#include <opentelemetry/context/propagation/composite_propagator.h>
20+
#include <opentelemetry/nostd/span.h>
2021
#include <opentelemetry/trace/context.h>
2122
#include <opentelemetry/trace/propagation/http_trace_context.h>
2223
#include <cstdlib>
@@ -65,7 +66,9 @@ class CloudTraceContext
6566
// the oldest version of Abseil we support. So we use `std::strtoull`, which
6667
// requires the input to be null-terminated.
6768
std::array<char, 2 * SpanId::kSize + 1> span_id;
68-
span_context.span_id().ToLowerBase16({span_id.data(), span_id.size() - 1});
69+
span_context.span_id().ToLowerBase16(
70+
opentelemetry::nostd::span<char, 2 * SpanId::kSize>{
71+
span_id.data(), span_id.size() - 1});
6972
span_id[2 * SpanId::kSize] = '\0';
7073
char* end = nullptr;
7174
std::uint64_t span_id_dec = std::strtoull(span_id.data(), &end, 16);

0 commit comments

Comments
 (0)