Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ message DynatraceSamplerConfig {
string tenant = 1;

// The id of the Dynatrace cluster which the spans are reported to.
string cluster_id = 2;
int32 cluster_id = 2;

// The HTTP URI to fetch the sampler configuration (root spans per minute). For example:
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ DynatraceSampler::DynatraceSampler(
Server::Configuration::TracerFactoryContext& context,
SamplerConfigFetcherPtr sampler_config_fetcher)
: dt_tracestate_key_(absl::StrCat(calculateTenantId(config.tenant()), "-",
absl::string_view(config.cluster_id()), "@dt")),
absl::Hex(config.cluster_id()), "@dt")),
sampling_controller_(std::move(sampler_config_fetcher)) {

timer_ = context.serverFactoryContext().mainThreadDispatcher().createTimer([this]() -> void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DynatraceSamplerIntegrationTest : public Envoy::HttpIntegrationTest,
typed_config:
"@type": type.googleapis.com/envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig
tenant: "abc12345"
cluster_id: "980df25c"
cluster_id: -1743916452
)EOF";

auto tracing_config =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DynatraceSamplerTest : public testing::Test {

const std::string yaml_string_ = R"EOF(
tenant: "abc12345"
cluster_id: "980df25c"
cluster_id: -1743916452
)EOF";

public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SamplerConfigFetcherTest : public testing::Test {

const std::string yaml_string = R"EOF(
tenant: "abc12345"
cluster_id: "980df25c"
cluster_id: -1743916452
token: "tokenval"
http_uri:
cluster: "cluster_name"
Expand Down