Skip to content

Commit d64b653

Browse files
authored
[DOC] Update doc comments to pass -WDocumention check (#3375)
1 parent 470f66b commit d64b653

File tree

16 files changed

+43
-49
lines changed

16 files changed

+43
-49
lines changed

api/include/opentelemetry/common/attribute_value.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ namespace common
2323
/// (IEEE 754-1985) or signed 64 bit integer.
2424
/// - Homogenous arrays of primitive type values.
2525
///
26-
/// \warning
26+
/// \warning The OpenTelemetry C++ API does not support the following attribute:
27+
/// uint64_t, nostd::span<const uint64_t>, and nostd::span<uint8_t> types.
2728
/// \parblock The OpenTelemetry C++ API currently supports several attribute
2829
/// value types that are not covered by the OpenTelemetry specification:
2930
/// - \c uint64_t

api/include/opentelemetry/common/key_value_iterable.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ class NoopKeyValueIterable : public KeyValueIterable
4343
~NoopKeyValueIterable() override = default;
4444

4545
/**
46-
* Iterate over key-value pairs
47-
* @param callback a callback to invoke for each key-value. If the callback returns false,
48-
* the iteration is aborted.
49-
* @return true if every key-value pair was iterated over
46+
* No-op implementation: does not invoke the callback, even if key-value pairs are present.
47+
* @return true without iterating or invoking the callback
5048
*/
5149
bool ForEachKeyValue(
52-
nostd::function_ref<bool(nostd::string_view, common::AttributeValue)>) const noexcept override
50+
nostd::function_ref<bool(nostd::string_view, common::AttributeValue)> /*callback*/)
51+
const noexcept override
5352
{
5453
return true;
5554
}

