From d91e5bac17732b7c233defe789b26c474f66be0b Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 5 Dec 2023 13:46:01 -0800 Subject: [PATCH] [BUILD] Use fully qualified references to trace/common namespace (#2424) --- .../trace/span_context_kv_iterable_view.h | 2 +- .../opentelemetry/exporters/etw/etw_logger.h | 13 ++-- .../exporters/etw/etw_properties.h | 62 +++++++-------- .../exporters/etw/etw_provider.h | 2 +- .../opentelemetry/exporters/etw/etw_tracer.h | 77 ++++++++++--------- .../exporters/otlp/otlp_recordable.h | 13 ++-- .../exporters/zipkin/recordable.h | 10 +-- .../sdk/common/global_log_handler.h | 6 +- .../instrumentation_scope.h | 3 +- .../sdk/logs/batch_log_record_processor.h | 2 +- .../exemplar/fixed_size_exemplar_reservoir.h | 4 +- .../exemplar/histogram_exemplar_reservoir.h | 2 +- .../sdk/metrics/exemplar/reservoir.h | 2 +- .../sdk/metrics/state/attributes_hashmap.h | 2 +- .../sdk/trace/batch_span_processor.h | 2 +- .../opentelemetry/sdk/trace/span_data.h | 15 ++-- sdk/src/trace/span.h | 2 +- 17 files changed, 116 insertions(+), 103 deletions(-) diff --git a/api/include/opentelemetry/trace/span_context_kv_iterable_view.h b/api/include/opentelemetry/trace/span_context_kv_iterable_view.h index 6a21aaf54a..8c4584dc2e 100644 --- a/api/include/opentelemetry/trace/span_context_kv_iterable_view.h +++ b/api/include/opentelemetry/trace/span_context_kv_iterable_view.h @@ -24,7 +24,7 @@ namespace trace namespace detail { template -inline void take_span_context_kv(SpanContext, common::KeyValueIterableView) +inline void take_span_context_kv(SpanContext, opentelemetry::common::KeyValueIterableView) {} template ::value> * = nullptr> diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_logger.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_logger.h index 819caf7105..494211ea0b 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_logger.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_logger.h @@ -229,7 +229,7 @@ class Logger : public opentelemetry::logs::Logger opentelemetry::trace::TraceId trace_id, opentelemetry::trace::SpanId span_id, opentelemetry::trace::TraceFlags trace_flags, - common::SystemTimestamp timestamp) noexcept + opentelemetry::common::SystemTimestamp timestamp) noexcept { UNREFERENCED_PARAMETER(trace_flags); @@ -358,11 +358,12 @@ class LoggerProvider : public opentelemetry::logs::LoggerProvider } nostd::shared_ptr GetLogger( - nostd::string_view logger_name, - nostd::string_view library_name, - nostd::string_view version = "", - nostd::string_view schema_url = "", - const common::KeyValueIterable &attributes = common::NoopKeyValueIterable()) override + opentelemetry::nostd::string_view logger_name, + opentelemetry::nostd::string_view library_name, + opentelemetry::nostd::string_view version = "", + opentelemetry::nostd::string_view schema_url = "", + const opentelemetry::common::KeyValueIterable &attributes = + opentelemetry::common::NoopKeyValueIterable()) override { UNREFERENCED_PARAMETER(library_name); UNREFERENCED_PARAMETER(version); diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h index 3cf365c8a0..f35b5f11b4 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h @@ -195,67 +195,67 @@ class PropertyValue : public PropertyVariant * @brief Convert non-owning common::AttributeValue to owning PropertyValue. * @return */ - PropertyValue &FromAttributeValue(const common::AttributeValue &v) + PropertyValue &FromAttributeValue(const opentelemetry::common::AttributeValue &v) { switch (v.index()) { - case common::AttributeType::kTypeBool: + case opentelemetry::common::AttributeType::kTypeBool: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeInt: + case opentelemetry::common::AttributeType::kTypeInt: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeInt64: + case opentelemetry::common::AttributeType::kTypeInt64: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeUInt: + case opentelemetry::common::AttributeType::kTypeUInt: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeUInt64: + case opentelemetry::common::AttributeType::kTypeUInt64: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeDouble: + case opentelemetry::common::AttributeType::kTypeDouble: PropertyVariant::operator=(nostd::get(v)); break; - case common::AttributeType::kTypeCString: { + case opentelemetry::common::AttributeType::kTypeCString: { PropertyVariant::operator=(nostd::get(v)); break; } - case common::AttributeType::kTypeString: { + case opentelemetry::common::AttributeType::kTypeString: { PropertyVariant::operator= (std::string{nostd::string_view(nostd::get(v)).data()}); break; } - case common::AttributeType::kTypeSpanByte: + case opentelemetry::common::AttributeType::kTypeSpanByte: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanBool: + case opentelemetry::common::AttributeType::kTypeSpanBool: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanInt: + case opentelemetry::common::AttributeType::kTypeSpanInt: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanInt64: + case opentelemetry::common::AttributeType::kTypeSpanInt64: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanUInt: + case opentelemetry::common::AttributeType::kTypeSpanUInt: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanUInt64: + case opentelemetry::common::AttributeType::kTypeSpanUInt64: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanDouble: + case opentelemetry::common::AttributeType::kTypeSpanDouble: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; - case common::AttributeType::kTypeSpanString: + case opentelemetry::common::AttributeType::kTypeSpanString: PropertyVariant::operator=(to_vector(nostd::get>(v))); break; @@ -269,9 +269,9 @@ class PropertyValue : public PropertyVariant * @brief Convert owning PropertyValue to non-owning common::AttributeValue * @param other */ - common::AttributeValue ToAttributeValue() const + opentelemetry::common::AttributeValue ToAttributeValue() const { - common::AttributeValue value; + opentelemetry::common::AttributeValue value; switch (this->index()) { @@ -353,7 +353,7 @@ using PropertyValueMap = std::map; /** * @brief Map of PropertyValue with common::KeyValueIterable interface. */ -class Properties : public common::KeyValueIterable, public PropertyValueMap +class Properties : public opentelemetry::common::KeyValueIterable, public PropertyValueMap { /** @@ -404,19 +404,20 @@ class Properties : public common::KeyValueIterable, public PropertyValueMap * container. * */ - Properties(const common::KeyValueIterable &other) { (*this) = other; } + Properties(const opentelemetry::common::KeyValueIterable &other) { (*this) = other; } /** * @brief PropertyValueMap assignment operator. */ - Properties &operator=(const common::KeyValueIterable &other) + Properties &operator=(const opentelemetry::common::KeyValueIterable &other) { clear(); - other.ForEachKeyValue([&](nostd::string_view key, common::AttributeValue value) noexcept { - std::string k(key.data(), key.length()); - (*this)[k].FromAttributeValue(value); - return true; - }); + other.ForEachKeyValue( + [&](nostd::string_view key, opentelemetry::common::AttributeValue value) noexcept { + std::string k(key.data(), key.length()); + (*this)[k].FromAttributeValue(value); + return true; + }); return (*this); } @@ -431,12 +432,13 @@ class Properties : public common::KeyValueIterable, public PropertyValueMap * the iteration is aborted. * @return true if every key-value pair was iterated over */ - bool ForEachKeyValue(nostd::function_ref - callback) const noexcept override + bool ForEachKeyValue( + nostd::function_ref callback) + const noexcept override { for (const auto &kv : (*this)) { - const common::AttributeValue &value = kv.second.ToAttributeValue(); + const opentelemetry::common::AttributeValue &value = kv.second.ToAttributeValue(); if (!callback(nostd::string_view{kv.first}, value)) { return false; diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_provider.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_provider.h index 51cca03a60..4d7e37a98c 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_provider.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_provider.h @@ -344,7 +344,7 @@ class ETWProvider } # if HAVE_TYPE_GUID // TODO: consider adding UUID/GUID to spec - case common::AttributeType::TYPE_GUID: { + case opentelemetry::common::AttributeType::TYPE_GUID: { auto temp = nostd::get(value); // TODO: add transform from GUID type to string? jObj[name] = temp; diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h index 6601f850df..454f6cff5a 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h @@ -107,7 +107,7 @@ std::string GetName(T &t) * @return Span Start timestamp */ template -common::SystemTimestamp GetStartTime(T &t) +opentelemetry::common::SystemTimestamp GetStartTime(T &t) { return t.GetStartTime(); } @@ -119,7 +119,7 @@ common::SystemTimestamp GetStartTime(T &t) * @return Span Stop timestamp */ template -common::SystemTimestamp GetEndTime(T &t) +opentelemetry::common::SystemTimestamp GetEndTime(T &t) { return t.GetEndTime(); } @@ -161,7 +161,7 @@ void UpdateStatus(T &t, Properties &props) */ class Tracer : public opentelemetry::trace::Tracer, - public std::enable_shared_from_this + public std::enable_shared_from_this { /** @@ -214,16 +214,16 @@ class Tracer : public opentelemetry::trace::Tracer, { size_t idx = 0; std::string linksValue; - links.ForEachKeyValue( - [&](opentelemetry::trace::SpanContext ctx, const common::KeyValueIterable &) { - if (!linksValue.empty()) - { - linksValue += ','; - linksValue += ToLowerBase16(ctx.span_id()); - } - idx++; - return true; - }); + links.ForEachKeyValue([&](opentelemetry::trace::SpanContext ctx, + const opentelemetry::common::KeyValueIterable &) { + if (!linksValue.empty()) + { + linksValue += ','; + linksValue += ToLowerBase16(ctx.span_id()); + } + idx++; + return true; + }); attributes[ETW_FIELD_SPAN_LINKS] = linksValue; } } @@ -414,7 +414,7 @@ class Tracer : public opentelemetry::trace::Tracer, */ nostd::shared_ptr StartSpan( nostd::string_view name, - const common::KeyValueIterable &attributes, + const opentelemetry::common::KeyValueIterable &attributes, const opentelemetry::trace::SpanContextKeyValueIterable &links, const opentelemetry::trace::StartSpanOptions &options = {}) noexcept override { @@ -425,8 +425,9 @@ class Tracer : public opentelemetry::trace::Tracer, Properties evtCopy = attributes; return StartSpan(name, evtCopy, links, options); #else // OPENTELEMETRY_RTTI_ENABLED is defined - common::KeyValueIterable &attribs = const_cast(attributes); - Properties *evt = dynamic_cast(&attribs); + opentelemetry::common::KeyValueIterable &attribs = + const_cast(attributes); + Properties *evt = dynamic_cast(&attribs); if (evt != nullptr) { // Pass as a reference to original modifyable collection without creating a copy @@ -491,8 +492,9 @@ class Tracer : public opentelemetry::trace::Tracer, if (sampling_result.decision == sdk::trace::Decision::DROP) { - auto noopSpan = nostd::shared_ptr{ - new (std::nothrow) trace::NoopSpan(this->shared_from_this(), std::move(spanContext))}; + auto noopSpan = nostd::shared_ptr{ + new (std::nothrow) + opentelemetry::trace::NoopSpan(this->shared_from_this(), std::move(spanContext))}; return noopSpan; } @@ -602,9 +604,9 @@ class Tracer : public opentelemetry::trace::Tracer, * @return */ void AddEvent(opentelemetry::trace::Span &span, - nostd::string_view name, - common::SystemTimestamp timestamp, - const common::KeyValueIterable &attributes) noexcept + opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp, + const opentelemetry::common::KeyValueIterable &attributes) noexcept { // If RTTI is enabled by compiler, the below code modifies the attributes object passed as arg, // which is sometime not desirable, set OPENTELEMETRY_NOT_USE_RTTI in application @@ -614,8 +616,9 @@ class Tracer : public opentelemetry::trace::Tracer, Properties evtCopy = attributes; return AddEvent(span, name, timestamp, evtCopy); #else // OPENTELEMETRY_RTTI_ENABLED is defined - common::KeyValueIterable &attribs = const_cast(attributes); - Properties *evt = dynamic_cast(&attribs); + opentelemetry::common::KeyValueIterable &attribs = + const_cast(attributes); + Properties *evt = dynamic_cast(&attribs); if (evt != nullptr) { // Pass as a reference to original modifyable collection without creating a copy @@ -635,8 +638,8 @@ class Tracer : public opentelemetry::trace::Tracer, * @return */ void AddEvent(opentelemetry::trace::Span &span, - nostd::string_view name, - common::SystemTimestamp timestamp, + opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp, Properties &evt) noexcept { // TODO: respect originating timestamp. Do we need to reserve @@ -693,8 +696,8 @@ class Tracer : public opentelemetry::trace::Tracer, * @return */ void AddEvent(opentelemetry::trace::Span &span, - nostd::string_view name, - common::SystemTimestamp timestamp) noexcept + opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp) noexcept { AddEvent(span, name, timestamp, sdk::GetEmptyAttributes()); } @@ -728,8 +731,8 @@ class Span : public opentelemetry::trace::Span */ Properties attributes_; - common::SystemTimestamp start_time_; - common::SystemTimestamp end_time_; + opentelemetry::common::SystemTimestamp start_time_; + opentelemetry::common::SystemTimestamp end_time_; opentelemetry::trace::StatusCode status_code_{opentelemetry::trace::StatusCode::kUnset}; std::string status_description_; @@ -794,13 +797,13 @@ class Span : public opentelemetry::trace::Span * @brief Get start time of this Span. * @return */ - common::SystemTimestamp GetStartTime() { return start_time_; } + opentelemetry::common::SystemTimestamp GetStartTime() { return start_time_; } /** * @brief Get end time of this Span. * @return */ - common::SystemTimestamp GetEndTime() { return end_time_; } + opentelemetry::common::SystemTimestamp GetEndTime() { return end_time_; } /** * @brief Get Span Name. @@ -849,7 +852,8 @@ class Span : public opentelemetry::trace::Span * @param timestamp * @return */ - void AddEvent(nostd::string_view name, common::SystemTimestamp timestamp) noexcept override + void AddEvent(nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp) noexcept override { owner_.AddEvent(*this, name, timestamp); } @@ -861,9 +865,9 @@ class Span : public opentelemetry::trace::Span * @param attributes Event attributes. * @return */ - void AddEvent(nostd::string_view name, - common::SystemTimestamp timestamp, - const common::KeyValueIterable &attributes) noexcept override + void AddEvent(opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp, + const opentelemetry::common::KeyValueIterable &attributes) noexcept override { owner_.AddEvent(*this, name, timestamp, attributes); } @@ -901,7 +905,8 @@ class Span : public opentelemetry::trace::Span * @param value * @return */ - void SetAttribute(nostd::string_view key, const common::AttributeValue &value) noexcept override + void SetAttribute(nostd::string_view key, + const opentelemetry::common::AttributeValue &value) noexcept override { // don't override fields propagated from span data. if (key == ETW_FIELD_NAME || key == ETW_FIELD_SPAN_ID || key == ETW_FIELD_TRACE_ID || diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_recordable.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_recordable.h index bc505a959b..76e8856330 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_recordable.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_recordable.h @@ -38,17 +38,18 @@ class OtlpRecordable final : public opentelemetry::sdk::trace::Recordable void SetIdentity(const opentelemetry::trace::SpanContext &span_context, opentelemetry::trace::SpanId parent_span_id) noexcept override; - void SetAttribute(nostd::string_view key, + void SetAttribute(opentelemetry::nostd::string_view key, const opentelemetry::common::AttributeValue &value) noexcept override; - void AddEvent(nostd::string_view name, - common::SystemTimestamp timestamp, - const common::KeyValueIterable &attributes) noexcept override; + void AddEvent(opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp, + const opentelemetry::common::KeyValueIterable &attributes) noexcept override; void AddLink(const opentelemetry::trace::SpanContext &span_context, - const common::KeyValueIterable &attributes) noexcept override; + const opentelemetry::common::KeyValueIterable &attributes) noexcept override; - void SetStatus(trace::StatusCode code, nostd::string_view description) noexcept override; + void SetStatus(opentelemetry::trace::StatusCode code, + nostd::string_view description) noexcept override; void SetName(nostd::string_view name) noexcept override; diff --git a/exporters/zipkin/include/opentelemetry/exporters/zipkin/recordable.h b/exporters/zipkin/include/opentelemetry/exporters/zipkin/recordable.h index 78079adee7..64894082fd 100644 --- a/exporters/zipkin/include/opentelemetry/exporters/zipkin/recordable.h +++ b/exporters/zipkin/include/opentelemetry/exporters/zipkin/recordable.h @@ -24,15 +24,15 @@ class Recordable final : public sdk::trace::Recordable void SetIdentity(const opentelemetry::trace::SpanContext &span_context, opentelemetry::trace::SpanId parent_span_id) noexcept override; - void SetAttribute(nostd::string_view key, + void SetAttribute(opentelemetry::nostd::string_view key, const opentelemetry::common::AttributeValue &value) noexcept override; - void AddEvent(nostd::string_view name, - common::SystemTimestamp timestamp, - const common::KeyValueIterable &attributes) noexcept override; + void AddEvent(opentelemetry::nostd::string_view name, + opentelemetry::common::SystemTimestamp timestamp, + const opentelemetry::common::KeyValueIterable &attributes) noexcept override; void AddLink(const opentelemetry::trace::SpanContext &span_context, - const common::KeyValueIterable &attributes) noexcept override; + const opentelemetry::common::KeyValueIterable &attributes) noexcept override; void SetStatus(opentelemetry::trace::StatusCode code, nostd::string_view description) noexcept override; diff --git a/sdk/include/opentelemetry/sdk/common/global_log_handler.h b/sdk/include/opentelemetry/sdk/common/global_log_handler.h index a36bd4a8a3..14c956b96e 100644 --- a/sdk/include/opentelemetry/sdk/common/global_log_handler.h +++ b/sdk/include/opentelemetry/sdk/common/global_log_handler.h @@ -60,7 +60,7 @@ class LogHandler const char *file, int line, const char *msg, - const sdk::common::AttributeMap &attributes) noexcept = 0; + const opentelemetry::sdk::common::AttributeMap &attributes) noexcept = 0; }; class DefaultLogHandler : public LogHandler @@ -70,7 +70,7 @@ class DefaultLogHandler : public LogHandler const char *file, int line, const char *msg, - const sdk::common::AttributeMap &attributes) noexcept override; + const opentelemetry::sdk::common::AttributeMap &attributes) noexcept override; }; class NoopLogHandler : public LogHandler @@ -80,7 +80,7 @@ class NoopLogHandler : public LogHandler const char *file, int line, const char *msg, - const sdk::common::AttributeMap &error_attributes) noexcept override; + const opentelemetry::sdk::common::AttributeMap &error_attributes) noexcept override; }; /** diff --git a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h index 9bae218ba4..35b0dc6863 100644 --- a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h +++ b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h @@ -129,7 +129,8 @@ class InstrumentationScope void SetAttribute(nostd::string_view key, const opentelemetry::common::AttributeValue &value) noexcept { - attributes_[std::string(key)] = nostd::visit(common::AttributeConverter(), value); + attributes_[std::string(key)] = + nostd::visit(opentelemetry::sdk::common::AttributeConverter(), value); } private: diff --git a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h index d0b3577491..e93ebf3d6b 100644 --- a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h +++ b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h @@ -143,7 +143,7 @@ class BatchLogRecordProcessor : public LogRecordProcessor const std::chrono::milliseconds scheduled_delay_millis_; const size_t max_export_batch_size_; /* The buffer/queue to which the ended logs are added */ - common::CircularBuffer buffer_; + opentelemetry::sdk::common::CircularBuffer buffer_; std::shared_ptr synchronization_data_; diff --git a/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h b/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h index 76f5742ca2..509b2affce 100644 --- a/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h +++ b/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h @@ -27,7 +27,7 @@ class FixedSizeExemplarReservoir : public ExemplarReservoir FixedSizeExemplarReservoir(size_t size, std::shared_ptr reservoir_cell_selector, std::shared_ptr (ReservoirCell::*map_and_reset_cell)( - const common::OrderedAttributeMap &attributes)) + const opentelemetry::sdk::common::OrderedAttributeMap &attributes)) : storage_(size), reservoir_cell_selector_(reservoir_cell_selector), map_and_reset_cell_(map_and_reset_cell) @@ -96,7 +96,7 @@ class FixedSizeExemplarReservoir : public ExemplarReservoir std::vector storage_; std::shared_ptr reservoir_cell_selector_; std::shared_ptr (ReservoirCell::*map_and_reset_cell_)( - const common::OrderedAttributeMap &attributes); + const opentelemetry::sdk::common::OrderedAttributeMap &attributes); }; } // namespace metrics diff --git a/sdk/include/opentelemetry/sdk/metrics/exemplar/histogram_exemplar_reservoir.h b/sdk/include/opentelemetry/sdk/metrics/exemplar/histogram_exemplar_reservoir.h index bbc032df3b..6f9bf803f0 100644 --- a/sdk/include/opentelemetry/sdk/metrics/exemplar/histogram_exemplar_reservoir.h +++ b/sdk/include/opentelemetry/sdk/metrics/exemplar/histogram_exemplar_reservoir.h @@ -42,7 +42,7 @@ class HistogramExemplarReservoir : public FixedSizeExemplarReservoir HistogramExemplarReservoir(size_t size, std::shared_ptr reservoir_cell_selector, std::shared_ptr (ReservoirCell::*map_and_reset_cell)( - const common::OrderedAttributeMap &attributes)) + const opentelemetry::sdk::common::OrderedAttributeMap &attributes)) : FixedSizeExemplarReservoir(size, reservoir_cell_selector, map_and_reset_cell) {} diff --git a/sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h b/sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h index 258e099f0f..3187e0da26 100644 --- a/sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h +++ b/sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h @@ -72,7 +72,7 @@ class ExemplarReservoir size_t size, std::shared_ptr reservoir_cell_selector, std::shared_ptr (ReservoirCell::*map_and_reset_cell)( - const common::OrderedAttributeMap &attributes)); + const opentelemetry::sdk::common::OrderedAttributeMap &attributes)); static nostd::shared_ptr GetNoExemplarReservoir(); }; diff --git a/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h b/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h index 85009a9fcb..8dd820fd95 100644 --- a/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h +++ b/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h @@ -28,7 +28,7 @@ const std::string kAggregationCardinalityLimitOverflowError = "Maximum data points for metric stream exceeded. Entry added to overflow"; const std::string kAttributesLimitOverflowKey = "otel.metrics.overflow"; const bool kAttributesLimitOverflowValue = true; -const size_t kOverflowAttributesHash = common::GetHashForAttributeMap( +const size_t kOverflowAttributesHash = opentelemetry::sdk::common::GetHashForAttributeMap( {{kAttributesLimitOverflowKey, kAttributesLimitOverflowValue}}); // precalculated for optimization diff --git a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h index b93631eafa..a748b06361 100644 --- a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h +++ b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h @@ -143,7 +143,7 @@ class BatchSpanProcessor : public SpanProcessor const size_t max_export_batch_size_; /* The buffer/queue to which the ended spans are added */ - common::CircularBuffer buffer_; + opentelemetry::sdk::common::CircularBuffer buffer_; std::shared_ptr synchronization_data_; diff --git a/sdk/include/opentelemetry/sdk/trace/span_data.h b/sdk/include/opentelemetry/sdk/trace/span_data.h index 4e1a52ce5d..ef2c57a092 100644 --- a/sdk/include/opentelemetry/sdk/trace/span_data.h +++ b/sdk/include/opentelemetry/sdk/trace/span_data.h @@ -55,7 +55,8 @@ class SpanDataEvent * Get the attributes for this event * @return the attributes for this event */ - const std::unordered_map &GetAttributes() const noexcept + const std::unordered_map + &GetAttributes() const noexcept { return attribute_map_.GetAttributes(); } @@ -63,7 +64,7 @@ class SpanDataEvent private: std::string name_; opentelemetry::common::SystemTimestamp timestamp_; - common::AttributeMap attribute_map_; + opentelemetry::sdk::common::AttributeMap attribute_map_; }; /** @@ -81,7 +82,8 @@ class SpanDataLink * Get the attributes for this link * @return the attributes for this link */ - const std::unordered_map &GetAttributes() const noexcept + const std::unordered_map + &GetAttributes() const noexcept { return attribute_map_.GetAttributes(); } @@ -94,7 +96,7 @@ class SpanDataLink private: opentelemetry::trace::SpanContext span_context_; - common::AttributeMap attribute_map_; + opentelemetry::sdk::common::AttributeMap attribute_map_; }; /** @@ -210,7 +212,8 @@ class SpanData final : public Recordable * Get the attributes for this span * @return the attributes for this span */ - const std::unordered_map &GetAttributes() const noexcept + const std::unordered_map + &GetAttributes() const noexcept { return attribute_map_.GetAttributes(); } @@ -300,7 +303,7 @@ class SpanData final : public Recordable std::string name_; opentelemetry::trace::StatusCode status_code_{opentelemetry::trace::StatusCode::kUnset}; std::string status_desc_; - common::AttributeMap attribute_map_; + opentelemetry::sdk::common::AttributeMap attribute_map_; std::vector events_; std::vector links_; opentelemetry::trace::SpanKind span_kind_{opentelemetry::trace::SpanKind::kInternal}; diff --git a/sdk/src/trace/span.h b/sdk/src/trace/span.h index eb603b9025..7fe86bd3f5 100644 --- a/sdk/src/trace/span.h +++ b/sdk/src/trace/span.h @@ -26,7 +26,7 @@ class Span final : public opentelemetry::trace::Span ~Span() override; - // trace::Span + // opentelemetry::trace::Span void SetAttribute(nostd::string_view key, const opentelemetry::common::AttributeValue &value) noexcept override;