This repository was archived by the owner on Aug 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
namespace jaegertracing {
23
23
24
- static constexpr auto kJaegerClientVersion = "@PROJECT_VERSION@" ;
24
+ static constexpr auto kJaegerClientVersion = "C++- @PROJECT_VERSION@" ;
25
25
static constexpr auto kJaegerClientVersionTagKey = "jaeger.version" ;
26
26
static constexpr auto kJaegerDebugHeader = "jaeger-debug-id" ;
27
27
static constexpr auto kJaegerBaggageHeader = "jaeger-baggage" ;
Original file line number Diff line number Diff line change @@ -122,6 +122,17 @@ TEST(Tracer, testTracer)
122
122
const auto tracer =
123
123
std::static_pointer_cast<Tracer>(opentracing::Tracer::Global ());
124
124
125
+ auto tagItr =
126
+ std::find_if (std::begin (tracer->tags ()),
127
+ std::end (tracer->tags ()),
128
+ [](const Tag& tag) {
129
+ return tag.key () == kJaegerClientVersionTagKey ;
130
+ });
131
+ ASSERT_NE (std::end (tracer->tags ()), tagItr);
132
+ ASSERT_TRUE (tagItr->value ().is <const char *>());
133
+ ASSERT_EQ (" C++-" ,
134
+ static_cast <std::string>(tagItr->value ().get <const char *>()).substr (0 , 4 ));
135
+
125
136
opentracing::StartSpanOptions options;
126
137
options.tags .push_back ({ " tag-key" , 1.23 });
127
138
You can’t perform that action at this time.
0 commit comments