diff --git a/CHANGELOG.md b/CHANGELOG.md index 208cf2b194..51da906f1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,15 @@ Increment the: * [BUILD] Upgrade to opentelemetry-proto 1.8.0 [#3730](https://github.com/open-telemetry/opentelemetry-cpp/pull/3730) +New Features: + +* [CONFIGURATION] Implement declarative configuration (config.yaml) + [#2518](https://github.com/open-telemetry/opentelemetry-cpp/pull/2518) + + * Configuration for opentelemetry-cpp can now be done using a config.yaml + file, instead of using environment variables. + * See [opentelemetry-configuration](https://github.com/open-telemetry/opentelemetry-configuration) + ## [1.23 2025-09-25] * [CodeHealth] Fix clang-tidy warnings part 6 diff --git a/api/include/opentelemetry/semconv/http_attributes.h b/api/include/opentelemetry/semconv/http_attributes.h index 85e5244b08..b815b5d6b8 100644 --- a/api/include/opentelemetry/semconv/http_attributes.h +++ b/api/include/opentelemetry/semconv/http_attributes.h @@ -43,19 +43,23 @@ static constexpr const char *kHttpRequestHeader = "http.request.header";
HTTP request method value SHOULD be "known" to the instrumentation. By default, this convention defines "known" methods as the ones listed in RFC9110 and the PATCH method - defined in RFC5789.
If the HTTP - request method is not known to instrumentation, it MUST set the @code http.request.method @endcode - attribute to @code _OTHER @endcode.
If the HTTP instrumentation could end up converting valid - HTTP request methods to @code _OTHER @endcode, then it MUST provide a way to override the list of - known HTTP methods. If this override is done via environment variable, then the environment - variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list - of case-sensitive known HTTP methods (this list MUST be a full override of the default known - method, it is not a list of known methods in addition to the defaults).
HTTP method names are - case-sensitive and @code http.request.method @endcode attribute value MUST match a known HTTP - method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be - case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, - MUST also set @code http.request.method_original @endcode to the original value. + href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110, the PATCH method + defined in RFC5789 and the QUERY method + defined in httpbis-safe-method-w-body. +
+ If the HTTP request method is not known to instrumentation, it MUST set the @code + http.request.method @endcode attribute to @code _OTHER @endcode.
If the HTTP instrumentation + could end up converting valid HTTP request methods to @code _OTHER @endcode, then it MUST provide + a way to override the list of known HTTP methods. If this override is done via environment + variable, then the environment variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and + support a comma-separated list of case-sensitive known HTTP methods (this list MUST be a full + override of the default known method, it is not a list of known methods in addition to the + defaults).
HTTP method names are case-sensitive and @code http.request.method @endcode + attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web + frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical + equivalent. Tracing instrumentations that do so, MUST also set @code http.request.method_original + @endcode to the original value. */ static constexpr const char *kHttpRequestMethod = "http.request.method"; @@ -97,11 +101,19 @@ static constexpr const char *kHttpResponseHeader = "http.response.header"; static constexpr const char *kHttpResponseStatusCode = "http.response.status_code"; /** - The matched route, that is, the path template in the format used by the respective server - framework.
MUST NOT be populated when this is not supported by the HTTP server framework as - the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD - include the application root if - there is one. + The matched route template for the request. This MUST be low-cardinality and include all static + path segments, with dynamic path segments represented with placeholders.
MUST NOT be populated + when this is not supported by the HTTP server framework as the route attribute should have + low-cardinality and the URI path can NOT substitute it. SHOULD include the application root if there is one.
+ A static path segment is a part of the route template with a fixed, low-cardinality value. This + includes literal strings like @code /users/ @endcode and placeholders that are constrained to a + finite, predefined set of values, e.g. @code {controller} @endcode or @code {action} @endcode.
+ A dynamic path segment is a placeholder for a value that can have high cardinality and is not + constrained to a predefined list like static path segments.
Instrumentations SHOULD use + routing information provided by the corresponding web framework. They SHOULD pick the most precise + source of routing information and MAY support custom route formatting. Instrumentations SHOULD + document the format and the API used to obtain the route string. */ static constexpr const char *kHttpRoute = "http.route"; diff --git a/api/include/opentelemetry/semconv/incubating/app_attributes.h b/api/include/opentelemetry/semconv/incubating/app_attributes.h index b8477ee3bb..dae548ec11 100644 --- a/api/include/opentelemetry/semconv/incubating/app_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/app_attributes.h @@ -80,6 +80,24 @@ static constexpr const char *kAppScreenCoordinateX = "app.screen.coordinate.x"; */ static constexpr const char *kAppScreenCoordinateY = "app.screen.coordinate.y"; +/** + An identifier that uniquely differentiates this screen from other screens in the same application. +
+ A screen represents only the part of the device display drawn by the app. It typically contains + multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens + can coexist on the same display simultaneously (e.g., split view on tablets). + */ +static constexpr const char *kAppScreenId = "app.screen.id"; + +/** + The name of an application screen. +
+ A screen represents only the part of the device display drawn by the app. It typically contains + multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens + can coexist on the same display simultaneously (e.g., split view on tablets). + */ +static constexpr const char *kAppScreenName = "app.screen.name"; + /** An identifier that uniquely differentiates this widget from other widgets in the same application.
diff --git a/api/include/opentelemetry/semconv/incubating/azure_attributes.h b/api/include/opentelemetry/semconv/incubating/azure_attributes.h index 1618050f9d..b8fa13674f 100644 --- a/api/include/opentelemetry/semconv/incubating/azure_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/azure_attributes.h @@ -39,8 +39,8 @@ static constexpr const char *kAzureCosmosdbConsistencyLevel = "azure.cosmosdb.co List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.
Region name matches the format of @code displayName @endcode in Azure - Location API + href="https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations">Azure Location + API */ static constexpr const char *kAzureCosmosdbOperationContactedRegions = "azure.cosmosdb.operation.contacted_regions"; diff --git a/api/include/opentelemetry/semconv/incubating/container_attributes.h b/api/include/opentelemetry/semconv/incubating/container_attributes.h index e0678618e2..4d18ce8b30 100644 --- a/api/include/opentelemetry/semconv/incubating/container_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/container_attributes.h @@ -73,7 +73,7 @@ static constexpr const char *kContainerId = "container.id";
Docker defines a sha256 of the image id; @code container.image.id @endcode corresponds to the @code Image @endcode field from the Docker container inspect API + href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect">API endpoint. K8s defines a link to the container registry repository with digest @code "imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625" @@ -91,7 +91,8 @@ static constexpr const char *kContainerImageName = "container.image.name"; /** Repo digests of the container image as provided by the container runtime.
- Docker
+ Docker
and CRI
report those under the @code RepoDigests @endcode field.
@@ -100,9 +101,9 @@ static constexpr const char *kContainerImageRepoDigests = "container.image.repo_
/**
Container image tags. An example can be found in Docker Image
- Inspect. Should be only the @code
+ Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit
+ is undefined, the available bytes is omitted. In general, this metric can be derived from cadvisor
+ and by subtracting the @code container_memory_working_set_bytes @endcode metric from the @code
+ container_spec_memory_limit_bytes @endcode metric. In K8s, this metric is derived from the MemoryStats.AvailableBytes
+ field of the PodStats.Memory
+ of the Kubelet's stats API. updowncounter
+ */
+static constexpr const char *kMetricContainerMemoryAvailable = "container.memory.available";
+static constexpr const char *descrMetricContainerMemoryAvailable = "Container memory available.";
+static constexpr const char *unitMetricContainerMemoryAvailable = "By";
+
+static inline nostd::unique_ptr
+ In general, this metric can be derived from cadvisor
+ and specifically the @code container_memory_failures_total{failure_type=pgfault, scope=container}
+ @endcode and @code container_memory_failures_total{failure_type=pgmajfault, scope=container}
+ @endcodemetric. In K8s, this metric is derived from the MemoryStats.PageFaults
+ and MemoryStats.MajorPageFaults
+ field of the PodStats.Memory
+ of the Kubelet's stats API. counter
+ */
+static constexpr const char *kMetricContainerMemoryPagingFaults = "container.memory.paging.faults";
+static constexpr const char *descrMetricContainerMemoryPagingFaults =
+ "Container memory paging faults.";
+static constexpr const char *unitMetricContainerMemoryPagingFaults = "{fault}";
+
+static inline nostd::unique_ptr
+ In general, this metric can be derived from cadvisor
+ and specifically the @code container_memory_rss @endcode metric. In K8s, this metric is derived
+ from the MemoryStats.RSSBytes
+ field of the PodStats.Memory
+ of the Kubelet's stats API. updowncounter
+ */
+static constexpr const char *kMetricContainerMemoryRss = "container.memory.rss";
+static constexpr const char *descrMetricContainerMemoryRss = "Container memory RSS.";
+static constexpr const char *unitMetricContainerMemoryRss = "By";
+
+static inline nostd::unique_ptr
@@ -328,6 +473,54 @@ CreateAsyncDoubleMetricContainerMemoryUsage(metrics::Meter *meter)
kMetricContainerMemoryUsage, descrMetricContainerMemoryUsage, unitMetricContainerMemoryUsage);
}
+/**
+ Container memory working set.
+
+ In general, this metric can be derived from cadvisor
+ and specifically the @code container_memory_working_set_bytes @endcode metric. In K8s, this metric
+ is derived from the MemoryStats.WorkingSetBytes
+ field of the PodStats.Memory
+ of the Kubelet's stats API. updowncounter
+ */
+static constexpr const char *kMetricContainerMemoryWorkingSet = "container.memory.working_set";
+static constexpr const char *descrMetricContainerMemoryWorkingSet = "Container memory working set.";
+static constexpr const char *unitMetricContainerMemoryWorkingSet = "By";
+
+static inline nostd::unique_ptr
diff --git a/api/include/opentelemetry/semconv/incubating/db_attributes.h b/api/include/opentelemetry/semconv/incubating/db_attributes.h
index 31b8f2b74e..f6d81cba32 100644
--- a/api/include/opentelemetry/semconv/incubating/db_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/db_attributes.h
@@ -229,8 +229,7 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kDbCosmosdbRequestContentL
Deprecated, use @code db.response.status_code @endcode instead.
@deprecated
- {"note": "Replaced by @code db.response.status_code @endcode.", "reason": "renamed", "renamed_to":
- "db.response.status_code"}
+ {"note": "Use @code db.response.status_code @endcode instead.", "reason": "uncategorized"}
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kDbCosmosdbStatusCode =
"db.cosmosdb.status_code";
@@ -390,15 +389,18 @@ static constexpr const char *kDbOperationParameter = "db.operation.parameter";
@code db.query.parameter.
+ It is RECOMMENDED to capture the value as provided by the application
+ without attempting to do any case normalization.
+
@code db.query.parameter.
Examples:
- If the name field contains non-printable characters (below 32 or above 126), those characters
- should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be
- escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n
- respectively.
+ The name represents the queried domain name as it appears in the DNS query without any additional
+ normalization.
*/
static constexpr const char *kDnsQuestionName = "dns.question.name";
diff --git a/api/include/opentelemetry/semconv/incubating/enduser_attributes.h b/api/include/opentelemetry/semconv/incubating/enduser_attributes.h
index d117dd268e..2487dbe791 100644
--- a/api/include/opentelemetry/semconv/incubating/enduser_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/enduser_attributes.h
@@ -40,8 +40,7 @@ static constexpr const char *kEnduserPseudoId = "enduser.pseudo.id";
Deprecated, use @code user.roles @endcode instead.
@deprecated
- {"note": "Replaced by @code user.roles @endcode.", "reason": "renamed", "renamed_to":
- "user.roles"}
+ {"note": "Use @code user.roles @endcode instead.", "reason": "uncategorized"}
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kEnduserRole = "enduser.role";
diff --git a/api/include/opentelemetry/semconv/incubating/event_attributes.h b/api/include/opentelemetry/semconv/incubating/event_attributes.h
index de4d30a570..42ecce2c25 100644
--- a/api/include/opentelemetry/semconv/incubating/event_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/event_attributes.h
@@ -23,7 +23,8 @@ namespace event
Identifies the class / type of event.
@deprecated
- {"note": "Replaced by EventName top-level field on the LogRecord.\n", "reason": "uncategorized"}
+ {"note": "The value of this attribute MUST now be set as the value of the EventName field on the
+ LogRecord to indicate that the LogRecord represents an Event.\n", "reason": "uncategorized"}
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kEventName = "event.name";
diff --git a/api/include/opentelemetry/semconv/incubating/faas_attributes.h b/api/include/opentelemetry/semconv/incubating/faas_attributes.h
index 9f9690824b..0427a12d57 100644
--- a/api/include/opentelemetry/semconv/incubating/faas_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/faas_attributes.h
@@ -142,9 +142,9 @@ static constexpr const char *kFaasTrigger = "faas.trigger";
(Services): The revision (i.e., the function name
plus the revision suffix).
@@ -216,6 +276,102 @@ static constexpr const char *kDevelopment = "DEVELOPMENT";
} // namespace GcpApphubWorkloadEnvironmentTypeValues
+namespace GcpApphubDestinationServiceCriticalityTypeValues
+{
+/**
+ Mission critical service.
+ */
+static constexpr const char *kMissionCritical = "MISSION_CRITICAL";
+
+/**
+ High impact.
+ */
+static constexpr const char *kHigh = "HIGH";
+
+/**
+ Medium impact.
+ */
+static constexpr const char *kMedium = "MEDIUM";
+
+/**
+ Low impact.
+ */
+static constexpr const char *kLow = "LOW";
+
+} // namespace GcpApphubDestinationServiceCriticalityTypeValues
+
+namespace GcpApphubDestinationServiceEnvironmentTypeValues
+{
+/**
+ Production environment.
+ */
+static constexpr const char *kProduction = "PRODUCTION";
+
+/**
+ Staging environment.
+ */
+static constexpr const char *kStaging = "STAGING";
+
+/**
+ Test environment.
+ */
+static constexpr const char *kTest = "TEST";
+
+/**
+ Development environment.
+ */
+static constexpr const char *kDevelopment = "DEVELOPMENT";
+
+} // namespace GcpApphubDestinationServiceEnvironmentTypeValues
+
+namespace GcpApphubDestinationWorkloadCriticalityTypeValues
+{
+/**
+ Mission critical service.
+ */
+static constexpr const char *kMissionCritical = "MISSION_CRITICAL";
+
+/**
+ High impact.
+ */
+static constexpr const char *kHigh = "HIGH";
+
+/**
+ Medium impact.
+ */
+static constexpr const char *kMedium = "MEDIUM";
+
+/**
+ Low impact.
+ */
+static constexpr const char *kLow = "LOW";
+
+} // namespace GcpApphubDestinationWorkloadCriticalityTypeValues
+
+namespace GcpApphubDestinationWorkloadEnvironmentTypeValues
+{
+/**
+ Production environment.
+ */
+static constexpr const char *kProduction = "PRODUCTION";
+
+/**
+ Staging environment.
+ */
+static constexpr const char *kStaging = "STAGING";
+
+/**
+ Test environment.
+ */
+static constexpr const char *kTest = "TEST";
+
+/**
+ Development environment.
+ */
+static constexpr const char *kDevelopment = "DEVELOPMENT";
+
+} // namespace GcpApphubDestinationWorkloadEnvironmentTypeValues
+
} // namespace gcp
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
diff --git a/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h b/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h
index 50bfff5317..711a8bf380 100644
--- a/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h
@@ -61,6 +61,37 @@ static constexpr const char *kGenAiConversationId = "gen_ai.conversation.id";
*/
static constexpr const char *kGenAiDataSourceId = "gen_ai.data_source.id";
+/**
+ The number of dimensions the resulting output embeddings should have.
+ */
+static constexpr const char *kGenAiEmbeddingsDimensionCount = "gen_ai.embeddings.dimension.count";
+
+/**
+ A free-form explanation for the assigned score provided by the evaluator.
+ */
+static constexpr const char *kGenAiEvaluationExplanation = "gen_ai.evaluation.explanation";
+
+/**
+ The name of the evaluation metric used for the GenAI response.
+ */
+static constexpr const char *kGenAiEvaluationName = "gen_ai.evaluation.name";
+
+/**
+ Human readable label for evaluation.
+
+ This attribute provides a human-readable interpretation of the evaluation score produced by an
+ evaluator. For example, a score value of 1 could mean "relevant" in one evaluation system and "not
+ relevant" in another, depending on the scoring range and evaluator. The label SHOULD have low
+ cardinality. Possible values depend on the evaluation metric and evaluator used; implementations
+ SHOULD document the possible values.
+ */
+static constexpr const char *kGenAiEvaluationScoreLabel = "gen_ai.evaluation.score.label";
+
+/**
+ The evaluation score returned by the evaluator.
+ */
+static constexpr const char *kGenAiEvaluationScoreValue = "gen_ai.evaluation.score.value";
+
/**
The chat history provided to the model as an input.
@@ -313,11 +344,52 @@ static constexpr const char *kGenAiSystemInstructions = "gen_ai.system_instructi
*/
static constexpr const char *kGenAiTokenType = "gen_ai.token.type";
+/**
+ Parameters passed to the tool call.
+
+ It's expected to be an object - in case a serialized string is available
+ to the instrumentation, the instrumentation SHOULD do the best effort to
+ deserialize it to an object. When recorded on spans, it MAY be recorded as a JSON string if
+ structured format is not supported and SHOULD be recorded in structured form otherwise.
+ */
+static constexpr const char *kGenAiToolCallArguments = "gen_ai.tool.call.arguments";
+
/**
The tool call identifier.
*/
static constexpr const char *kGenAiToolCallId = "gen_ai.tool.call.id";
+/**
+ The result returned by the tool call (if any and if execution was successful).
+
+ It's expected to be an object - in case a serialized string is available
+ to the instrumentation, the instrumentation SHOULD do the best effort to
+ deserialize it to an object. When recorded on spans, it MAY be recorded as a JSON string if
+ structured format is not supported and SHOULD be recorded in structured form otherwise.
+ */
+static constexpr const char *kGenAiToolCallResult = "gen_ai.tool.call.result";
+
+/**
+ The list of source system tool definitions available to the GenAI agent or model.
+
+ The value of this attribute matches source system tool definition format.
+
+ It's expected to be an array of objects where each object represents a tool definition. In case a
+ serialized string is available to the instrumentation, the instrumentation SHOULD do the best
+ effort to deserialize it to an array. When recorded on spans, it MAY be recorded as a JSON string
+ if structured format is not supported and SHOULD be recorded in structured form otherwise.
+ Since this attribute could be large, it's NOT RECOMMENDED to populate
+ it by default. Instrumentations MAY provide a way to enable
+ populating this attribute.
+ */
+static constexpr const char *kGenAiToolDefinitions = "gen_ai.tool.definitions";
+
/**
The tool description.
*/
@@ -604,13 +676,21 @@ static constexpr const char *kCohere = "cohere";
/**
Azure AI Inference
+
+ @deprecated
+ {"note": "Replaced by @code azure.ai.inference @endcode.", "reason": "renamed", "renamed_to":
+ "azure.ai.inference"}
*/
-static constexpr const char *kAzAiInference = "az.ai.inference";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kAzAiInference = "az.ai.inference";
/**
Azure OpenAI
+
+ @deprecated
+ {"note": "Replaced by @code azure.ai.openai @endcode.", "reason": "renamed", "renamed_to":
+ "azure.ai.openai"}
*/
-static constexpr const char *kAzAiOpenai = "az.ai.openai";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kAzAiOpenai = "az.ai.openai";
/**
Azure AI Inference
@@ -639,11 +719,8 @@ static constexpr const char *kPerplexity = "perplexity";
/**
xAI
-
- @deprecated
- {"note": "Replaced by @code x_ai @endcode.", "reason": "renamed", "renamed_to": "x_ai"}
*/
-OPENTELEMETRY_DEPRECATED static constexpr const char *kXai = "xai";
+static constexpr const char *kXai = "xai";
/**
DeepSeek
diff --git a/api/include/opentelemetry/semconv/incubating/http_attributes.h b/api/include/opentelemetry/semconv/incubating/http_attributes.h
index f8cebe1751..1af52bbb62 100644
--- a/api/include/opentelemetry/semconv/incubating/http_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/http_attributes.h
@@ -34,11 +34,12 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kHttpClientIp = "http.clie
static constexpr const char *kHttpConnectionState = "http.connection.state";
/**
- Deprecated, use @code network.protocol.name @endcode instead.
+ Deprecated, use @code network.protocol.name @endcode and @code network.protocol.version @endcode
+ instead.
@deprecated
- {"note": "Replaced by @code network.protocol.name @endcode.", "reason": "renamed", "renamed_to":
- "network.protocol.name"}
+ {"note": "Split into @code network.protocol.name @endcode and @code network.protocol.version
+ @endcode", "reason": "uncategorized"}
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kHttpFlavor = "http.flavor";
@@ -93,19 +94,23 @@ static constexpr const char *kHttpRequestHeader = "http.request.header";
HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in RFC9110 and the PATCH method
- defined in RFC5789. If the HTTP
- request method is not known to instrumentation, it MUST set the @code http.request.method @endcode
- attribute to @code _OTHER @endcode. If the HTTP instrumentation could end up converting valid
- HTTP request methods to @code _OTHER @endcode, then it MUST provide a way to override the list of
- known HTTP methods. If this override is done via environment variable, then the environment
- variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list
- of case-sensitive known HTTP methods (this list MUST be a full override of the default known
- method, it is not a list of known methods in addition to the defaults). HTTP method names are
- case-sensitive and @code http.request.method @endcode attribute value MUST match a known HTTP
- method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be
- case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so,
- MUST also set @code http.request.method_original @endcode to the original value.
+ href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110, the PATCH method
+ defined in RFC5789 and the QUERY method
+ defined in httpbis-safe-method-w-body.
+
+ If the HTTP request method is not known to instrumentation, it MUST set the @code
+ http.request.method @endcode attribute to @code _OTHER @endcode. If the HTTP instrumentation
+ could end up converting valid HTTP request methods to @code _OTHER @endcode, then it MUST provide
+ a way to override the list of known HTTP methods. If this override is done via environment
+ variable, then the environment variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and
+ support a comma-separated list of case-sensitive known HTTP methods (this list MUST be a full
+ override of the default known method, it is not a list of known methods in addition to the
+ defaults). HTTP method names are case-sensitive and @code http.request.method @endcode
+ attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web
+ frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical
+ equivalent. Tracing instrumentations that do so, MUST also set @code http.request.method_original
+ @endcode to the original value.
*/
static constexpr const char *kHttpRequestMethod = "http.request.method";
@@ -209,11 +214,19 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kHttpResponseContentLength
"http.response_content_length_uncompressed";
/**
- The matched route, that is, the path template in the format used by the respective server
- framework. MUST NOT be populated when this is not supported by the HTTP server framework as
- the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD
- include the application root if
- there is one.
+ The matched route template for the request. This MUST be low-cardinality and include all static
+ path segments, with dynamic path segments represented with placeholders. MUST NOT be populated
+ when this is not supported by the HTTP server framework as the route attribute should have
+ low-cardinality and the URI path can NOT substitute it. SHOULD include the application root if there is one.
+ A static path segment is a part of the route template with a fixed, low-cardinality value. This
+ includes literal strings like @code /users/ @endcode and placeholders that are constrained to a
+ finite, predefined set of values, e.g. @code {controller} @endcode or @code {action} @endcode.
+ A dynamic path segment is a placeholder for a value that can have high cardinality and is not
+ constrained to a predefined list like static path segments. Instrumentations SHOULD use
+ routing information provided by the corresponding web framework. They SHOULD pick the most precise
+ source of routing information and MAY support custom route formatting. Instrumentations SHOULD
+ document the format and the API used to obtain the route string.
*/
static constexpr const char *kHttpRoute = "http.route";
@@ -364,6 +377,11 @@ static constexpr const char *kPut = "PUT";
*/
static constexpr const char *kTrace = "TRACE";
+/**
+ QUERY method.
+ */
+static constexpr const char *kQuery = "QUERY";
+
/**
Any HTTP method that the instrumentation has no prior knowledge of.
*/
diff --git a/api/include/opentelemetry/semconv/incubating/k8s_attributes.h b/api/include/opentelemetry/semconv/incubating/k8s_attributes.h
index 80ef2a964b..8f18cfa4fe 100644
--- a/api/include/opentelemetry/semconv/incubating/k8s_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/k8s_attributes.h
@@ -391,6 +391,20 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kK8sPodLabels = "k8s.pod.l
*/
static constexpr const char *kK8sPodName = "k8s.pod.name";
+/**
+ The phase for the pod. Corresponds to the @code phase @endcode field of the: K8s
+ PodStatus
+ */
+static constexpr const char *kK8sPodStatusPhase = "k8s.pod.status.phase";
+
+/**
+ The reason for the pod state. Corresponds to the @code reason @endcode field of the: K8s
+ PodStatus
+ */
+static constexpr const char *kK8sPodStatusReason = "k8s.pod.status.reason";
+
/**
The UID of the Pod.
*/
@@ -450,7 +464,7 @@ static constexpr const char *kK8sResourcequotaName = "k8s.resourcequota.name";
string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just
the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for
object count quotas. See Kubernetes
+ href="https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count">Kubernetes
Resource Quotas documentation for more details.
*/
static constexpr const char *kK8sResourcequotaResourceName = "k8s.resourcequota.resource_name";
@@ -633,6 +647,72 @@ static constexpr const char *kNetworkUnavailable = "NetworkUnavailable";
} // namespace K8sNodeConditionTypeValues
+namespace K8sPodStatusPhaseValues
+{
+/**
+ The pod has been accepted by the system, but one or more of the containers has not been started.
+ This includes time before being bound to a node, as well as time spent pulling images onto the
+ host.
+ */
+static constexpr const char *kPending = "Pending";
+
+/**
+ The pod has been bound to a node and all of the containers have been started. At least one
+ container is still running or is in the process of being restarted.
+ */
+static constexpr const char *kRunning = "Running";
+
+/**
+ All containers in the pod have voluntarily terminated with a container exit code of 0, and the
+ system is not going to restart any of these containers.
+ */
+static constexpr const char *kSucceeded = "Succeeded";
+
+/**
+ All containers in the pod have terminated, and at least one container has terminated in a failure
+ (exited with a non-zero exit code or was stopped by the system).
+ */
+static constexpr const char *kFailed = "Failed";
+
+/**
+ For some reason the state of the pod could not be obtained, typically due to an error in
+ communicating with the host of the pod.
+ */
+static constexpr const char *kUnknown = "Unknown";
+
+} // namespace K8sPodStatusPhaseValues
+
+namespace K8sPodStatusReasonValues
+{
+/**
+ The pod is evicted.
+ */
+static constexpr const char *kEvicted = "Evicted";
+
+/**
+ The pod is in a status because of its node affinity
+ */
+static constexpr const char *kNodeAffinity = "NodeAffinity";
+
+/**
+ The reason on a pod when its state cannot be confirmed as kubelet is unresponsive on the node it
+ is (was) running.
+ */
+static constexpr const char *kNodeLost = "NodeLost";
+
+/**
+ The node is shutdown
+ */
+static constexpr const char *kShutdown = "Shutdown";
+
+/**
+ The pod was rejected admission to the node because of an error during admission that could not be
+ categorized.
+ */
+static constexpr const char *kUnexpectedAdmissionError = "UnexpectedAdmissionError";
+
+} // namespace K8sPodStatusReasonValues
+
namespace K8sVolumeTypeValues
{
/**
diff --git a/api/include/opentelemetry/semconv/incubating/k8s_metrics.h b/api/include/opentelemetry/semconv/incubating/k8s_metrics.h
index 678b24ff85..e925e6a8ff 100644
--- a/api/include/opentelemetry/semconv/incubating/k8s_metrics.h
+++ b/api/include/opentelemetry/semconv/incubating/k8s_metrics.h
@@ -60,6 +60,53 @@ CreateAsyncDoubleMetricK8sContainerCpuLimit(metrics::Meter *meter)
kMetricK8sContainerCpuLimit, descrMetricK8sContainerCpuLimit, unitMetricK8sContainerCpuLimit);
}
+/**
+ The ratio of container CPU usage to its CPU limit.
+
+ The value range is [0.0,1.0]. A value of 1.0 means the container is using 100% of its CPU limit.
+ If the CPU limit is not set, this metric SHOULD NOT be emitted for that container. gauge
+ */
+static constexpr const char *kMetricK8sContainerCpuLimitUtilization =
+ "k8s.container.cpu.limit_utilization";
+static constexpr const char *descrMetricK8sContainerCpuLimitUtilization =
+ "The ratio of container CPU usage to its CPU limit.";
+static constexpr const char *unitMetricK8sContainerCpuLimitUtilization = "1";
+
+#if OPENTELEMETRY_ABI_VERSION_NO >= 2
+
+static inline nostd::unique_ptr
@@ -104,6 +151,52 @@ CreateAsyncDoubleMetricK8sContainerCpuRequest(metrics::Meter *meter)
unitMetricK8sContainerCpuRequest);
}
+/**
+ The ratio of container CPU usage to its CPU request.
+
+ gauge
+ */
+static constexpr const char *kMetricK8sContainerCpuRequestUtilization =
+ "k8s.container.cpu.request_utilization";
+static constexpr const char *descrMetricK8sContainerCpuRequestUtilization =
+ "The ratio of container CPU usage to its CPU request.";
+static constexpr const char *unitMetricK8sContainerCpuRequestUtilization = "1";
+
+#if OPENTELEMETRY_ABI_VERSION_NO >= 2
+
+static inline nostd::unique_ptr
@@ -548,40 +641,42 @@ CreateAsyncDoubleMetricK8sContainerStorageRequest(metrics::Meter *meter)
}
/**
- The number of actively running jobs for a cronjob.
-
- This metric aligns with the @code active @endcode field of the
- This metric aligns with the @code active @endcode field of the K8s
CronJobStatus. updowncounter
*/
-static constexpr const char *kMetricK8sCronjobActiveJobs = "k8s.cronjob.active_jobs";
-static constexpr const char *descrMetricK8sCronjobActiveJobs =
- "The number of actively running jobs for a cronjob.";
-static constexpr const char *unitMetricK8sCronjobActiveJobs = "{job}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sCronjobActiveJobs =
+ "k8s.cronjob.active_jobs";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sCronjobActiveJobs =
+ "Deprecated, use `k8s.cronjob.job.active` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sCronjobActiveJobs = "{job}";
-static inline nostd::unique_ptr
- This metric aligns with the @code currentNumberScheduled @endcode field of the
+ This metric aligns with the @code active @endcode field of the
K8s
+ CronJobStatus. updowncounter
+ */
+static constexpr const char *kMetricK8sCronjobJobActive = "k8s.cronjob.job.active";
+static constexpr const char *descrMetricK8sCronjobJobActive =
+ "The number of actively running jobs for a cronjob.";
+static constexpr const char *unitMetricK8sCronjobJobActive = "{job}";
+
+static inline nostd::unique_ptr This metric aligns with the @code
+ currentNumberScheduled @endcode field of the K8s
DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDaemonsetCurrentScheduledNodes =
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDaemonsetCurrentScheduledNodes =
"k8s.daemonset.current_scheduled_nodes";
-static constexpr const char *descrMetricK8sDaemonsetCurrentScheduledNodes =
- "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon "
- "pod.";
-static constexpr const char *unitMetricK8sDaemonsetCurrentScheduledNodes = "{node}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDaemonsetCurrentScheduledNodes =
+ "Deprecated, use `k8s.daemonset.node.current_scheduled` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDaemonsetCurrentScheduledNodes =
+ "{node}";
-static inline nostd::unique_ptr This metric aligns with the @code desiredNumberScheduled @endcode field of the This metric aligns with the @code
+ desiredNumberScheduled @endcode field of the K8s
DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDaemonsetDesiredScheduledNodes =
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDaemonsetDesiredScheduledNodes =
"k8s.daemonset.desired_scheduled_nodes";
-static constexpr const char *descrMetricK8sDaemonsetDesiredScheduledNodes =
- "Number of nodes that should be running the daemon pod (including nodes currently running the "
- "daemon pod).";
-static constexpr const char *unitMetricK8sDaemonsetDesiredScheduledNodes = "{node}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDaemonsetDesiredScheduledNodes =
+ "Deprecated, use `k8s.daemonset.node.desired_scheduled` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDaemonsetDesiredScheduledNodes =
+ "{node}";
-static inline nostd::unique_ptr
- This metric aligns with the @code numberMisscheduled @endcode field of the
- This metric aligns with the @code
+ numberMisscheduled @endcode field of the K8s
DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDaemonsetMisscheduledNodes =
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDaemonsetMisscheduledNodes =
"k8s.daemonset.misscheduled_nodes";
-static constexpr const char *descrMetricK8sDaemonsetMisscheduledNodes =
- "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod.";
-static constexpr const char *unitMetricK8sDaemonsetMisscheduledNodes = "{node}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDaemonsetMisscheduledNodes =
+ "Deprecated, use `k8s.daemonset.node.misscheduled` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDaemonsetMisscheduledNodes =
+ "{node}";
-static inline nostd::unique_ptr This metric aligns with the @code numberReady @endcode field of the
+ This metric aligns with the @code currentNumberScheduled @endcode field of the
+ K8s
DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDaemonsetReadyNodes = "k8s.daemonset.ready_nodes";
-static constexpr const char *descrMetricK8sDaemonsetReadyNodes =
- "Number of nodes that should be running the daemon pod and have one or more of the daemon pod "
- "running and ready.";
-static constexpr const char *unitMetricK8sDaemonsetReadyNodes = "{node}";
+static constexpr const char *kMetricK8sDaemonsetNodeCurrentScheduled =
+ "k8s.daemonset.node.current_scheduled";
+static constexpr const char *descrMetricK8sDaemonsetNodeCurrentScheduled =
+ "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon "
+ "pod.";
+static constexpr const char *unitMetricK8sDaemonsetNodeCurrentScheduled = "{node}";
static inline nostd::unique_ptr This metric aligns with the @code availableReplicas @endcode field of the K8s
- DeploymentStatus. updowncounter
+ Number of nodes that should be running the daemon pod (including nodes currently running the
+ daemon pod). This metric aligns with the @code desiredNumberScheduled @endcode field of the K8s
+ DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDeploymentAvailablePods = "k8s.deployment.available_pods";
-static constexpr const char *descrMetricK8sDeploymentAvailablePods =
- "Total number of available replica pods (ready for at least minReadySeconds) targeted by this "
- "deployment.";
-static constexpr const char *unitMetricK8sDeploymentAvailablePods = "{pod}";
+static constexpr const char *kMetricK8sDaemonsetNodeDesiredScheduled =
+ "k8s.daemonset.node.desired_scheduled";
+static constexpr const char *descrMetricK8sDaemonsetNodeDesiredScheduled =
+ "Number of nodes that should be running the daemon pod (including nodes currently running the "
+ "daemon pod).";
+static constexpr const char *unitMetricK8sDaemonsetNodeDesiredScheduled = "{node}";
static inline nostd::unique_ptr
- This metric aligns with the @code replicas @endcode field of the
+ This metric aligns with the @code numberMisscheduled @endcode field of the
K8s
- DeploymentSpec. updowncounter
+ href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps">K8s
+ DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sDeploymentDesiredPods = "k8s.deployment.desired_pods";
-static constexpr const char *descrMetricK8sDeploymentDesiredPods =
- "Number of desired replica pods in this deployment.";
-static constexpr const char *unitMetricK8sDeploymentDesiredPods = "{pod}";
+static constexpr const char *kMetricK8sDaemonsetNodeMisscheduled =
+ "k8s.daemonset.node.misscheduled";
+static constexpr const char *descrMetricK8sDaemonsetNodeMisscheduled =
+ "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod.";
+static constexpr const char *unitMetricK8sDaemonsetNodeMisscheduled = "{node}";
static inline nostd::unique_ptr This metric aligns with the @code currentReplicas @endcode field of the K8s
- HorizontalPodAutoscalerStatus updowncounter
+ Number of nodes that should be running the daemon pod and have one or more of the daemon pod
+ running and ready. This metric aligns with the @code numberReady @endcode field of the K8s
+ DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sHpaCurrentPods = "k8s.hpa.current_pods";
-static constexpr const char *descrMetricK8sHpaCurrentPods =
- "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the "
- "autoscaler.";
-static constexpr const char *unitMetricK8sHpaCurrentPods = "{pod}";
+static constexpr const char *kMetricK8sDaemonsetNodeReady = "k8s.daemonset.node.ready";
+static constexpr const char *descrMetricK8sDaemonsetNodeReady =
+ "Number of nodes that should be running the daemon pod and have one or more of the daemon pod "
+ "running and ready.";
+static constexpr const char *unitMetricK8sDaemonsetNodeReady = "{node}";
static inline nostd::unique_ptr This metric aligns with the @code desiredReplicas @endcode field of the K8s
- HorizontalPodAutoscalerStatus updowncounter
+ Deprecated, use @code k8s.daemonset.node.ready @endcode instead.
+
+ @deprecated
+ {"note": "Replaced by @code k8s.daemonset.node.ready @endcode.", "reason": "renamed",
+ "renamed_to": "k8s.daemonset.node.ready"} This metric aligns with the @code numberReady
+ @endcode field of the K8s
+ DaemonSetStatus. updowncounter
*/
-static constexpr const char *kMetricK8sHpaDesiredPods = "k8s.hpa.desired_pods";
-static constexpr const char *descrMetricK8sHpaDesiredPods =
- "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated "
- "by the autoscaler.";
-static constexpr const char *unitMetricK8sHpaDesiredPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDaemonsetReadyNodes =
+ "k8s.daemonset.ready_nodes";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDaemonsetReadyNodes =
+ "Deprecated, use `k8s.daemonset.node.ready` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDaemonsetReadyNodes = "{node}";
-static inline nostd::unique_ptr This metric aligns with the @code
+ availableReplicas @endcode field of the K8s
+ DeploymentStatus. updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDeploymentAvailablePods =
+ "k8s.deployment.available_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDeploymentAvailablePods =
+ "Deprecated, use `k8s.deployment.pod.available` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDeploymentAvailablePods =
+ "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr This metric aligns with the @code replicas
+ @endcode field of the K8s
+ DeploymentSpec. updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sDeploymentDesiredPods =
+ "k8s.deployment.desired_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sDeploymentDesiredPods =
+ "Deprecated, use `k8s.deployment.pod.desired` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sDeploymentDesiredPods = "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr This metric aligns with the @code availableReplicas @endcode field of the K8s
+ DeploymentStatus. updowncounter
+ */
+static constexpr const char *kMetricK8sDeploymentPodAvailable = "k8s.deployment.pod.available";
+static constexpr const char *descrMetricK8sDeploymentPodAvailable =
+ "Total number of available replica pods (ready for at least minReadySeconds) targeted by this "
+ "deployment.";
+static constexpr const char *unitMetricK8sDeploymentPodAvailable = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code replicas @endcode field of the
+ K8s
+ DeploymentSpec. updowncounter
+ */
+static constexpr const char *kMetricK8sDeploymentPodDesired = "k8s.deployment.pod.desired";
+static constexpr const char *descrMetricK8sDeploymentPodDesired =
+ "Number of desired replica pods in this deployment.";
+static constexpr const char *unitMetricK8sDeploymentPodDesired = "{pod}";
+
+static inline nostd::unique_ptr This metric aligns with the @code currentReplicas @endcode field of the
+ K8s
+ HorizontalPodAutoscalerStatus updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sHpaCurrentPods =
+ "k8s.hpa.current_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sHpaCurrentPods =
+ "Deprecated, use `k8s.hpa.pod.current` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sHpaCurrentPods = "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr This metric aligns with the @code desiredReplicas @endcode field of the
+ K8s
+ HorizontalPodAutoscalerStatus updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sHpaDesiredPods =
+ "k8s.hpa.desired_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sHpaDesiredPods =
+ "Deprecated, use `k8s.hpa.pod.desired` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sHpaDesiredPods = "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr
- This metric aligns with the @code maxReplicas @endcode field of the
- This metric aligns with the @code maxReplicas @endcode field of the K8s
HorizontalPodAutoscalerSpec updowncounter
*/
-static constexpr const char *kMetricK8sHpaMaxPods = "k8s.hpa.max_pods";
-static constexpr const char *descrMetricK8sHpaMaxPods =
- "The upper limit for the number of replica pods to which the autoscaler can scale up.";
-static constexpr const char *unitMetricK8sHpaMaxPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sHpaMaxPods = "k8s.hpa.max_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sHpaMaxPods =
+ "Deprecated, use `k8s.hpa.pod.max` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sHpaMaxPods = "{pod}";
-static inline nostd::unique_ptr
- This metric aligns with the @code minReplicas @endcode field of the
- This metric aligns with the @code minReplicas @endcode field of the K8s
HorizontalPodAutoscalerSpec updowncounter
*/
-static constexpr const char *kMetricK8sHpaMinPods = "k8s.hpa.min_pods";
-static constexpr const char *descrMetricK8sHpaMinPods =
- "The lower limit for the number of replica pods to which the autoscaler can scale down.";
-static constexpr const char *unitMetricK8sHpaMinPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sHpaMinPods = "k8s.hpa.min_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sHpaMinPods =
+ "Deprecated, use `k8s.hpa.pod.min` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sHpaMinPods = "{pod}";
-static inline nostd::unique_ptr
- This metric aligns with the @code active @endcode field of the
- K8s
- JobStatus. updowncounter
+ Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the
+ autoscaler. This metric aligns with the @code currentReplicas @endcode field of the K8s
+ HorizontalPodAutoscalerStatus updowncounter
*/
-static constexpr const char *kMetricK8sJobActivePods = "k8s.job.active_pods";
-static constexpr const char *descrMetricK8sJobActivePods =
- "The number of pending and actively running pods for a job.";
-static constexpr const char *unitMetricK8sJobActivePods = "{pod}";
+static constexpr const char *kMetricK8sHpaPodCurrent = "k8s.hpa.pod.current";
+static constexpr const char *descrMetricK8sHpaPodCurrent =
+ "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the "
+ "autoscaler.";
+static constexpr const char *unitMetricK8sHpaPodCurrent = "{pod}";
static inline nostd::unique_ptr This metric aligns with the @code desiredReplicas @endcode field of the K8s
+ HorizontalPodAutoscalerStatus updowncounter
+ */
+static constexpr const char *kMetricK8sHpaPodDesired = "k8s.hpa.pod.desired";
+static constexpr const char *descrMetricK8sHpaPodDesired =
+ "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated "
+ "by the autoscaler.";
+static constexpr const char *unitMetricK8sHpaPodDesired = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code maxReplicas @endcode field of the
+ K8s
+ HorizontalPodAutoscalerSpec updowncounter
+ */
+static constexpr const char *kMetricK8sHpaPodMax = "k8s.hpa.pod.max";
+static constexpr const char *descrMetricK8sHpaPodMax =
+ "The upper limit for the number of replica pods to which the autoscaler can scale up.";
+static constexpr const char *unitMetricK8sHpaPodMax = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code minReplicas @endcode field of the
+ K8s
+ HorizontalPodAutoscalerSpec updowncounter
+ */
+static constexpr const char *kMetricK8sHpaPodMin = "k8s.hpa.pod.min";
+static constexpr const char *descrMetricK8sHpaPodMin =
+ "The lower limit for the number of replica pods to which the autoscaler can scale down.";
+static constexpr const char *unitMetricK8sHpaPodMin = "{pod}";
+
+static inline nostd::unique_ptr This metric aligns with the @code active @endcode field of the K8s
+ JobStatus. updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sJobActivePods =
+ "k8s.job.active_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sJobActivePods =
+ "Deprecated, use `k8s.job.pod.active` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sJobActivePods = "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr
- This metric aligns with the @code completions @endcode field of the
- This metric aligns with the @code completions
+ @endcode field of the K8s
JobSpec.. updowncounter
*/
-static constexpr const char *kMetricK8sJobDesiredSuccessfulPods = "k8s.job.desired_successful_pods";
-static constexpr const char *descrMetricK8sJobDesiredSuccessfulPods =
- "The desired number of successfully finished pods the job should be run with.";
-static constexpr const char *unitMetricK8sJobDesiredSuccessfulPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sJobDesiredSuccessfulPods =
+ "k8s.job.desired_successful_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sJobDesiredSuccessfulPods =
+ "Deprecated, use `k8s.job.pod.desired_successful` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sJobDesiredSuccessfulPods =
+ "{pod}";
-static inline nostd::unique_ptr
- This metric aligns with the @code failed @endcode field of the
- This metric aligns with the @code failed @endcode field of the K8s
JobStatus. updowncounter
*/
-static constexpr const char *kMetricK8sJobFailedPods = "k8s.job.failed_pods";
-static constexpr const char *descrMetricK8sJobFailedPods =
- "The number of pods which reached phase Failed for a job.";
-static constexpr const char *unitMetricK8sJobFailedPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sJobFailedPods =
+ "k8s.job.failed_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sJobFailedPods =
+ "Deprecated, use `k8s.job.pod.failed` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sJobFailedPods = "{pod}";
-static inline nostd::unique_ptr This metric aligns with the @code parallelism
+ @endcode field of the K8s
+ JobSpec. updowncounter
+ */
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sJobMaxParallelPods =
+ "k8s.job.max_parallel_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sJobMaxParallelPods =
+ "Deprecated, use `k8s.job.pod.max_parallel` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sJobMaxParallelPods = "{pod}";
+
+OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr
+ This metric aligns with the @code active @endcode field of the
+ K8s
+ JobStatus. updowncounter
+ */
+static constexpr const char *kMetricK8sJobPodActive = "k8s.job.pod.active";
+static constexpr const char *descrMetricK8sJobPodActive =
+ "The number of pending and actively running pods for a job.";
+static constexpr const char *unitMetricK8sJobPodActive = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code completions @endcode field of the
+ K8s
+ JobSpec.. updowncounter
+ */
+static constexpr const char *kMetricK8sJobPodDesiredSuccessful = "k8s.job.pod.desired_successful";
+static constexpr const char *descrMetricK8sJobPodDesiredSuccessful =
+ "The desired number of successfully finished pods the job should be run with.";
+static constexpr const char *unitMetricK8sJobPodDesiredSuccessful = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code failed @endcode field of the
+ K8s
+ JobStatus. updowncounter
+ */
+static constexpr const char *kMetricK8sJobPodFailed = "k8s.job.pod.failed";
+static constexpr const char *descrMetricK8sJobPodFailed =
+ "The number of pods which reached phase Failed for a job.";
+static constexpr const char *unitMetricK8sJobPodFailed = "{pod}";
+
+static inline nostd::unique_ptr
@@ -1311,78 +2094,117 @@ CreateAsyncDoubleMetricK8sJobFailedPods(metrics::Meter *meter)
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch">K8s
JobSpec. updowncounter
*/
-static constexpr const char *kMetricK8sJobMaxParallelPods = "k8s.job.max_parallel_pods";
-static constexpr const char *descrMetricK8sJobMaxParallelPods =
+static constexpr const char *kMetricK8sJobPodMaxParallel = "k8s.job.pod.max_parallel";
+static constexpr const char *descrMetricK8sJobPodMaxParallel =
"The max desired number of pods the job should run at any given time.";
-static constexpr const char *unitMetricK8sJobMaxParallelPods = "{pod}";
+static constexpr const char *unitMetricK8sJobPodMaxParallel = "{pod}";
+
+static inline nostd::unique_ptr
+ This metric aligns with the @code succeeded @endcode field of the
+ K8s
+ JobStatus. updowncounter
+ */
+static constexpr const char *kMetricK8sJobPodSuccessful = "k8s.job.pod.successful";
+static constexpr const char *descrMetricK8sJobPodSuccessful =
+ "The number of pods which reached phase Succeeded for a job.";
+static constexpr const char *unitMetricK8sJobPodSuccessful = "{pod}";
static inline nostd::unique_ptr
- This metric aligns with the @code succeeded @endcode field of the
- This metric aligns with the @code succeeded @endcode field of the K8s
JobStatus. updowncounter
*/
-static constexpr const char *kMetricK8sJobSuccessfulPods = "k8s.job.successful_pods";
-static constexpr const char *descrMetricK8sJobSuccessfulPods =
- "The number of pods which reached phase Succeeded for a job.";
-static constexpr const char *unitMetricK8sJobSuccessfulPods = "{pod}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sJobSuccessfulPods =
+ "k8s.job.successful_pods";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sJobSuccessfulPods =
+ "Deprecated, use `k8s.job.pod.successful` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sJobSuccessfulPods = "{pod}";
-static inline nostd::unique_ptr
- updowncounter
+ Deprecated, use @code k8s.node.cpu.allocatable @endcode instead.
+
+ @deprecated
+ {"note": "Replaced by @code k8s.node.cpu.allocatable @endcode.", "reason": "renamed",
+ "renamed_to": "k8s.node.cpu.allocatable"} updowncounter
*/
-static constexpr const char *kMetricK8sNodeAllocatableCpu = "k8s.node.allocatable.cpu";
-static constexpr const char *descrMetricK8sNodeAllocatableCpu =
- "Amount of cpu allocatable on the node.";
-static constexpr const char *unitMetricK8sNodeAllocatableCpu = "{cpu}";
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sNodeAllocatableCpu =
+ "k8s.node.allocatable.cpu";
+OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricK8sNodeAllocatableCpu =
+ "Deprecated, use `k8s.node.cpu.allocatable` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sNodeAllocatableCpu = "{cpu}";
-static inline nostd::unique_ptr
- updowncounter
+ Deprecated, use @code k8s.node.ephemeral_storage.allocatable @endcode instead.
+
+ @deprecated
+ {"note": "Replaced by @code k8s.node.ephemeral_storage.allocatable @endcode.", "reason":
+ "renamed", "renamed_to": "k8s.node.ephemeral_storage.allocatable"} updowncounter
*/
-static constexpr const char *kMetricK8sNodeAllocatableEphemeralStorage =
+OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricK8sNodeAllocatableEphemeralStorage =
"k8s.node.allocatable.ephemeral_storage";
-static constexpr const char *descrMetricK8sNodeAllocatableEphemeralStorage =
- "Amount of ephemeral-storage allocatable on the node.";
-static constexpr const char *unitMetricK8sNodeAllocatableEphemeralStorage = "By";
+OPENTELEMETRY_DEPRECATED static constexpr const char
+ *descrMetricK8sNodeAllocatableEphemeralStorage =
+ "Deprecated, use `k8s.node.ephemeral_storage.allocatable` instead.";
+OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricK8sNodeAllocatableEphemeralStorage =
+ "By";
-static inline nostd::unique_ptr
*/
@@ -439,8 +441,7 @@ static constexpr const char *kDbQueryText = "db.query.text";
Deprecated, use @code db.namespace @endcode instead.
@deprecated
- {"note": "Replaced by @code db.namespace @endcode.", "reason": "renamed", "renamed_to":
- "db.namespace"}
+ {"note": "Uncategorized.", "reason": "uncategorized"}
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kDbRedisDatabaseIndex =
"db.redis.database_index";
diff --git a/api/include/opentelemetry/semconv/incubating/dns_attributes.h b/api/include/opentelemetry/semconv/incubating/dns_attributes.h
index 827d4d51da..39dc7fe570 100644
--- a/api/include/opentelemetry/semconv/incubating/dns_attributes.h
+++ b/api/include/opentelemetry/semconv/incubating/dns_attributes.h
@@ -27,10 +27,8 @@ static constexpr const char *kDnsAnswers = "dns.answers";
/**
The name being queried.
+ [!WARNING]
+ This attribute may contain sensitive information.
+
+ [!WARNING]
+ This attribute may contain sensitive information.
+