api/include/opentelemetry/common/key_value_iterable_view.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ KeyValueIterableView<T> MakeKeyValueIterableView(const T &container) noexcept
9191
/**
9292
* Utility function to help to make a attribute view from initializer_list
9393
*
94-
* @param attributes
94+
* @param attributes The initializer_list of key-value pairs
9595
* @return nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>
9696
*/
9797
inline static nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>
@@ -105,7 +105,7 @@ MakeAttributes(std::initializer_list<std::pair<nostd::string_view, common::Attri
105105
/**
106106
* Utility function to help to make a attribute view from a span
107107
*
108-
* @param attributes
108+
* @param attributes The span of key-value pairs
109109
* @return nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>
110110
*/
111111
inline static nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>
@@ -118,7 +118,7 @@ MakeAttributes(
118118
/**
119119
* Utility function to help to make a attribute view from a KeyValueIterable
120120
*
121-
* @param attributes
121+
* @param attributes The KeyValueIterable of key-value pairs
122122
* @return common::KeyValueIterable
123123
*/
124124
inline static const common::KeyValueIterable &MakeAttributes(
@@ -130,16 +130,17 @@ inline static const common::KeyValueIterable &MakeAttributes(
130130
/**
131131
* Utility function to help to make a attribute view from a key-value iterable object
132132
*
133-
* @param attributes
133+
* @tparam ArgumentType Expected to be ArgumentType
134+
* @param attributes The key-value iterable object
134135
* @return nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>
135136
*/
136137
template <
137138
class ArgumentType,
138139
nostd::enable_if_t<common::detail::is_key_value_iterable<ArgumentType>::value> * = nullptr>
139140
inline static common::KeyValueIterableView<ArgumentType> MakeAttributes(
140-
const ArgumentType &arg) noexcept
141+
const ArgumentType &attributes) noexcept
141142
{
142-
return common::KeyValueIterableView<ArgumentType>(arg);
143+
return common::KeyValueIterableView<ArgumentType>(attributes);
143144
}
144145

145146
} // namespace common

api/include/opentelemetry/context/runtime_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class OPENTELEMETRY_EXPORT RuntimeContextStorage
5656

5757
/**
5858
* Set the current context.
59-
* @param the new current context
59+
* @param context The new current context
6060
* @return a token for the new current context. This never returns a nullptr.
6161
*/
6262
virtual nostd::unique_ptr<Token> Attach(const Context &context) noexcept = 0;

api/include/opentelemetry/logs/event_logger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class OPENTELEMETRY_DEPRECATED EventLogger
4242
* Emit a event Log Record object with arguments
4343
*
4444
* @param event_name Event name
45-
* @tparam args Arguments which can be used to set data of log record by type.
45+
* @param args Arguments which can be used to set data of log record by type.
4646
* Severity -> severity, severity_text
4747
* string_view -> body
4848
* AttributeValue -> body

exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter_factory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class InMemoryMetricExporterFactory
2424
/// temporality selector.
2525
/// @param [out] data the InMemoryMetricData the exporter will write to,
2626
/// for the caller to inspect
27-
/// @param [in] buffer_size number of entries to save in the circular buffer
2827
/// @param [in] temporality output temporality as a function of instrument kind
2928
static std::unique_ptr<opentelemetry::sdk::metrics::PushMetricExporter> Create(
3029
const std::shared_ptr<InMemoryMetricData> &data,

exporters/memory/include/opentelemetry/exporters/memory/in_memory_span_exporter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ class InMemorySpanExporter final : public opentelemetry::sdk::trace::SpanExporte
8181
}
8282

8383
/**
84-
* @param timeout an optional value containing the timeout of the exporter
84+
* Attempt to shut down the in-memory span exporter.
85+
* @param timeout Timeout is an optional value containing the timeout of the exporter
8586
* note: passing custom timeout values is not currently supported for this exporter
8687
* @return Returns the status of the operation
8788
*/
88-
bool Shutdown(std::chrono::microseconds /* timeout */) noexcept override
89+
bool Shutdown(std::chrono::microseconds timeout OPENTELEMETRY_MAYBE_UNUSED) noexcept override
8990
{
9091
is_shutdown_ = true;
9192
return true;

exporters/memory/src/in_memory_metric_exporter_factory.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace
3535
class InMemoryMetricExporter final : public sdk::metrics::PushMetricExporter
3636
{
3737
public:
38-
/// @param buffer_size a required value that sets the size of the CircularBuffer
38+
/// @param data The in-memory data to export to.
3939
/// @param temporality Output temporality as a function of instrument kind.
4040
InMemoryMetricExporter(const std::shared_ptr<InMemoryMetricData> &data,
4141
const sdk::metrics::AggregationTemporalitySelector &temporality)

ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,24 @@ class HttpOperation
8181
/**
8282
* Old-school memory allocator
8383
*
84-
* @param contents
85-
* @param size
86-
* @param nmemb
87-
* @param userp
88-
* @return
84+
* @param contents Pointer to the data received from the server.
85+
* @param size Size of each data element.
86+
* @param nmemb Number of data elements.
87+
* @param userp Pointer to the user-defined data structure for storing the received data.
88+
* @return The number of bytes actually taken care of. If this differs from size * nmemb, it
89+
* signals an error to libcurl.
8990
*/
9091
static size_t WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp);
9192

9293
/**
9394
* C++ STL std::vector allocator
9495
*
95-
* @param ptr
96-
* @param size
97-
* @param nmemb
98-
* @param data
99-
* @return
96+
* @param ptr Pointer to the data received from the server.
97+
* @param size Size of each data element.
98+
* @param nmemb Number of data elements.
99+
* @param userp Pointer to the user-defined data structure for storing the received data.
100+
* @return The number of bytes actually taken care of. If this differs from size * nmemb, it
101+
* signals an error to libcurl.
100102
*/
101103
static size_t WriteVectorHeaderCallback(void *ptr, size_t size, size_t nmemb, void *userp);
102104
static size_t WriteVectorBodyCallback(void *ptr, size_t size, size_t nmemb, void *userp);
@@ -138,11 +140,9 @@ class HttpOperation
138140
* Create local CURL instance for url and body
139141
* @param method HTTP Method
140142
* @param url HTTP URL
141-
* @param callback
142-
* @param request_mode Sync or async
143-
* @param request Request Headers
144-
* @param body Request Body
145-
* @param raw_response Whether to parse the response
143+
* @param request_headers Request Headers
144+
* @param request_body Request Body
145+
* @param is_raw_response Whether to parse the response
146146
* @param http_conn_timeout HTTP connection timeout in seconds
147147
* @param reuse_connection Whether connection should be reused or closed
148148
* @param is_log_enabled To intercept some information from cURL request
@@ -232,22 +232,16 @@ class HttpOperation
232232

233233
/**
234234
* Return a copy of response headers
235-
*
236-
* @return
237235
*/
238236
Headers GetResponseHeaders();
239237

240238
/**
241239
* Return a copy of response body
242-
*
243-
* @return
244240
*/
245241
inline const std::vector<uint8_t> &GetResponseBody() const noexcept { return response_body_; }
246242

247243
/**
248244
* Return a raw copy of response headers+body
249-
*
250-
* @return
251245
*/
252246
inline const std::vector<uint8_t> &GetRawResponse() const noexcept { return raw_response_; }
253247

@@ -265,7 +259,7 @@ class HttpOperation
265259
* Perform curl message, this function only can be called in the polling thread and it can only
266260
* be called when got a CURLMSG_DONE.
267261
*
268-
* @param code
262+
* @param code CURLcode
269263
*/
270264
void PerformCurlMessage(CURLcode code);
271265

sdk/include/opentelemetry/sdk/common/atomic_unique_ptr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class AtomicUniquePtr
6161

6262
/**
6363
* Atomically swap the pointer with another.
64-
* @param ptr the pointer to swap with
64+
* @param other The pointer to swap with
6565
*/
6666
void Swap(std::unique_ptr<T> &other) noexcept { other.reset(ptr_.exchange(other.release())); }
6767

0 commit comments

Comments
 (0)