Skip to content

Commit

Permalink
fix typo in type alias
Browse files Browse the repository at this point in the history
Signed-off-by: thomas.ebner <[email protected]>
  • Loading branch information
samohte committed Mar 6, 2024
1 parent 9c6dd3d commit d88466a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/extensions/tracers/opentelemetry/otlp_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using OTelAttribute = ::opentelemetry::common::AttributeValue;
/**
* @brief Container holding Open-telemetry Attributes
*/
using OtelAttibutes = std::map<std::string, OTelAttribute>;
using OtelAttributes = std::map<std::string, OTelAttribute>;

/**
* Contains utility functions for Otel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class DynatraceTag {
};

// add Dynatrace specific span attributes
void addSamplingAttributes(uint32_t sampling_exponent, OtelAttibutes& attributes) {
void addSamplingAttributes(uint32_t sampling_exponent, OtelAttributes& attributes) {

const auto multiplicity = SamplingState::toMultiplicity(sampling_exponent);
// The denominator of the sampling ratio. If, for example, the Dynatrace OneAgent samples with a
Expand Down Expand Up @@ -128,7 +128,7 @@ SamplingResult DynatraceSampler::shouldSample(const absl::optional<SpanContext>
const std::vector<SpanContext>& /*links*/) {

SamplingResult result;
OtelAttibutes att;
OtelAttributes att;

// trace_context->path() returns path and query. query part is removed in getSamplingKey()
const std::string sampling_key =
Expand Down Expand Up @@ -174,7 +174,7 @@ SamplingResult DynatraceSampler::shouldSample(const absl::optional<SpanContext>
}

if (!att.empty()) {
result.attributes = std::make_unique<const OtelAttibutes>(std::move(att));
result.attributes = std::make_unique<const OtelAttributes>(std::move(att));
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/tracers/opentelemetry/samplers/sampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct SamplingResult {
/// @see Decision
Decision decision;
// A set of span Attributes that will also be added to the Span. Can be nullptr.
std::unique_ptr<const OtelAttibutes> attributes;
std::unique_ptr<const OtelAttributes> attributes;
// A Tracestate that will be associated with the Span. If the sampler
// returns an empty Tracestate here, the Tracestate will be cleared, so samplers SHOULD normally
// return the passed-in Tracestate if they do not intend to change it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ TEST_F(SamplerFactoryTest, TestWithSampler) {
const std::vector<SpanContext>&) {
SamplingResult res;
res.decision = Decision::Drop;
OtelAttibutes attributes;
OtelAttributes attributes;
attributes["char_key"] = "char_value";
attributes["sv_key"] = absl::string_view("sv_value");
attributes["bool_key"] = true;
Expand All @@ -176,7 +176,7 @@ TEST_F(SamplerFactoryTest, TestWithSampler) {
attributes["double_key"] = 0.123;
attributes["not_supported_span"] = opentelemetry::nostd::span<bool>();

res.attributes = std::make_unique<const OtelAttibutes>(std::move(attributes));
res.attributes = std::make_unique<const OtelAttributes>(std::move(attributes));
res.tracestate = "this_is=another_tracesate";
return res;
});
Expand Down

0 comments on commit d88466a

Please sign in to comment.