diff --git a/api/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto b/api/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto index cf93ab04ed8f..c86f82d3e4c6 100644 --- a/api/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto +++ b/api/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto @@ -16,7 +16,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#extension: envoy.tracers.opentelemetry.samplers.dynatrace] message DynatraceSamplerConfig { - string tenant_id = 1; + string tenant = 1; string cluster_id = 2; diff --git a/source/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler.cc b/source/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler.cc index d74256b0ad38..3191f89c0180 100644 --- a/source/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler.cc +++ b/source/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler.cc @@ -53,7 +53,7 @@ DynatraceSampler::DynatraceSampler( const envoy::extensions::tracers::opentelemetry::samplers::v3::DynatraceSamplerConfig& config, Server::Configuration::TracerFactoryContext& context, SamplerConfigFetcherPtr sampler_config_fetcher) - : dt_tracestate_key_(absl::StrCat(calculateTenantId(config.tenant_id()), "-", + : dt_tracestate_key_(absl::StrCat(calculateTenantId(config.tenant()), "-", absl::string_view(config.cluster_id()), "@dt")), sampling_controller_(std::move(sampler_config_fetcher)) { diff --git a/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_integration_test.cc b/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_integration_test.cc index 7664e50e1dbc..163d95e3310b 100644 --- a/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_integration_test.cc +++ b/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_integration_test.cc @@ -37,7 +37,7 @@ class DynatraceSamplerIntegrationTest : public Envoy::HttpIntegrationTest, name: envoy.tracers.opentelemetry.samplers.dynatrace typed_config: "@type": type.googleapis.com/envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig - tenant_id: "abc12345" + tenant: "abc12345" cluster_id: "980df25c" )EOF"; diff --git a/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_test.cc b/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_test.cc index 29982fc594b7..8d98000ab207 100644 --- a/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_test.cc +++ b/test/extensions/tracers/opentelemetry/samplers/dynatrace/dynatrace_sampler_test.cc @@ -42,7 +42,7 @@ class MockSamplerConfigFetcher : public SamplerConfigFetcher { class DynatraceSamplerTest : public testing::Test { const std::string yaml_string_ = R"EOF( - tenant_id: "abc12345" + tenant: "abc12345" cluster_id: "980df25c" )EOF";