-
Notifications
You must be signed in to change notification settings - Fork 16
Implement stable session identifier headers for telemetry #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e40dd5d
3fab2f5
d805351
1f8a254
468dd13
f124ca3
c106643
25fb7ea
d323be4
3d9252b
b3c0f73
b673a7e
0b7fd49
64223a6
2453d16
d3c3b39
a571544
d47c926
b8a48ff
ccd3fa2
2dfc89d
cff8726
c7a17b2
ed1638c
78b1a06
315f841
212fc67
b22ce9f
bf96df0
b518f63
165fadb
7133928
e347fa6
881addf
2ecd828
a8ed9b8
675ee33
69eb64c
58602f5
d37f5f4
94b81ca
6664e2a
b7ade60
20467e1
d808a0a
dd3b4f8
f6f2ffb
1abb0ce
96a40da
2ba87be
8b810cc
e61e812
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #pragma once | ||
|
|
||
| #include <string> | ||
|
|
||
| namespace datadog::tracing::root_session_id { | ||
|
|
||
| inline const std::string& get_or_init(const std::string& runtime_id) { | ||
| static const std::string id = runtime_id; | ||
| return id; | ||
| } | ||
|
|
||
| } // namespace datadog::tracing::root_session_id |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| #include "msgpack.h" | ||
| #include "platform_util.h" | ||
| #include "random.h" | ||
| #include "root_session_id.h" | ||
| #include "span_data.h" | ||
| #include "span_sampler.h" | ||
| #include "tags.h" | ||
|
|
@@ -48,8 +49,10 @@ Tracer::Tracer(const FinalizedTracerConfig& config, | |
| : logger_(config.logger), | ||
| runtime_id_(config.runtime_id ? *config.runtime_id | ||
| : RuntimeID::generate()), | ||
| signature_{runtime_id_, config.defaults.service, | ||
| config.defaults.environment}, | ||
| signature_{runtime_id_, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I agree one should generalize the usage of braces initialization calls, but here I think we should favor consistency with existing code
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. up |
||
| root_session_id::get_or_init( | ||
| config.root_session_id.value_or(runtime_id_.string())), | ||
| config.defaults.service, config.defaults.environment}, | ||
| config_manager_(std::make_shared<ConfigManager>(config)), | ||
| collector_(/* see constructor body */), | ||
| span_sampler_( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we should have the same order for the fields in
TracerConfigandFinalizedTracerConfig.