diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h index d4898d0345..41ab741c1c 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h @@ -65,9 +65,9 @@ template SpanType *new_span(TracerType *objPtr, nostd::string_view name, const opentelemetry::trace::StartSpanOptions &options, - std::unique_ptr span_context) + std::unique_ptr spanContext) { - return new (std::nothrow) SpanType{*objPtr, name, options, std::move(span_context)}; + return new (std::nothrow) SpanType{*objPtr, name, options, std::move(spanContext)}; } /** @@ -419,22 +419,22 @@ class Tracer : public opentelemetry::trace::Tracer, auto traceId = parentContext.IsValid() ? parentContext.trace_id() : traceId_; // Sampling based on attributes is not supported for now, so passing empty below. - std::map empty_attributes = {{}}; + std::map emptyAttributes = {{}}; opentelemetry::sdk::trace::SamplingResult sampling_result = GetSampler(tracerProvider_) .ShouldSample(parentContext, traceId, name, options.kind, opentelemetry::common::KeyValueIterableView>( - empty_attributes), + emptyAttributes), links); - opentelemetry::trace::TraceFlags trace_flags = + opentelemetry::trace::TraceFlags traceFlags = sampling_result.decision == opentelemetry::sdk::trace::Decision::DROP ? opentelemetry::trace::TraceFlags{} : opentelemetry::trace::TraceFlags{opentelemetry::trace::TraceFlags::kIsSampled}; auto spanContext = std::unique_ptr(new opentelemetry::trace::SpanContext( - traceId, GetIdGenerator(tracerProvider_).GenerateSpanId(), trace_flags, false, + traceId, GetIdGenerator(tracerProvider_).GenerateSpanId(), traceFlags, false, sampling_result.trace_state ? sampling_result.trace_state : parentContext.IsValid() ? parentContext.trace_state() @@ -442,9 +442,9 @@ class Tracer : public opentelemetry::trace::Tracer, if (sampling_result.decision == sdk::trace::Decision::DROP) { - auto noop_span = nostd::shared_ptr{ + auto noopSpan = nostd::shared_ptr{ new (std::nothrow) trace::NoopSpan(this->shared_from_this(), std::move(spanContext))}; - return noop_span; + return noopSpan; } // Populate Etw.RelatedActivityId at envelope level if enabled @@ -764,12 +764,12 @@ class Span : public opentelemetry::trace::Span Span(Tracer &owner, nostd::string_view name, const opentelemetry::trace::StartSpanOptions &options, - std::unique_ptr span_context, + std::unique_ptr spanContext, Span *parent = nullptr) noexcept : opentelemetry::trace::Span(), start_time_(std::chrono::system_clock::now()), owner_(owner), - context_(std::move(span_context)), + context_(std::move(spanContext)), parent_(parent) { name_ = name;