diff --git a/api/include/opentelemetry/common/attribute_value.h b/api/include/opentelemetry/common/attribute_value.h index af4cc83d42..cf4105ea3b 100644 --- a/api/include/opentelemetry/common/attribute_value.h +++ b/api/include/opentelemetry/common/attribute_value.h @@ -23,7 +23,8 @@ namespace common /// (IEEE 754-1985) or signed 64 bit integer. /// - Homogenous arrays of primitive type values. /// -/// \warning +/// \warning The OpenTelemetry C++ API does not support the following attribute: +/// uint64_t, nostd::span, and nostd::span types. /// \parblock The OpenTelemetry C++ API currently supports several attribute /// value types that are not covered by the OpenTelemetry specification: /// - \c uint64_t diff --git a/api/include/opentelemetry/common/key_value_iterable.h b/api/include/opentelemetry/common/key_value_iterable.h index 9d43e1571b..4d191b07b7 100644 --- a/api/include/opentelemetry/common/key_value_iterable.h +++ b/api/include/opentelemetry/common/key_value_iterable.h @@ -43,13 +43,12 @@ class NoopKeyValueIterable : public KeyValueIterable ~NoopKeyValueIterable() override = default; /** - * Iterate over key-value pairs - * @param callback a callback to invoke for each key-value. If the callback returns false, - * the iteration is aborted. - * @return true if every key-value pair was iterated over + * No-op implementation: does not invoke the callback, even if key-value pairs are present. + * @return true without iterating or invoking the callback */ bool ForEachKeyValue( - nostd::function_ref) const noexcept override + nostd::function_ref /*callback*/) + const noexcept override { return true; } diff --git a/api/include/opentelemetry/common/key_value_iterable_view.h b/api/include/opentelemetry/common/key_value_iterable_view.h index e22fb6f06f..a8fe310321 100644 --- a/api/include/opentelemetry/common/key_value_iterable_view.h +++ b/api/include/opentelemetry/common/key_value_iterable_view.h @@ -91,7 +91,7 @@ KeyValueIterableView MakeKeyValueIterableView(const T &container) noexcept /** * Utility function to help to make a attribute view from initializer_list * - * @param attributes + * @param attributes The initializer_list of key-value pairs * @return nostd::span> */ inline static nostd::span> @@ -105,7 +105,7 @@ MakeAttributes(std::initializer_list> */ inline static nostd::span> @@ -118,7 +118,7 @@ MakeAttributes( /** * Utility function to help to make a attribute view from a KeyValueIterable * - * @param attributes + * @param attributes The KeyValueIterable of key-value pairs * @return common::KeyValueIterable */ inline static const common::KeyValueIterable &MakeAttributes( @@ -130,16 +130,17 @@ inline static const common::KeyValueIterable &MakeAttributes( /** * Utility function to help to make a attribute view from a key-value iterable object * - * @param attributes + * @tparam ArgumentType Expected to be ArgumentType + * @param attributes The key-value iterable object * @return nostd::span> */ template < class ArgumentType, nostd::enable_if_t::value> * = nullptr> inline static common::KeyValueIterableView MakeAttributes( - const ArgumentType &arg) noexcept + const ArgumentType &attributes) noexcept { - return common::KeyValueIterableView(arg); + return common::KeyValueIterableView(attributes); } } // namespace common diff --git a/api/include/opentelemetry/context/runtime_context.h b/api/include/opentelemetry/context/runtime_context.h index e3f88254cb..606cd79690 100644 --- a/api/include/opentelemetry/context/runtime_context.h +++ b/api/include/opentelemetry/context/runtime_context.h @@ -56,7 +56,7 @@ class OPENTELEMETRY_EXPORT RuntimeContextStorage /** * Set the current context. - * @param the new current context + * @param context The new current context * @return a token for the new current context. This never returns a nullptr. */ virtual nostd::unique_ptr Attach(const Context &context) noexcept = 0; diff --git a/api/include/opentelemetry/logs/event_logger.h b/api/include/opentelemetry/logs/event_logger.h index bcc1035625..929e97cc2c 100644 --- a/api/include/opentelemetry/logs/event_logger.h +++ b/api/include/opentelemetry/logs/event_logger.h @@ -42,7 +42,7 @@ class OPENTELEMETRY_DEPRECATED EventLogger * Emit a event Log Record object with arguments * * @param event_name Event name - * @tparam args Arguments which can be used to set data of log record by type. + * @param args Arguments which can be used to set data of log record by type. * Severity -> severity, severity_text * string_view -> body * AttributeValue -> body diff --git a/exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter_factory.h b/exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter_factory.h index ae1c2b8579..7207e03d7b 100644 --- a/exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter_factory.h +++ b/exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter_factory.h @@ -24,7 +24,6 @@ class InMemoryMetricExporterFactory /// temporality selector. /// @param [out] data the InMemoryMetricData the exporter will write to, /// for the caller to inspect - /// @param [in] buffer_size number of entries to save in the circular buffer /// @param [in] temporality output temporality as a function of instrument kind static std::unique_ptr Create( const std::shared_ptr &data, diff --git a/exporters/memory/include/opentelemetry/exporters/memory/in_memory_span_exporter.h b/exporters/memory/include/opentelemetry/exporters/memory/in_memory_span_exporter.h index 8d3918f907..dd4fc11d05 100644 --- a/exporters/memory/include/opentelemetry/exporters/memory/in_memory_span_exporter.h +++ b/exporters/memory/include/opentelemetry/exporters/memory/in_memory_span_exporter.h @@ -81,11 +81,12 @@ class InMemorySpanExporter final : public opentelemetry::sdk::trace::SpanExporte } /** - * @param timeout an optional value containing the timeout of the exporter + * Attempt to shut down the in-memory span exporter. + * @param timeout Timeout is an optional value containing the timeout of the exporter * note: passing custom timeout values is not currently supported for this exporter * @return Returns the status of the operation */ - bool Shutdown(std::chrono::microseconds /* timeout */) noexcept override + bool Shutdown(std::chrono::microseconds timeout OPENTELEMETRY_MAYBE_UNUSED) noexcept override { is_shutdown_ = true; return true; diff --git a/exporters/memory/src/in_memory_metric_exporter_factory.cc b/exporters/memory/src/in_memory_metric_exporter_factory.cc index 227d846fbb..8a2ce63208 100644 --- a/exporters/memory/src/in_memory_metric_exporter_factory.cc +++ b/exporters/memory/src/in_memory_metric_exporter_factory.cc @@ -35,7 +35,7 @@ namespace class InMemoryMetricExporter final : public sdk::metrics::PushMetricExporter { public: - /// @param buffer_size a required value that sets the size of the CircularBuffer + /// @param data The in-memory data to export to. /// @param temporality Output temporality as a function of instrument kind. InMemoryMetricExporter(const std::shared_ptr &data, const sdk::metrics::AggregationTemporalitySelector &temporality) diff --git a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h index 2c3565177c..d180134cae 100644 --- a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h +++ b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h @@ -81,22 +81,24 @@ class HttpOperation /** * Old-school memory allocator * - * @param contents - * @param size - * @param nmemb - * @param userp - * @return + * @param contents Pointer to the data received from the server. + * @param size Size of each data element. + * @param nmemb Number of data elements. + * @param userp Pointer to the user-defined data structure for storing the received data. + * @return The number of bytes actually taken care of. If this differs from size * nmemb, it + * signals an error to libcurl. */ static size_t WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp); /** * C++ STL std::vector allocator * - * @param ptr - * @param size - * @param nmemb - * @param data - * @return + * @param ptr Pointer to the data received from the server. + * @param size Size of each data element. + * @param nmemb Number of data elements. + * @param userp Pointer to the user-defined data structure for storing the received data. + * @return The number of bytes actually taken care of. If this differs from size * nmemb, it + * signals an error to libcurl. */ static size_t WriteVectorHeaderCallback(void *ptr, size_t size, size_t nmemb, void *userp); static size_t WriteVectorBodyCallback(void *ptr, size_t size, size_t nmemb, void *userp); @@ -138,11 +140,9 @@ class HttpOperation * Create local CURL instance for url and body * @param method HTTP Method * @param url HTTP URL - * @param callback - * @param request_mode Sync or async - * @param request Request Headers - * @param body Request Body - * @param raw_response Whether to parse the response + * @param request_headers Request Headers + * @param request_body Request Body + * @param is_raw_response Whether to parse the response * @param http_conn_timeout HTTP connection timeout in seconds * @param reuse_connection Whether connection should be reused or closed * @param is_log_enabled To intercept some information from cURL request @@ -232,22 +232,16 @@ class HttpOperation /** * Return a copy of response headers - * - * @return */ Headers GetResponseHeaders(); /** * Return a copy of response body - * - * @return */ inline const std::vector &GetResponseBody() const noexcept { return response_body_; } /** * Return a raw copy of response headers+body - * - * @return */ inline const std::vector &GetRawResponse() const noexcept { return raw_response_; } @@ -265,7 +259,7 @@ class HttpOperation * Perform curl message, this function only can be called in the polling thread and it can only * be called when got a CURLMSG_DONE. * - * @param code + * @param code CURLcode */ void PerformCurlMessage(CURLcode code); diff --git a/sdk/include/opentelemetry/sdk/common/atomic_unique_ptr.h b/sdk/include/opentelemetry/sdk/common/atomic_unique_ptr.h index e554526666..7190c0173b 100644 --- a/sdk/include/opentelemetry/sdk/common/atomic_unique_ptr.h +++ b/sdk/include/opentelemetry/sdk/common/atomic_unique_ptr.h @@ -61,7 +61,7 @@ class AtomicUniquePtr /** * Atomically swap the pointer with another. - * @param ptr the pointer to swap with + * @param other The pointer to swap with */ void Swap(std::unique_ptr &other) noexcept { other.reset(ptr_.exchange(other.release())); } diff --git a/sdk/include/opentelemetry/sdk/logs/multi_recordable.h b/sdk/include/opentelemetry/sdk/logs/multi_recordable.h index 40a9c92e3b..ad19b231ab 100644 --- a/sdk/include/opentelemetry/sdk/logs/multi_recordable.h +++ b/sdk/include/opentelemetry/sdk/logs/multi_recordable.h @@ -93,7 +93,7 @@ class MultiRecordable final : public Recordable /** * Set Resource of this log - * @param Resource the resource to set + * @param resource the resource to set */ void SetResource(const opentelemetry::sdk::resource::Resource &resource) noexcept override; diff --git a/sdk/include/opentelemetry/sdk/logs/read_write_log_record.h b/sdk/include/opentelemetry/sdk/logs/read_write_log_record.h index af28273c49..24e70f4705 100644 --- a/sdk/include/opentelemetry/sdk/logs/read_write_log_record.h +++ b/sdk/include/opentelemetry/sdk/logs/read_write_log_record.h @@ -162,7 +162,7 @@ class ReadWriteLogRecord final : public ReadableLogRecord /** * Set Resource of this log - * @param Resource the resource to set + * @param resource the resource to set */ void SetResource(const opentelemetry::sdk::resource::Resource &resource) noexcept override; diff --git a/sdk/include/opentelemetry/sdk/logs/recordable.h b/sdk/include/opentelemetry/sdk/logs/recordable.h index 65f5f6ae94..ea203fb8a4 100644 --- a/sdk/include/opentelemetry/sdk/logs/recordable.h +++ b/sdk/include/opentelemetry/sdk/logs/recordable.h @@ -32,7 +32,7 @@ class Recordable : public opentelemetry::logs::LogRecord public: /** * Set Resource of this log - * @param Resource the resource to set + * @param resource the resource to set */ virtual void SetResource(const opentelemetry::sdk::resource::Resource &resource) noexcept = 0; diff --git a/sdk/include/opentelemetry/sdk/metrics/meter_context.h b/sdk/include/opentelemetry/sdk/metrics/meter_context.h index 468f5cdab5..53f6298049 100644 --- a/sdk/include/opentelemetry/sdk/metrics/meter_context.h +++ b/sdk/include/opentelemetry/sdk/metrics/meter_context.h @@ -150,7 +150,7 @@ class MeterContext : public std::enable_shared_from_this * NOTE - INTERNAL method, can change in future. * Adds a meter to the list of configured meters in thread safe manner. * - * @param meter + * @param meter The meter to be added. */ void AddMeter(const std::shared_ptr &meter); diff --git a/sdk/include/opentelemetry/sdk/trace/recordable.h b/sdk/include/opentelemetry/sdk/trace/recordable.h index 5918b80133..b85e007e85 100644 --- a/sdk/include/opentelemetry/sdk/trace/recordable.h +++ b/sdk/include/opentelemetry/sdk/trace/recordable.h @@ -56,7 +56,7 @@ class Recordable /** * Set an attribute of a span. - * @param name the name of the attribute + * @param key the name of the attribute * @param value the attribute value */ virtual void SetAttribute(nostd::string_view key, @@ -137,7 +137,6 @@ class Recordable /** * Set the trace flags of the span. - * @param flags the flags to set */ virtual void SetTraceFlags(opentelemetry::trace::TraceFlags /* flags */) noexcept {} @@ -149,7 +148,7 @@ class Recordable /** * Set Resource of the span - * @param Resource the resource to set + * @param resource the resource to set */ virtual void SetResource(const opentelemetry::sdk::resource::Resource &resource) noexcept = 0; diff --git a/sdk/include/opentelemetry/sdk/trace/sampler.h b/sdk/include/opentelemetry/sdk/trace/sampler.h index b90a2e66b2..c8339ea7b1 100644 --- a/sdk/include/opentelemetry/sdk/trace/sampler.h +++ b/sdk/include/opentelemetry/sdk/trace/sampler.h @@ -80,7 +80,7 @@ class Sampler * @param trace_id the TraceId for the new Span. This will be identical to that in * the parentContext, unless this is a root span. * @param name the name of the new Span. - * @param spanKind the opentelemetry::trace::SpanKind of the Span. + * @param span_kind the opentelemetry::trace::SpanKind of the Span. * @param attributes list of AttributeValue with their keys. * @param links Collection of links that will be associated with the Span to be created. * @return sampling result whether span should be sampled or not.