diff --git a/api/include/opentelemetry/semconv/incubating/app_attributes.h b/api/include/opentelemetry/semconv/incubating/app_attributes.h index fdbad251b1..b8477ee3bb 100644 --- a/api/include/opentelemetry/semconv/incubating/app_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/app_attributes.h @@ -19,6 +19,11 @@ namespace semconv namespace app { +/** + Unique identifier for a particular build or compilation of the application. + */ +static constexpr const char *kAppBuildId = "app.build_id"; + /** A unique identifier representing the installation of an application on a specific device

@@ -42,11 +47,29 @@ namespace app Settings.getString(Settings.Secure.ANDROID_ID) @endcode.

- More information about Android identifier best practices can be found here. + More information about Android identifier best practices can be found in the Android user data IDs + guide. */ static constexpr const char *kAppInstallationId = "app.installation.id"; +/** + A number of frame renders that experienced jank. +

+ Depending on platform limitations, the value provided MAY be approximation. + */ +static constexpr const char *kAppJankFrameCount = "app.jank.frame_count"; + +/** + The time period, in seconds, for which this jank is being reported. + */ +static constexpr const char *kAppJankPeriod = "app.jank.period"; + +/** + The minimum rendering threshold for this jank, in seconds. + */ +static constexpr const char *kAppJankThreshold = "app.jank.threshold"; + /** The x (horizontal) coordinate of a screen coordinate, in screen pixels. */ diff --git a/api/include/opentelemetry/semconv/incubating/aws_attributes.h b/api/include/opentelemetry/semconv/incubating/aws_attributes.h index 2abf1b762d..d592255802 100644 --- a/api/include/opentelemetry/semconv/incubating/aws_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/aws_attributes.h @@ -409,12 +409,12 @@ static constexpr const char *kAwsStepFunctionsStateMachineArn = namespace AwsEcsLaunchtypeValues { /** - none + Amazon EC2 */ static constexpr const char *kEc2 = "ec2"; /** - none + Amazon Fargate */ static constexpr const char *kFargate = "fargate"; diff --git a/api/include/opentelemetry/semconv/incubating/azure_attributes.h b/api/include/opentelemetry/semconv/incubating/azure_attributes.h index 0c62bad288..1618050f9d 100644 --- a/api/include/opentelemetry/semconv/incubating/azure_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/azure_attributes.h @@ -92,27 +92,27 @@ static constexpr const char *kDirect = "direct"; namespace AzureCosmosdbConsistencyLevelValues { /** - none + Strong */ static constexpr const char *kStrong = "Strong"; /** - none + Bounded Staleness */ static constexpr const char *kBoundedStaleness = "BoundedStaleness"; /** - none + Session */ static constexpr const char *kSession = "Session"; /** - none + Eventual */ static constexpr const char *kEventual = "Eventual"; /** - none + Consistent Prefix */ static constexpr const char *kConsistentPrefix = "ConsistentPrefix"; diff --git a/api/include/opentelemetry/semconv/incubating/azure_metrics.h b/api/include/opentelemetry/semconv/incubating/azure_metrics.h index fb60c3ce53..98f265f5e1 100644 --- a/api/include/opentelemetry/semconv/incubating/azure_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/azure_metrics.h @@ -21,14 +21,14 @@ namespace azure { /** - Number of active client instances + Number of active client instances.

updowncounter */ static constexpr const char *kMetricAzureCosmosdbClientActiveInstanceCount = "azure.cosmosdb.client.active_instance.count"; static constexpr const char *descrMetricAzureCosmosdbClientActiveInstanceCount = - "Number of active client instances"; + "Number of active client instances."; static constexpr const char *unitMetricAzureCosmosdbClientActiveInstanceCount = "{instance}"; static inline nostd::unique_ptr> @@ -67,13 +67,13 @@ CreateAsyncDoubleMetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *me /** Request units consumed by - the operation

histogram + the operation.

histogram */ static constexpr const char *kMetricAzureCosmosdbClientOperationRequestCharge = "azure.cosmosdb.client.operation.request_charge"; static constexpr const char *descrMetricAzureCosmosdbClientOperationRequestCharge = "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the " - "operation"; + "operation."; static constexpr const char *unitMetricAzureCosmosdbClientOperationRequestCharge = "{request_unit}"; static inline nostd::unique_ptr> diff --git a/api/include/opentelemetry/semconv/incubating/cassandra_attributes.h b/api/include/opentelemetry/semconv/incubating/cassandra_attributes.h index 88a71ba5dd..c8db738089 100644 --- a/api/include/opentelemetry/semconv/incubating/cassandra_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/cassandra_attributes.h @@ -55,57 +55,57 @@ static constexpr const char *kCassandraSpeculativeExecutionCount = namespace CassandraConsistencyLevelValues { /** - none + All */ static constexpr const char *kAll = "all"; /** - none + Each Quorum */ static constexpr const char *kEachQuorum = "each_quorum"; /** - none + Quorum */ static constexpr const char *kQuorum = "quorum"; /** - none + Local Quorum */ static constexpr const char *kLocalQuorum = "local_quorum"; /** - none + One */ static constexpr const char *kOne = "one"; /** - none + Two */ static constexpr const char *kTwo = "two"; /** - none + Three */ static constexpr const char *kThree = "three"; /** - none + Local One */ static constexpr const char *kLocalOne = "local_one"; /** - none + Any */ static constexpr const char *kAny = "any"; /** - none + Serial */ static constexpr const char *kSerial = "serial"; /** - none + Local Serial */ static constexpr const char *kLocalSerial = "local_serial"; diff --git a/api/include/opentelemetry/semconv/incubating/container_attributes.h b/api/include/opentelemetry/semconv/incubating/container_attributes.h index 92213a1e6b..e0678618e2 100644 --- a/api/include/opentelemetry/semconv/incubating/container_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/container_attributes.h @@ -130,8 +130,28 @@ static constexpr const char *kContainerName = "container.name"; /** The container runtime managing this container. + + @deprecated + {"note": "Replaced by @code container.runtime.name @endcode.", "reason": "renamed", "renamed_to": + "container.runtime.name"} + */ +OPENTELEMETRY_DEPRECATED static constexpr const char *kContainerRuntime = "container.runtime"; + +/** + A description about the runtime which could include, for example details about the CRI/API version + being used or other customisations. + */ +static constexpr const char *kContainerRuntimeDescription = "container.runtime.description"; + +/** + The container runtime managing this container. + */ +static constexpr const char *kContainerRuntimeName = "container.runtime.name"; + +/** + The version of the runtime of this process, as returned by the runtime without modification. */ -static constexpr const char *kContainerRuntime = "container.runtime"; +static constexpr const char *kContainerRuntimeVersion = "container.runtime.version"; namespace ContainerCpuStateValues { diff --git a/api/include/opentelemetry/semconv/incubating/container_metrics.h b/api/include/opentelemetry/semconv/incubating/container_metrics.h index 69853e7771..1b86744224 100644 --- a/api/include/opentelemetry/semconv/incubating/container_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/container_metrics.h @@ -21,14 +21,14 @@ namespace container { /** - Total CPU time consumed + Total CPU time consumed.

Total CPU time consumed by the specific container on all available CPU cores

counter */ static constexpr const char *kMetricContainerCpuTime = "container.cpu.time"; -static constexpr const char *descrMetricContainerCpuTime = "Total CPU time consumed"; +static constexpr const char *descrMetricContainerCpuTime = "Total CPU time consumed."; static constexpr const char *unitMetricContainerCpuTime = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricContainerCpuTime( @@ -60,7 +60,7 @@ CreateAsyncDoubleMetricContainerCpuTime(metrics::Meter *meter) } /** - Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs + Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.

CPU usage of the specific container on all available CPU cores, averaged over the sample window

@@ -68,7 +68,7 @@ CreateAsyncDoubleMetricContainerCpuTime(metrics::Meter *meter) */ static constexpr const char *kMetricContainerCpuUsage = "container.cpu.usage"; static constexpr const char *descrMetricContainerCpuUsage = - "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs"; + "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs."; static constexpr const char *unitMetricContainerCpuUsage = "{cpu}"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -141,6 +141,154 @@ CreateAsyncDoubleMetricContainerDiskIo(metrics::Meter *meter) unitMetricContainerDiskIo); } +/** + Container filesystem available bytes. +

+ In K8s, this metric is derived from the + FsStats.AvailableBytes + field of the ContainerStats.Rootfs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricContainerFilesystemAvailable = "container.filesystem.available"; +static constexpr const char *descrMetricContainerFilesystemAvailable = + "Container filesystem available bytes."; +static constexpr const char *unitMetricContainerFilesystemAvailable = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricContainerFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricContainerFilesystemAvailable, + descrMetricContainerFilesystemAvailable, + unitMetricContainerFilesystemAvailable); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricContainerFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricContainerFilesystemAvailable, + descrMetricContainerFilesystemAvailable, + unitMetricContainerFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricContainerFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricContainerFilesystemAvailable, + descrMetricContainerFilesystemAvailable, + unitMetricContainerFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricContainerFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricContainerFilesystemAvailable, + descrMetricContainerFilesystemAvailable, + unitMetricContainerFilesystemAvailable); +} + +/** + Container filesystem capacity. +

+ In K8s, this metric is derived from the + FsStats.CapacityBytes + field of the ContainerStats.Rootfs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricContainerFilesystemCapacity = "container.filesystem.capacity"; +static constexpr const char *descrMetricContainerFilesystemCapacity = + "Container filesystem capacity."; +static constexpr const char *unitMetricContainerFilesystemCapacity = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricContainerFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricContainerFilesystemCapacity, + descrMetricContainerFilesystemCapacity, + unitMetricContainerFilesystemCapacity); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricContainerFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricContainerFilesystemCapacity, + descrMetricContainerFilesystemCapacity, + unitMetricContainerFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricContainerFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricContainerFilesystemCapacity, + descrMetricContainerFilesystemCapacity, + unitMetricContainerFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricContainerFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricContainerFilesystemCapacity, + descrMetricContainerFilesystemCapacity, + unitMetricContainerFilesystemCapacity); +} + +/** + Container filesystem usage. +

+ This may not equal capacity - available. +

+ In K8s, this metric is derived from the + FsStats.UsedBytes + field of the ContainerStats.Rootfs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricContainerFilesystemUsage = "container.filesystem.usage"; +static constexpr const char *descrMetricContainerFilesystemUsage = "Container filesystem usage."; +static constexpr const char *unitMetricContainerFilesystemUsage = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricContainerFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricContainerFilesystemUsage, + descrMetricContainerFilesystemUsage, + unitMetricContainerFilesystemUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricContainerFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricContainerFilesystemUsage, + descrMetricContainerFilesystemUsage, + unitMetricContainerFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricContainerFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricContainerFilesystemUsage, + descrMetricContainerFilesystemUsage, + unitMetricContainerFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricContainerFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricContainerFilesystemUsage, + descrMetricContainerFilesystemUsage, + unitMetricContainerFilesystemUsage); +} + /** Memory usage of the container.

@@ -220,15 +368,16 @@ CreateAsyncDoubleMetricContainerNetworkIo(metrics::Meter *meter) } /** - The time the container has been running + The time the container has been running.

Instrumentations SHOULD use a gauge with type @code double @endcode and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

gauge */ -static constexpr const char *kMetricContainerUptime = "container.uptime"; -static constexpr const char *descrMetricContainerUptime = "The time the container has been running"; -static constexpr const char *unitMetricContainerUptime = "s"; +static constexpr const char *kMetricContainerUptime = "container.uptime"; +static constexpr const char *descrMetricContainerUptime = + "The time the container has been running."; +static constexpr const char *unitMetricContainerUptime = "s"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 diff --git a/api/include/opentelemetry/semconv/incubating/cpu_attributes.h b/api/include/opentelemetry/semconv/incubating/cpu_attributes.h index c3c3ef58a5..f3b24e6950 100644 --- a/api/include/opentelemetry/semconv/incubating/cpu_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/cpu_attributes.h @@ -32,42 +32,42 @@ static constexpr const char *kCpuMode = "cpu.mode"; namespace CpuModeValues { /** - none + User */ static constexpr const char *kUser = "user"; /** - none + System */ static constexpr const char *kSystem = "system"; /** - none + Nice */ static constexpr const char *kNice = "nice"; /** - none + Idle */ static constexpr const char *kIdle = "idle"; /** - none + IO Wait */ static constexpr const char *kIowait = "iowait"; /** - none + Interrupt */ static constexpr const char *kInterrupt = "interrupt"; /** - none + Steal */ static constexpr const char *kSteal = "steal"; /** - none + Kernel */ static constexpr const char *kKernel = "kernel"; diff --git a/api/include/opentelemetry/semconv/incubating/db_attributes.h b/api/include/opentelemetry/semconv/incubating/db_attributes.h index c0c44276bc..31b8f2b74e 100644 --- a/api/include/opentelemetry/semconv/incubating/db_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/db_attributes.h @@ -517,87 +517,45 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kDbUser = "db.user"; namespace DbCassandraConsistencyLevelValues { -/** - none - */ + static constexpr const char *kAll = "all"; -/** - none - */ static constexpr const char *kEachQuorum = "each_quorum"; -/** - none - */ static constexpr const char *kQuorum = "quorum"; -/** - none - */ static constexpr const char *kLocalQuorum = "local_quorum"; -/** - none - */ static constexpr const char *kOne = "one"; -/** - none - */ static constexpr const char *kTwo = "two"; -/** - none - */ static constexpr const char *kThree = "three"; -/** - none - */ static constexpr const char *kLocalOne = "local_one"; -/** - none - */ static constexpr const char *kAny = "any"; -/** - none - */ static constexpr const char *kSerial = "serial"; -/** - none - */ static constexpr const char *kLocalSerial = "local_serial"; } // namespace DbCassandraConsistencyLevelValues namespace DbClientConnectionStateValues { -/** - none - */ + static constexpr const char *kIdle = "idle"; -/** - none - */ static constexpr const char *kUsed = "used"; } // namespace DbClientConnectionStateValues namespace DbClientConnectionsStateValues { -/** - none - */ + static constexpr const char *kIdle = "idle"; -/** - none - */ static constexpr const char *kUsed = "used"; } // namespace DbClientConnectionsStateValues @@ -618,108 +576,50 @@ static constexpr const char *kDirect = "direct"; namespace DbCosmosdbConsistencyLevelValues { -/** - none - */ + static constexpr const char *kStrong = "Strong"; -/** - none - */ static constexpr const char *kBoundedStaleness = "BoundedStaleness"; -/** - none - */ static constexpr const char *kSession = "Session"; -/** - none - */ static constexpr const char *kEventual = "Eventual"; -/** - none - */ static constexpr const char *kConsistentPrefix = "ConsistentPrefix"; } // namespace DbCosmosdbConsistencyLevelValues namespace DbCosmosdbOperationTypeValues { -/** - none - */ + static constexpr const char *kBatch = "batch"; -/** - none - */ static constexpr const char *kCreate = "create"; -/** - none - */ static constexpr const char *kDelete = "delete"; -/** - none - */ static constexpr const char *kExecute = "execute"; -/** - none - */ static constexpr const char *kExecuteJavascript = "execute_javascript"; -/** - none - */ static constexpr const char *kInvalid = "invalid"; -/** - none - */ static constexpr const char *kHead = "head"; -/** - none - */ static constexpr const char *kHeadFeed = "head_feed"; -/** - none - */ static constexpr const char *kPatch = "patch"; -/** - none - */ static constexpr const char *kQuery = "query"; -/** - none - */ static constexpr const char *kQueryPlan = "query_plan"; -/** - none - */ static constexpr const char *kRead = "read"; -/** - none - */ static constexpr const char *kReadFeed = "read_feed"; -/** - none - */ static constexpr const char *kReplace = "replace"; -/** - none - */ static constexpr const char *kUpsert = "upsert"; } // namespace DbCosmosdbOperationTypeValues @@ -738,8 +638,12 @@ static constexpr const char *kAdabas = "adabas"; /** Deprecated, use @code intersystems_cache @endcode instead. + + @deprecated + {"note": "Replaced by @code intersystems_cache @endcode.", "reason": "renamed", "renamed_to": + "intersystems_cache"} */ -static constexpr const char *kCache = "cache"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kCache = "cache"; /** InterSystems Caché @@ -758,8 +662,11 @@ static constexpr const char *kClickhouse = "clickhouse"; /** Deprecated, use @code other_sql @endcode instead. + + @deprecated + {"note": "Replaced by @code other_sql @endcode.", "reason": "renamed", "renamed_to": "other_sql"} */ -static constexpr const char *kCloudscape = "cloudscape"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kCloudscape = "cloudscape"; /** CockroachDB @@ -768,8 +675,11 @@ static constexpr const char *kCockroachdb = "cockroachdb"; /** Deprecated, no replacement at this time. + + @deprecated + {"note": "Obsoleted.", "reason": "obsoleted"} */ -static constexpr const char *kColdfusion = "coldfusion"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kColdfusion = "coldfusion"; /** Microsoft Azure Cosmos DB @@ -823,8 +733,11 @@ static constexpr const char *kFirebird = "firebird"; /** Deprecated, use @code other_sql @endcode instead. + + @deprecated + {"note": "Replaced by @code other_sql @endcode.", "reason": "renamed", "renamed_to": "other_sql"} */ -static constexpr const char *kFirstsql = "firstsql"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kFirstsql = "firstsql"; /** Apache Geode @@ -908,8 +821,11 @@ static constexpr const char *kMssql = "mssql"; /** Deprecated, Microsoft SQL Server Compact is discontinued. + + @deprecated + {"note": "Replaced by @code other_sql @endcode.", "reason": "renamed", "renamed_to": "other_sql"} */ -static constexpr const char *kMssqlcompact = "mssqlcompact"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kMssqlcompact = "mssqlcompact"; /** MySQL diff --git a/api/include/opentelemetry/semconv/incubating/db_metrics.h b/api/include/opentelemetry/semconv/incubating/db_metrics.h index 8b74c62bcf..935bad9d69 100644 --- a/api/include/opentelemetry/semconv/incubating/db_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/db_metrics.h @@ -22,11 +22,11 @@ namespace db /** The number of connections that are currently in state described by the @code state @endcode - attribute

updowncounter + attribute.

updowncounter */ static constexpr const char *kMetricDbClientConnectionCount = "db.client.connection.count"; static constexpr const char *descrMetricDbClientConnectionCount = - "The number of connections that are currently in state described by the `state` attribute"; + "The number of connections that are currently in state described by the `state` attribute."; static constexpr const char *unitMetricDbClientConnectionCount = "{connection}"; static inline nostd::unique_ptr> @@ -62,14 +62,14 @@ CreateAsyncDoubleMetricDbClientConnectionCount(metrics::Meter *meter) } /** - The time it took to create a new connection + The time it took to create a new connection.

histogram */ static constexpr const char *kMetricDbClientConnectionCreateTime = "db.client.connection.create_time"; static constexpr const char *descrMetricDbClientConnectionCreateTime = - "The time it took to create a new connection"; + "The time it took to create a new connection."; static constexpr const char *unitMetricDbClientConnectionCreateTime = "s"; static inline nostd::unique_ptr> @@ -89,13 +89,13 @@ CreateSyncDoubleMetricDbClientConnectionCreateTime(metrics::Meter *meter) } /** - The maximum number of idle open connections allowed + The maximum number of idle open connections allowed.

updowncounter */ static constexpr const char *kMetricDbClientConnectionIdleMax = "db.client.connection.idle.max"; static constexpr const char *descrMetricDbClientConnectionIdleMax = - "The maximum number of idle open connections allowed"; + "The maximum number of idle open connections allowed."; static constexpr const char *unitMetricDbClientConnectionIdleMax = "{connection}"; static inline nostd::unique_ptr> @@ -131,13 +131,13 @@ CreateAsyncDoubleMetricDbClientConnectionIdleMax(metrics::Meter *meter) } /** - The minimum number of idle open connections allowed + The minimum number of idle open connections allowed.

updowncounter */ static constexpr const char *kMetricDbClientConnectionIdleMin = "db.client.connection.idle.min"; static constexpr const char *descrMetricDbClientConnectionIdleMin = - "The minimum number of idle open connections allowed"; + "The minimum number of idle open connections allowed."; static constexpr const char *unitMetricDbClientConnectionIdleMin = "{connection}"; static inline nostd::unique_ptr> @@ -173,13 +173,13 @@ CreateAsyncDoubleMetricDbClientConnectionIdleMin(metrics::Meter *meter) } /** - The maximum number of open connections allowed + The maximum number of open connections allowed.

updowncounter */ static constexpr const char *kMetricDbClientConnectionMax = "db.client.connection.max"; static constexpr const char *descrMetricDbClientConnectionMax = - "The maximum number of open connections allowed"; + "The maximum number of open connections allowed."; static constexpr const char *unitMetricDbClientConnectionMax = "{connection}"; static inline nostd::unique_ptr> @@ -215,14 +215,14 @@ CreateAsyncDoubleMetricDbClientConnectionMax(metrics::Meter *meter) } /** - The number of current pending requests for an open connection + The number of current pending requests for an open connection.

updowncounter */ static constexpr const char *kMetricDbClientConnectionPendingRequests = "db.client.connection.pending_requests"; static constexpr const char *descrMetricDbClientConnectionPendingRequests = - "The number of current pending requests for an open connection"; + "The number of current pending requests for an open connection."; static constexpr const char *unitMetricDbClientConnectionPendingRequests = "{request}"; static inline nostd::unique_ptr> @@ -258,14 +258,14 @@ CreateAsyncDoubleMetricDbClientConnectionPendingRequests(metrics::Meter *meter) } /** - The number of connection timeouts that have occurred trying to obtain a connection from the pool + The number of connection timeouts that have occurred trying to obtain a connection from the pool.

counter */ static constexpr const char *kMetricDbClientConnectionTimeouts = "db.client.connection.timeouts"; static constexpr const char *descrMetricDbClientConnectionTimeouts = "The number of connection timeouts that have occurred trying to obtain a connection from the " - "pool"; + "pool."; static constexpr const char *unitMetricDbClientConnectionTimeouts = "{timeout}"; static inline nostd::unique_ptr> @@ -301,13 +301,13 @@ CreateAsyncDoubleMetricDbClientConnectionTimeouts(metrics::Meter *meter) } /** - The time between borrowing a connection and returning it to the pool + The time between borrowing a connection and returning it to the pool.

histogram */ static constexpr const char *kMetricDbClientConnectionUseTime = "db.client.connection.use_time"; static constexpr const char *descrMetricDbClientConnectionUseTime = - "The time between borrowing a connection and returning it to the pool"; + "The time between borrowing a connection and returning it to the pool."; static constexpr const char *unitMetricDbClientConnectionUseTime = "s"; static inline nostd::unique_ptr> @@ -327,13 +327,13 @@ CreateSyncDoubleMetricDbClientConnectionUseTime(metrics::Meter *meter) } /** - The time it took to obtain an open connection from the pool + The time it took to obtain an open connection from the pool.

histogram */ static constexpr const char *kMetricDbClientConnectionWaitTime = "db.client.connection.wait_time"; static constexpr const char *descrMetricDbClientConnectionWaitTime = - "The time it took to obtain an open connection from the pool"; + "The time it took to obtain an open connection from the pool."; static constexpr const char *unitMetricDbClientConnectionWaitTime = "s"; static inline nostd::unique_ptr> diff --git a/api/include/opentelemetry/semconv/incubating/deployment_attributes.h b/api/include/opentelemetry/semconv/incubating/deployment_attributes.h index 33209ebbf0..80f240663c 100644 --- a/api/include/opentelemetry/semconv/incubating/deployment_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/deployment_attributes.h @@ -20,7 +20,7 @@ namespace deployment { /** - 'Deprecated, use @code deployment.environment.name @endcode instead.' + Deprecated, use @code deployment.environment.name @endcode instead. @deprecated {"note": "Replaced by @code deployment.environment.name @endcode.", "reason": "renamed", diff --git a/api/include/opentelemetry/semconv/incubating/device_attributes.h b/api/include/opentelemetry/semconv/incubating/device_attributes.h index f69856ee4f..e801686f41 100644 --- a/api/include/opentelemetry/semconv/incubating/device_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/device_attributes.h @@ -25,8 +25,9 @@ namespace device Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed. However, it might be resettable by the user for all apps on a device. Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as - values.

More information about Android identifier best practices can be found here.

+ values.

More information about Android identifier best practices can be found in the Android user data IDs + guide.

[!WARNING]

This attribute may contain sensitive (PII) information. Caution should be taken when storing diff --git a/api/include/opentelemetry/semconv/incubating/disk_attributes.h b/api/include/opentelemetry/semconv/incubating/disk_attributes.h index c2504d75ff..3e3e209b8f 100644 --- a/api/include/opentelemetry/semconv/incubating/disk_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/disk_attributes.h @@ -26,14 +26,9 @@ static constexpr const char *kDiskIoDirection = "disk.io.direction"; namespace DiskIoDirectionValues { -/** - none - */ + static constexpr const char *kRead = "read"; -/** - none - */ static constexpr const char *kWrite = "write"; } // namespace DiskIoDirectionValues diff --git a/api/include/opentelemetry/semconv/incubating/enduser_attributes.h b/api/include/opentelemetry/semconv/incubating/enduser_attributes.h index 9120aa2c05..d117dd268e 100644 --- a/api/include/opentelemetry/semconv/incubating/enduser_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/enduser_attributes.h @@ -40,7 +40,8 @@ static constexpr const char *kEnduserPseudoId = "enduser.pseudo.id"; Deprecated, use @code user.roles @endcode instead. @deprecated - {"note": "Use @code user.roles @endcode attribute instead.", "reason": "uncategorized"} + {"note": "Replaced by @code user.roles @endcode.", "reason": "renamed", "renamed_to": + "user.roles"} */ OPENTELEMETRY_DEPRECATED static constexpr const char *kEnduserRole = "enduser.role"; diff --git a/api/include/opentelemetry/semconv/incubating/faas_metrics.h b/api/include/opentelemetry/semconv/incubating/faas_metrics.h index 99888cde9d..868eac024e 100644 --- a/api/include/opentelemetry/semconv/incubating/faas_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/faas_metrics.h @@ -21,12 +21,12 @@ namespace faas { /** - Number of invocation cold starts + Number of invocation cold starts.

counter */ static constexpr const char *kMetricFaasColdstarts = "faas.coldstarts"; -static constexpr const char *descrMetricFaasColdstarts = "Number of invocation cold starts"; +static constexpr const char *descrMetricFaasColdstarts = "Number of invocation cold starts."; static constexpr const char *unitMetricFaasColdstarts = "{coldstart}"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasColdstarts( @@ -58,12 +58,12 @@ CreateAsyncDoubleMetricFaasColdstarts(metrics::Meter *meter) } /** - Distribution of CPU usage per invocation + Distribution of CPU usage per invocation.

histogram */ static constexpr const char *kMetricFaasCpuUsage = "faas.cpu_usage"; -static constexpr const char *descrMetricFaasCpuUsage = "Distribution of CPU usage per invocation"; +static constexpr const char *descrMetricFaasCpuUsage = "Distribution of CPU usage per invocation."; static constexpr const char *unitMetricFaasCpuUsage = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasCpuUsage( @@ -81,12 +81,12 @@ static inline nostd::unique_ptr> CreateSyncDoubleMetr } /** - Number of invocation errors + Number of invocation errors.

counter */ static constexpr const char *kMetricFaasErrors = "faas.errors"; -static constexpr const char *descrMetricFaasErrors = "Number of invocation errors"; +static constexpr const char *descrMetricFaasErrors = "Number of invocation errors."; static constexpr const char *unitMetricFaasErrors = "{error}"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasErrors( @@ -116,13 +116,13 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Measures the duration of the function's initialization, such as a cold start + Measures the duration of the function's initialization, such as a cold start.

histogram */ static constexpr const char *kMetricFaasInitDuration = "faas.init_duration"; static constexpr const char *descrMetricFaasInitDuration = - "Measures the duration of the function's initialization, such as a cold start"; + "Measures the duration of the function's initialization, such as a cold start."; static constexpr const char *unitMetricFaasInitDuration = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasInitDuration( @@ -140,12 +140,12 @@ static inline nostd::unique_ptr> CreateSyncDoubleMetr } /** - Number of successful invocations + Number of successful invocations.

counter */ static constexpr const char *kMetricFaasInvocations = "faas.invocations"; -static constexpr const char *descrMetricFaasInvocations = "Number of successful invocations"; +static constexpr const char *descrMetricFaasInvocations = "Number of successful invocations."; static constexpr const char *unitMetricFaasInvocations = "{invocation}"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasInvocations( @@ -177,13 +177,13 @@ CreateAsyncDoubleMetricFaasInvocations(metrics::Meter *meter) } /** - Measures the duration of the function's logic execution + Measures the duration of the function's logic execution.

histogram */ static constexpr const char *kMetricFaasInvokeDuration = "faas.invoke_duration"; static constexpr const char *descrMetricFaasInvokeDuration = - "Measures the duration of the function's logic execution"; + "Measures the duration of the function's logic execution."; static constexpr const char *unitMetricFaasInvokeDuration = "s"; static inline nostd::unique_ptr> @@ -201,13 +201,13 @@ CreateSyncDoubleMetricFaasInvokeDuration(metrics::Meter *meter) } /** - Distribution of max memory usage per invocation + Distribution of max memory usage per invocation.

histogram */ static constexpr const char *kMetricFaasMemUsage = "faas.mem_usage"; static constexpr const char *descrMetricFaasMemUsage = - "Distribution of max memory usage per invocation"; + "Distribution of max memory usage per invocation."; static constexpr const char *unitMetricFaasMemUsage = "By"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasMemUsage( @@ -225,12 +225,12 @@ static inline nostd::unique_ptr> CreateSyncDoubleMetr } /** - Distribution of net I/O usage per invocation + Distribution of net I/O usage per invocation.

histogram */ static constexpr const char *kMetricFaasNetIo = "faas.net_io"; -static constexpr const char *descrMetricFaasNetIo = "Distribution of net I/O usage per invocation"; +static constexpr const char *descrMetricFaasNetIo = "Distribution of net I/O usage per invocation."; static constexpr const char *unitMetricFaasNetIo = "By"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasNetIo( @@ -246,12 +246,12 @@ static inline nostd::unique_ptr> CreateSyncDoubleMetr } /** - Number of invocation timeouts + Number of invocation timeouts.

counter */ static constexpr const char *kMetricFaasTimeouts = "faas.timeouts"; -static constexpr const char *descrMetricFaasTimeouts = "Number of invocation timeouts"; +static constexpr const char *descrMetricFaasTimeouts = "Number of invocation timeouts."; static constexpr const char *unitMetricFaasTimeouts = "{timeout}"; static inline nostd::unique_ptr> CreateSyncInt64MetricFaasTimeouts( diff --git a/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h b/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h index 95f11c7fc4..50bfff5317 100644 --- a/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/gen_ai_attributes.h @@ -61,6 +61,23 @@ static constexpr const char *kGenAiConversationId = "gen_ai.conversation.id"; */ static constexpr const char *kGenAiDataSourceId = "gen_ai.data_source.id"; +/** + The chat history provided to the model as an input. +

+ Instrumentations MUST follow Input messages JSON + schema. When the attribute is recorded on events, it MUST be recorded in structured form. 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.

Messages MUST be provided in the order they + were sent to the model. Instrumentations MAY provide a way for users to filter or truncate input + messages.

+ [!Warning] + This attribute is likely to contain sensitive information including user/PII data.
+

+ See Recording content on + attributes section for more details. + */ +static constexpr const char *kGenAiInputMessages = "gen_ai.input.messages"; + /** Deprecated, use @code gen_ai.output.type @endcode. @@ -82,20 +99,33 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiOpenaiRequestSeed = "gen_ai.openai.request.seed"; /** - The service tier requested. May be a specific tier, default, or auto. + Deprecated, use @code openai.request.service_tier @endcode. + + @deprecated + {"note": "Replaced by @code openai.request.service_tier @endcode.", "reason": "renamed", + "renamed_to": "openai.request.service_tier"} */ -static constexpr const char *kGenAiOpenaiRequestServiceTier = "gen_ai.openai.request.service_tier"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiOpenaiRequestServiceTier = + "gen_ai.openai.request.service_tier"; /** - The service tier used for the response. + Deprecated, use @code openai.response.service_tier @endcode. + + @deprecated + {"note": "Replaced by @code openai.response.service_tier @endcode.", "reason": "renamed", + "renamed_to": "openai.response.service_tier"} */ -static constexpr const char *kGenAiOpenaiResponseServiceTier = +OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiOpenaiResponseServiceTier = "gen_ai.openai.response.service_tier"; /** - A fingerprint to track any eventual change in the Generative AI environment. + Deprecated, use @code openai.response.system_fingerprint @endcode. + + @deprecated + {"note": "Replaced by @code openai.response.system_fingerprint @endcode.", "reason": "renamed", + "renamed_to": "openai.response.system_fingerprint"} */ -static constexpr const char *kGenAiOpenaiResponseSystemFingerprint = +OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiOpenaiResponseSystemFingerprint = "gen_ai.openai.response.system_fingerprint"; /** @@ -108,6 +138,29 @@ static constexpr const char *kGenAiOpenaiResponseSystemFingerprint = */ static constexpr const char *kGenAiOperationName = "gen_ai.operation.name"; +/** + Messages returned by the model where each message represents a specific model response (choice, + candidate).

Instrumentations MUST follow Output messages JSON schema

Each message + represents a single output choice/candidate generated by the model. Each message corresponds to + exactly one generation (choice/candidate) and vice versa - one choice cannot be split across + multiple messages or one message cannot contain parts from multiple choices. +

+ When the attribute is recorded on events, it MUST be recorded in structured + form. 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. +

+ Instrumentations MAY provide a way for users to filter or truncate + output messages. +

+ [!Warning] + This attribute is likely to contain sensitive information including user/PII data.
+

+ See Recording content on + attributes section for more details. + */ +static constexpr const char *kGenAiOutputMessages = "gen_ai.output.messages"; + /** Represents the content type requested by the client.

@@ -127,6 +180,28 @@ static constexpr const char *kGenAiOutputType = "gen_ai.output.type"; */ OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiPrompt = "gen_ai.prompt"; +/** + The Generative AI provider as identified by the client or server instrumentation. +

+ The attribute SHOULD be set based on the instrumentation's best + knowledge and may differ from the actual model provider. +

+ Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms + are accessible using the OpenAI REST API and corresponding client libraries, + but may proxy or host models from different providers. +

+ The @code gen_ai.request.model @endcode, @code gen_ai.response.model @endcode, and @code + server.address @endcode attributes may help identify the actual system in use.

The @code + gen_ai.provider.name @endcode attribute acts as a discriminator that identifies the GenAI + telemetry format flavor specific to that provider within GenAI semantic conventions. It SHOULD be + set consistently with provider-specific attributes and signals. For example, GenAI spans, metrics, + and events related to AWS Bedrock should have the @code gen_ai.provider.name @endcode set to @code + aws.bedrock @endcode and include applicable @code aws.bedrock.* @endcode attributes and are not + expected to include + @code openai.* @endcode attributes. + */ +static constexpr const char *kGenAiProviderName = "gen_ai.provider.name"; + /** The target number of candidate completions to return. */ @@ -201,20 +276,37 @@ static constexpr const char *kGenAiResponseId = "gen_ai.response.id"; static constexpr const char *kGenAiResponseModel = "gen_ai.response.model"; /** - The Generative AI product as identified by the client or server instrumentation. + Deprecated, use @code gen_ai.provider.name @endcode instead. + + @deprecated + {"note": "Replaced by @code gen_ai.provider.name @endcode.", "reason": "renamed", "renamed_to": + "gen_ai.provider.name"} + */ +OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiSystem = "gen_ai.system"; + +/** + The system message or instructions provided to the GenAI model separately from the chat history. +

+ This attribute SHOULD be used when the corresponding provider or API + allows to provide system instructions or messages separately from the + chat history.

- The @code gen_ai.system @endcode describes a family of GenAI models with specific model identified - by @code gen_ai.request.model @endcode and @code gen_ai.response.model @endcode attributes. + Instructions that are part of the chat history SHOULD be recorded in + @code gen_ai.input.messages @endcode attribute instead.

- The actual GenAI product may differ from the one identified by the client. - Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client - libraries. In such cases, the @code gen_ai.system @endcode is set to @code openai @endcode based - on the instrumentation's best knowledge, instead of the actual system. The @code server.address - @endcode attribute may help identify the actual system in use for @code openai @endcode.

For - custom model, a custom friendly name SHOULD be used. If none of these options apply, the @code - gen_ai.system @endcode SHOULD be set to @code _OTHER @endcode. + Instrumentations MUST follow System + instructions JSON schema.

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.

+ Instrumentations MAY provide a way for users to filter or truncate + system instructions. +

+ [!Warning] + This attribute may contain sensitive information.
+

+ See Recording content on + attributes section for more details. */ -static constexpr const char *kGenAiSystem = "gen_ai.system"; +static constexpr const char *kGenAiSystemInstructions = "gen_ai.system_instructions"; /** The type of token being counted. @@ -381,6 +473,85 @@ static constexpr const char *kSpeech = "speech"; } // namespace GenAiOutputTypeValues +namespace GenAiProviderNameValues +{ +/** + OpenAI + */ +static constexpr const char *kOpenai = "openai"; + +/** + Any Google generative AI endpoint + */ +static constexpr const char *kGcpGenAi = "gcp.gen_ai"; + +/** + Vertex AI + */ +static constexpr const char *kGcpVertexAi = "gcp.vertex_ai"; + +/** + Gemini + */ +static constexpr const char *kGcpGemini = "gcp.gemini"; + +/** + Anthropic + */ +static constexpr const char *kAnthropic = "anthropic"; + +/** + Cohere + */ +static constexpr const char *kCohere = "cohere"; + +/** + Azure AI Inference + */ +static constexpr const char *kAzureAiInference = "azure.ai.inference"; + +/** + Azure OpenAI + */ +static constexpr const char *kAzureAiOpenai = "azure.ai.openai"; + +/** + IBM Watsonx AI + */ +static constexpr const char *kIbmWatsonxAi = "ibm.watsonx.ai"; + +/** + AWS Bedrock + */ +static constexpr const char *kAwsBedrock = "aws.bedrock"; + +/** + Perplexity + */ +static constexpr const char *kPerplexity = "perplexity"; + +/** + xAI + */ +static constexpr const char *kXAi = "x_ai"; + +/** + DeepSeek + */ +static constexpr const char *kDeepseek = "deepseek"; + +/** + Groq + */ +static constexpr const char *kGroq = "groq"; + +/** + Mistral AI + */ +static constexpr const char *kMistralAi = "mistral_ai"; + +} // namespace GenAiProviderNameValues + namespace GenAiSystemValues { /** @@ -405,13 +576,21 @@ static constexpr const char *kGcpGemini = "gcp.gemini"; /** Vertex AI + + @deprecated + {"note": "Replaced by @code gcp.vertex_ai @endcode.", "reason": "renamed", "renamed_to": + "gcp.vertex_ai"} */ -static constexpr const char *kVertexAi = "vertex_ai"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kVertexAi = "vertex_ai"; /** Gemini + + @deprecated + {"note": "Replaced by @code gcp.gemini @endcode.", "reason": "renamed", "renamed_to": + "gcp.gemini"} */ -static constexpr const char *kGemini = "gemini"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kGemini = "gemini"; /** Anthropic @@ -426,22 +605,22 @@ static constexpr const char *kCohere = "cohere"; /** Azure AI Inference */ -static constexpr const char *kAzureAiInference = "azure.ai.inference"; +static constexpr const char *kAzAiInference = "az.ai.inference"; /** Azure OpenAI */ -static constexpr const char *kAzureAiOpenai = "azure.ai.openai"; +static constexpr const char *kAzAiOpenai = "az.ai.openai"; /** Azure AI Inference */ -static constexpr const char *kAzAiInference = "az.ai.inference"; +static constexpr const char *kAzureAiInference = "azure.ai.inference"; /** Azure OpenAI */ -static constexpr const char *kAzAiOpenai = "azure.ai.openai"; +static constexpr const char *kAzureAiOpenai = "azure.ai.openai"; /** IBM Watsonx AI @@ -460,8 +639,11 @@ static constexpr const char *kPerplexity = "perplexity"; /** xAI + + @deprecated + {"note": "Replaced by @code x_ai @endcode.", "reason": "renamed", "renamed_to": "x_ai"} */ -static constexpr const char *kXai = "xai"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kXai = "xai"; /** DeepSeek @@ -489,8 +671,11 @@ static constexpr const char *kInput = "input"; /** Output tokens (completion, response, etc.) + + @deprecated + {"note": "Replaced by @code output @endcode.", "reason": "renamed", "renamed_to": "output"} */ -static constexpr const char *kCompletion = "output"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kCompletion = "output"; /** Output tokens (completion, response, etc.) diff --git a/api/include/opentelemetry/semconv/incubating/gen_ai_metrics.h b/api/include/opentelemetry/semconv/incubating/gen_ai_metrics.h index 2cd11bd546..a5798f9dbc 100644 --- a/api/include/opentelemetry/semconv/incubating/gen_ai_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/gen_ai_metrics.h @@ -21,13 +21,13 @@ namespace gen_ai { /** - GenAI operation duration + GenAI operation duration.

histogram */ static constexpr const char *kMetricGenAiClientOperationDuration = "gen_ai.client.operation.duration"; -static constexpr const char *descrMetricGenAiClientOperationDuration = "GenAI operation duration"; +static constexpr const char *descrMetricGenAiClientOperationDuration = "GenAI operation duration."; static constexpr const char *unitMetricGenAiClientOperationDuration = "s"; static inline nostd::unique_ptr> @@ -47,13 +47,13 @@ CreateSyncDoubleMetricGenAiClientOperationDuration(metrics::Meter *meter) } /** - Measures number of input and output tokens used + Number of input and output tokens used.

histogram */ static constexpr const char *kMetricGenAiClientTokenUsage = "gen_ai.client.token.usage"; static constexpr const char *descrMetricGenAiClientTokenUsage = - "Measures number of input and output tokens used"; + "Number of input and output tokens used."; static constexpr const char *unitMetricGenAiClientTokenUsage = "{token}"; static inline nostd::unique_ptr> @@ -73,13 +73,13 @@ CreateSyncDoubleMetricGenAiClientTokenUsage(metrics::Meter *meter) } /** - Generative AI server request duration such as time-to-last byte or last output token + Generative AI server request duration such as time-to-last byte or last output token.

histogram */ static constexpr const char *kMetricGenAiServerRequestDuration = "gen_ai.server.request.duration"; static constexpr const char *descrMetricGenAiServerRequestDuration = - "Generative AI server request duration such as time-to-last byte or last output token"; + "Generative AI server request duration such as time-to-last byte or last output token."; static constexpr const char *unitMetricGenAiServerRequestDuration = "s"; static inline nostd::unique_ptr> @@ -99,14 +99,14 @@ CreateSyncDoubleMetricGenAiServerRequestDuration(metrics::Meter *meter) } /** - Time per output token generated after the first token for successful responses + Time per output token generated after the first token for successful responses.

histogram */ static constexpr const char *kMetricGenAiServerTimePerOutputToken = "gen_ai.server.time_per_output_token"; static constexpr const char *descrMetricGenAiServerTimePerOutputToken = - "Time per output token generated after the first token for successful responses"; + "Time per output token generated after the first token for successful responses."; static constexpr const char *unitMetricGenAiServerTimePerOutputToken = "s"; static inline nostd::unique_ptr> @@ -126,14 +126,14 @@ CreateSyncDoubleMetricGenAiServerTimePerOutputToken(metrics::Meter *meter) } /** - Time to generate first token for successful responses + Time to generate first token for successful responses.

histogram */ static constexpr const char *kMetricGenAiServerTimeToFirstToken = "gen_ai.server.time_to_first_token"; static constexpr const char *descrMetricGenAiServerTimeToFirstToken = - "Time to generate first token for successful responses"; + "Time to generate first token for successful responses."; static constexpr const char *unitMetricGenAiServerTimeToFirstToken = "s"; static inline nostd::unique_ptr> diff --git a/api/include/opentelemetry/semconv/incubating/hw_attributes.h b/api/include/opentelemetry/semconv/incubating/hw_attributes.h index 04c8a7638b..2ffcfd16f0 100644 --- a/api/include/opentelemetry/semconv/incubating/hw_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/hw_attributes.h @@ -19,27 +19,134 @@ namespace semconv namespace hw { +/** + Design capacity in Watts-hours or Amper-hours + */ +static constexpr const char *kHwBatteryCapacity = "hw.battery.capacity"; + +/** + Battery chemistry, + e.g. Lithium-Ion, Nickel-Cadmium, etc. + */ +static constexpr const char *kHwBatteryChemistry = "hw.battery.chemistry"; + +/** + The current state of the battery + */ +static constexpr const char *kHwBatteryState = "hw.battery.state"; + +/** + BIOS version of the hardware component + */ +static constexpr const char *kHwBiosVersion = "hw.bios_version"; + +/** + Driver version for the hardware component + */ +static constexpr const char *kHwDriverVersion = "hw.driver_version"; + +/** + Type of the enclosure (useful for modular systems) + */ +static constexpr const char *kHwEnclosureType = "hw.enclosure.type"; + +/** + Firmware version of the hardware component + */ +static constexpr const char *kHwFirmwareVersion = "hw.firmware_version"; + +/** + Type of task the GPU is performing + */ +static constexpr const char *kHwGpuTask = "hw.gpu.task"; + /** An identifier for the hardware component, unique within the monitored host */ static constexpr const char *kHwId = "hw.id"; +/** + Type of limit for hardware components + */ +static constexpr const char *kHwLimitType = "hw.limit_type"; + +/** + RAID Level of the logical disk + */ +static constexpr const char *kHwLogicalDiskRaidLevel = "hw.logical_disk.raid_level"; + +/** + State of the logical disk space usage + */ +static constexpr const char *kHwLogicalDiskState = "hw.logical_disk.state"; + +/** + Type of the memory module + */ +static constexpr const char *kHwMemoryType = "hw.memory.type"; + +/** + Descriptive model name of the hardware component + */ +static constexpr const char *kHwModel = "hw.model"; + /** An easily-recognizable name for the hardware component */ static constexpr const char *kHwName = "hw.name"; +/** + Logical addresses of the adapter (e.g. IP address, or WWPN) + */ +static constexpr const char *kHwNetworkLogicalAddresses = "hw.network.logical_addresses"; + +/** + Physical address of the adapter (e.g. MAC address, or WWNN) + */ +static constexpr const char *kHwNetworkPhysicalAddress = "hw.network.physical_address"; + /** Unique identifier of the parent component (typically the @code hw.id @endcode attribute of the enclosure, or disk controller) */ static constexpr const char *kHwParent = "hw.parent"; +/** + S.M.A.R.T. (Self-Monitoring, Analysis, and + Reporting Technology) attribute of the physical disk + */ +static constexpr const char *kHwPhysicalDiskSmartAttribute = "hw.physical_disk.smart_attribute"; + +/** + State of the physical disk endurance utilization + */ +static constexpr const char *kHwPhysicalDiskState = "hw.physical_disk.state"; + +/** + Type of the physical disk + */ +static constexpr const char *kHwPhysicalDiskType = "hw.physical_disk.type"; + +/** + Location of the sensor + */ +static constexpr const char *kHwSensorLocation = "hw.sensor_location"; + +/** + Serial number of the hardware component + */ +static constexpr const char *kHwSerialNumber = "hw.serial_number"; + /** The current state of the component */ static constexpr const char *kHwState = "hw.state"; +/** + Type of tape drive operation + */ +static constexpr const char *kHwTapeDriveOperationType = "hw.tape_drive.operation_type"; + /** Type of the component

@@ -50,25 +157,164 @@ static constexpr const char *kHwState = "hw.state"; */ static constexpr const char *kHwType = "hw.type"; -namespace HwStateValues +/** + Vendor name of the hardware component + */ +static constexpr const char *kHwVendor = "hw.vendor"; + +namespace HwBatteryStateValues { /** - Ok + Charging */ -static constexpr const char *kOk = "ok"; +static constexpr const char *kCharging = "charging"; + +/** + Discharging + */ +static constexpr const char *kDischarging = "discharging"; + +} // namespace HwBatteryStateValues + +namespace HwGpuTaskValues +{ +/** + Decoder + */ +static constexpr const char *kDecoder = "decoder"; + +/** + Encoder + */ +static constexpr const char *kEncoder = "encoder"; + +/** + General + */ +static constexpr const char *kGeneral = "general"; + +} // namespace HwGpuTaskValues + +namespace HwLimitTypeValues +{ +/** + Critical + */ +static constexpr const char *kCritical = "critical"; /** Degraded */ static constexpr const char *kDegraded = "degraded"; +/** + High Critical + */ +static constexpr const char *kHighCritical = "high.critical"; + +/** + High Degraded + */ +static constexpr const char *kHighDegraded = "high.degraded"; + +/** + Low Critical + */ +static constexpr const char *kLowCritical = "low.critical"; + +/** + Low Degraded + */ +static constexpr const char *kLowDegraded = "low.degraded"; + +/** + Maximum + */ +static constexpr const char *kMax = "max"; + +/** + Throttled + */ +static constexpr const char *kThrottled = "throttled"; + +/** + Turbo + */ +static constexpr const char *kTurbo = "turbo"; + +} // namespace HwLimitTypeValues + +namespace HwLogicalDiskStateValues +{ +/** + Used + */ +static constexpr const char *kUsed = "used"; + +/** + Free + */ +static constexpr const char *kFree = "free"; + +} // namespace HwLogicalDiskStateValues + +namespace HwPhysicalDiskStateValues +{ +/** + Remaining + */ +static constexpr const char *kRemaining = "remaining"; + +} // namespace HwPhysicalDiskStateValues + +namespace HwStateValues +{ +/** + Degraded + */ +static constexpr const char *kDegraded = "degraded"; + /** Failed */ static constexpr const char *kFailed = "failed"; +/** + Needs Cleaning + */ +static constexpr const char *kNeedsCleaning = "needs_cleaning"; + +/** + OK + */ +static constexpr const char *kOk = "ok"; + +/** + Predicted Failure + */ +static constexpr const char *kPredictedFailure = "predicted_failure"; + } // namespace HwStateValues +namespace HwTapeDriveOperationTypeValues +{ +/** + Mount + */ +static constexpr const char *kMount = "mount"; + +/** + Unmount + */ +static constexpr const char *kUnmount = "unmount"; + +/** + Clean + */ +static constexpr const char *kClean = "clean"; + +} // namespace HwTapeDriveOperationTypeValues + namespace HwTypeValues { /** diff --git a/api/include/opentelemetry/semconv/incubating/hw_metrics.h b/api/include/opentelemetry/semconv/incubating/hw_metrics.h index e73e9edeb8..fe39111265 100644 --- a/api/include/opentelemetry/semconv/incubating/hw_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/hw_metrics.h @@ -21,12 +21,212 @@ namespace hw { /** - Energy consumed by the component + Remaining fraction of battery charge. +

+ gauge + */ +static constexpr const char *kMetricHwBatteryCharge = "hw.battery.charge"; +static constexpr const char *descrMetricHwBatteryCharge = "Remaining fraction of battery charge."; +static constexpr const char *unitMetricHwBatteryCharge = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwBatteryCharge( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwBatteryCharge, descrMetricHwBatteryCharge, + unitMetricHwBatteryCharge); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwBatteryCharge( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwBatteryCharge, descrMetricHwBatteryCharge, + unitMetricHwBatteryCharge); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwBatteryCharge(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwBatteryCharge, descrMetricHwBatteryCharge, + unitMetricHwBatteryCharge); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwBatteryCharge(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwBatteryCharge, descrMetricHwBatteryCharge, + unitMetricHwBatteryCharge); +} + +/** + Lower limit of battery charge fraction to ensure proper operation. +

+ gauge + */ +static constexpr const char *kMetricHwBatteryChargeLimit = "hw.battery.charge.limit"; +static constexpr const char *descrMetricHwBatteryChargeLimit = + "Lower limit of battery charge fraction to ensure proper operation."; +static constexpr const char *unitMetricHwBatteryChargeLimit = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwBatteryChargeLimit( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwBatteryChargeLimit, descrMetricHwBatteryChargeLimit, + unitMetricHwBatteryChargeLimit); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwBatteryChargeLimit( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwBatteryChargeLimit, descrMetricHwBatteryChargeLimit, + unitMetricHwBatteryChargeLimit); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwBatteryChargeLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge( + kMetricHwBatteryChargeLimit, descrMetricHwBatteryChargeLimit, unitMetricHwBatteryChargeLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwBatteryChargeLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge( + kMetricHwBatteryChargeLimit, descrMetricHwBatteryChargeLimit, unitMetricHwBatteryChargeLimit); +} + +/** + Time left before battery is completely charged or discharged. +

+ gauge + */ +static constexpr const char *kMetricHwBatteryTimeLeft = "hw.battery.time_left"; +static constexpr const char *descrMetricHwBatteryTimeLeft = + "Time left before battery is completely charged or discharged."; +static constexpr const char *unitMetricHwBatteryTimeLeft = "s"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwBatteryTimeLeft( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwBatteryTimeLeft, descrMetricHwBatteryTimeLeft, + unitMetricHwBatteryTimeLeft); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwBatteryTimeLeft( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwBatteryTimeLeft, descrMetricHwBatteryTimeLeft, + unitMetricHwBatteryTimeLeft); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwBatteryTimeLeft(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwBatteryTimeLeft, descrMetricHwBatteryTimeLeft, + unitMetricHwBatteryTimeLeft); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwBatteryTimeLeft(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwBatteryTimeLeft, descrMetricHwBatteryTimeLeft, + unitMetricHwBatteryTimeLeft); +} + +/** + CPU current frequency. +

+ gauge + */ +static constexpr const char *kMetricHwCpuSpeed = "hw.cpu.speed"; +static constexpr const char *descrMetricHwCpuSpeed = "CPU current frequency."; +static constexpr const char *unitMetricHwCpuSpeed = "Hz"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwCpuSpeed( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwCpuSpeed, descrMetricHwCpuSpeed, unitMetricHwCpuSpeed); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwCpuSpeed( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwCpuSpeed, descrMetricHwCpuSpeed, unitMetricHwCpuSpeed); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwCpuSpeed( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwCpuSpeed, descrMetricHwCpuSpeed, + unitMetricHwCpuSpeed); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwCpuSpeed( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwCpuSpeed, descrMetricHwCpuSpeed, + unitMetricHwCpuSpeed); +} + +/** + CPU maximum frequency. +

+ gauge + */ +static constexpr const char *kMetricHwCpuSpeedLimit = "hw.cpu.speed.limit"; +static constexpr const char *descrMetricHwCpuSpeedLimit = "CPU maximum frequency."; +static constexpr const char *unitMetricHwCpuSpeedLimit = "Hz"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwCpuSpeedLimit( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwCpuSpeedLimit, descrMetricHwCpuSpeedLimit, + unitMetricHwCpuSpeedLimit); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwCpuSpeedLimit( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwCpuSpeedLimit, descrMetricHwCpuSpeedLimit, + unitMetricHwCpuSpeedLimit); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwCpuSpeedLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwCpuSpeedLimit, descrMetricHwCpuSpeedLimit, + unitMetricHwCpuSpeedLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwCpuSpeedLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwCpuSpeedLimit, descrMetricHwCpuSpeedLimit, + unitMetricHwCpuSpeedLimit); +} + +/** + Energy consumed by the component.

counter */ static constexpr const char *kMetricHwEnergy = "hw.energy"; -static constexpr const char *descrMetricHwEnergy = "Energy consumed by the component"; +static constexpr const char *descrMetricHwEnergy = "Energy consumed by the component."; static constexpr const char *unitMetricHwEnergy = "J"; static inline nostd::unique_ptr> CreateSyncInt64MetricHwEnergy( @@ -56,12 +256,12 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Number of errors encountered by the component + Number of errors encountered by the component.

counter */ static constexpr const char *kMetricHwErrors = "hw.errors"; -static constexpr const char *descrMetricHwErrors = "Number of errors encountered by the component"; +static constexpr const char *descrMetricHwErrors = "Number of errors encountered by the component."; static constexpr const char *unitMetricHwErrors = "{error}"; static inline nostd::unique_ptr> CreateSyncInt64MetricHwErrors( @@ -91,237 +291,1148 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Ambient (external) temperature of the physical host + Fan speed in revolutions per minute.

gauge */ -static constexpr const char *kMetricHwHostAmbientTemperature = "hw.host.ambient_temperature"; -static constexpr const char *descrMetricHwHostAmbientTemperature = - "Ambient (external) temperature of the physical host"; -static constexpr const char *unitMetricHwHostAmbientTemperature = "Cel"; +static constexpr const char *kMetricHwFanSpeed = "hw.fan.speed"; +static constexpr const char *descrMetricHwFanSpeed = "Fan speed in revolutions per minute."; +static constexpr const char *unitMetricHwFanSpeed = "rpm"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 -static inline nostd::unique_ptr> -CreateSyncInt64MetricHwHostAmbientTemperature(metrics::Meter *meter) +static inline nostd::unique_ptr> CreateSyncInt64MetricHwFanSpeed( + metrics::Meter *meter) { - return meter->CreateInt64Gauge(kMetricHwHostAmbientTemperature, - descrMetricHwHostAmbientTemperature, - unitMetricHwHostAmbientTemperature); + return meter->CreateInt64Gauge(kMetricHwFanSpeed, descrMetricHwFanSpeed, unitMetricHwFanSpeed); } -static inline nostd::unique_ptr> -CreateSyncDoubleMetricHwHostAmbientTemperature(metrics::Meter *meter) +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwFanSpeed( + metrics::Meter *meter) { - return meter->CreateDoubleGauge(kMetricHwHostAmbientTemperature, - descrMetricHwHostAmbientTemperature, - unitMetricHwHostAmbientTemperature); + return meter->CreateDoubleGauge(kMetricHwFanSpeed, descrMetricHwFanSpeed, unitMetricHwFanSpeed); } #endif /* OPENTELEMETRY_ABI_VERSION_NO */ -static inline nostd::shared_ptr -CreateAsyncInt64MetricHwHostAmbientTemperature(metrics::Meter *meter) +static inline nostd::shared_ptr CreateAsyncInt64MetricHwFanSpeed( + metrics::Meter *meter) { - return meter->CreateInt64ObservableGauge(kMetricHwHostAmbientTemperature, - descrMetricHwHostAmbientTemperature, - unitMetricHwHostAmbientTemperature); + return meter->CreateInt64ObservableGauge(kMetricHwFanSpeed, descrMetricHwFanSpeed, + unitMetricHwFanSpeed); } -static inline nostd::shared_ptr -CreateAsyncDoubleMetricHwHostAmbientTemperature(metrics::Meter *meter) +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwFanSpeed( + metrics::Meter *meter) { - return meter->CreateDoubleObservableGauge(kMetricHwHostAmbientTemperature, - descrMetricHwHostAmbientTemperature, - unitMetricHwHostAmbientTemperature); + return meter->CreateDoubleObservableGauge(kMetricHwFanSpeed, descrMetricHwFanSpeed, + unitMetricHwFanSpeed); } /** - Total energy consumed by the entire physical host, in joules + Speed limit in rpm.

- The overall energy usage of a host MUST be reported using the specific @code hw.host.energy - @endcode and @code hw.host.power @endcode metrics only, instead of the generic - @code hw.energy @endcode and @code hw.power @endcode described in the previous section, to prevent - summing up overlapping values.

counter + gauge */ -static constexpr const char *kMetricHwHostEnergy = "hw.host.energy"; -static constexpr const char *descrMetricHwHostEnergy = - "Total energy consumed by the entire physical host, in joules"; -static constexpr const char *unitMetricHwHostEnergy = "J"; +static constexpr const char *kMetricHwFanSpeedLimit = "hw.fan.speed.limit"; +static constexpr const char *descrMetricHwFanSpeedLimit = "Speed limit in rpm."; +static constexpr const char *unitMetricHwFanSpeedLimit = "rpm"; -static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostEnergy( +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwFanSpeedLimit( metrics::Meter *meter) { - return meter->CreateUInt64Counter(kMetricHwHostEnergy, descrMetricHwHostEnergy, - unitMetricHwHostEnergy); + return meter->CreateInt64Gauge(kMetricHwFanSpeedLimit, descrMetricHwFanSpeedLimit, + unitMetricHwFanSpeedLimit); } -static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostEnergy( +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwFanSpeedLimit( metrics::Meter *meter) { - return meter->CreateDoubleCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, - unitMetricHwHostEnergy); + return meter->CreateDoubleGauge(kMetricHwFanSpeedLimit, descrMetricHwFanSpeedLimit, + unitMetricHwFanSpeedLimit); } +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ -static inline nostd::shared_ptr CreateAsyncInt64MetricHwHostEnergy( - metrics::Meter *meter) +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwFanSpeedLimit(metrics::Meter *meter) { - return meter->CreateInt64ObservableCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, - unitMetricHwHostEnergy); + return meter->CreateInt64ObservableGauge(kMetricHwFanSpeedLimit, descrMetricHwFanSpeedLimit, + unitMetricHwFanSpeedLimit); } -static inline nostd::shared_ptr CreateAsyncDoubleMetricHwHostEnergy( - metrics::Meter *meter) +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwFanSpeedLimit(metrics::Meter *meter) { - return meter->CreateDoubleObservableCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, - unitMetricHwHostEnergy); + return meter->CreateDoubleObservableGauge(kMetricHwFanSpeedLimit, descrMetricHwFanSpeedLimit, + unitMetricHwFanSpeedLimit); } /** - By how many degrees Celsius the temperature of the physical host can be increased, before reaching - a warning threshold on one of the internal sensors

gauge + Fan speed expressed as a fraction of its maximum speed. +

+ gauge */ -static constexpr const char *kMetricHwHostHeatingMargin = "hw.host.heating_margin"; -static constexpr const char *descrMetricHwHostHeatingMargin = - "By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors - "; - static constexpr const char *unitMetricHwHostHeatingMargin = "Cel"; +static constexpr const char *kMetricHwFanSpeedRatio = "hw.fan.speed_ratio"; +static constexpr const char *descrMetricHwFanSpeedRatio = + "Fan speed expressed as a fraction of its maximum speed."; +static constexpr const char *unitMetricHwFanSpeedRatio = "1"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 -static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostHeatingMargin( +static inline nostd::unique_ptr> CreateSyncInt64MetricHwFanSpeedRatio( metrics::Meter *meter) { - return meter->CreateInt64Gauge(kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, - unitMetricHwHostHeatingMargin); + return meter->CreateInt64Gauge(kMetricHwFanSpeedRatio, descrMetricHwFanSpeedRatio, + unitMetricHwFanSpeedRatio); } -static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostHeatingMargin( +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwFanSpeedRatio( metrics::Meter *meter) { - return meter->CreateDoubleGauge(kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, - unitMetricHwHostHeatingMargin); + return meter->CreateDoubleGauge(kMetricHwFanSpeedRatio, descrMetricHwFanSpeedRatio, + unitMetricHwFanSpeedRatio); } #endif /* OPENTELEMETRY_ABI_VERSION_NO */ static inline nostd::shared_ptr -CreateAsyncInt64MetricHwHostHeatingMargin(metrics::Meter *meter) +CreateAsyncInt64MetricHwFanSpeedRatio(metrics::Meter *meter) { - return meter->CreateInt64ObservableGauge( - kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, unitMetricHwHostHeatingMargin); + return meter->CreateInt64ObservableGauge(kMetricHwFanSpeedRatio, descrMetricHwFanSpeedRatio, + unitMetricHwFanSpeedRatio); } static inline nostd::shared_ptr -CreateAsyncDoubleMetricHwHostHeatingMargin(metrics::Meter *meter) +CreateAsyncDoubleMetricHwFanSpeedRatio(metrics::Meter *meter) { - return meter->CreateDoubleObservableGauge( - kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, unitMetricHwHostHeatingMargin); + return meter->CreateDoubleObservableGauge(kMetricHwFanSpeedRatio, descrMetricHwFanSpeedRatio, + unitMetricHwFanSpeedRatio); } /** - Instantaneous power consumed by the entire physical host in Watts (@code hw.host.energy @endcode - is preferred)

The overall energy usage of a host MUST be reported using the specific @code - hw.host.energy @endcode and @code hw.host.power @endcode metrics only, instead of - the generic @code hw.energy @endcode and @code hw.power @endcode described in the previous - section, to prevent summing up overlapping values.

gauge + Received and transmitted bytes by the GPU. +

+ counter */ -static constexpr const char *kMetricHwHostPower = "hw.host.power"; -static constexpr const char *descrMetricHwHostPower = - "Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred) - "; - static constexpr const char *unitMetricHwHostPower = "W"; - -#if OPENTELEMETRY_ABI_VERSION_NO >= 2 +static constexpr const char *kMetricHwGpuIo = "hw.gpu.io"; +static constexpr const char *descrMetricHwGpuIo = "Received and transmitted bytes by the GPU."; +static constexpr const char *unitMetricHwGpuIo = "By"; -static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostPower( +static inline nostd::unique_ptr> CreateSyncInt64MetricHwGpuIo( metrics::Meter *meter) { - return meter->CreateInt64Gauge(kMetricHwHostPower, descrMetricHwHostPower, unitMetricHwHostPower); + return meter->CreateUInt64Counter(kMetricHwGpuIo, descrMetricHwGpuIo, unitMetricHwGpuIo); } -static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostPower( +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwGpuIo( metrics::Meter *meter) { - return meter->CreateDoubleGauge(kMetricHwHostPower, descrMetricHwHostPower, - unitMetricHwHostPower); + return meter->CreateDoubleCounter(kMetricHwGpuIo, descrMetricHwGpuIo, unitMetricHwGpuIo); } -#endif /* OPENTELEMETRY_ABI_VERSION_NO */ -static inline nostd::shared_ptr CreateAsyncInt64MetricHwHostPower( +static inline nostd::shared_ptr CreateAsyncInt64MetricHwGpuIo( metrics::Meter *meter) { - return meter->CreateInt64ObservableGauge(kMetricHwHostPower, descrMetricHwHostPower, - unitMetricHwHostPower); + return meter->CreateInt64ObservableCounter(kMetricHwGpuIo, descrMetricHwGpuIo, unitMetricHwGpuIo); } -static inline nostd::shared_ptr CreateAsyncDoubleMetricHwHostPower( +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwGpuIo( metrics::Meter *meter) { - return meter->CreateDoubleObservableGauge(kMetricHwHostPower, descrMetricHwHostPower, - unitMetricHwHostPower); + return meter->CreateDoubleObservableCounter(kMetricHwGpuIo, descrMetricHwGpuIo, + unitMetricHwGpuIo); } /** - Instantaneous power consumed by the component + Size of the GPU memory.

- It is recommended to report @code hw.energy @endcode instead of @code hw.power @endcode when - possible.

gauge + updowncounter */ -static constexpr const char *kMetricHwPower = "hw.power"; -static constexpr const char *descrMetricHwPower = "Instantaneous power consumed by the component"; -static constexpr const char *unitMetricHwPower = "W"; +static constexpr const char *kMetricHwGpuMemoryLimit = "hw.gpu.memory.limit"; +static constexpr const char *descrMetricHwGpuMemoryLimit = "Size of the GPU memory."; +static constexpr const char *unitMetricHwGpuMemoryLimit = "By"; -#if OPENTELEMETRY_ABI_VERSION_NO >= 2 - -static inline nostd::unique_ptr> CreateSyncInt64MetricHwPower( - metrics::Meter *meter) +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwGpuMemoryLimit(metrics::Meter *meter) { - return meter->CreateInt64Gauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); + return meter->CreateInt64UpDownCounter(kMetricHwGpuMemoryLimit, descrMetricHwGpuMemoryLimit, + unitMetricHwGpuMemoryLimit); } -static inline nostd::unique_ptr> CreateSyncDoubleMetricHwPower( - metrics::Meter *meter) +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwGpuMemoryLimit(metrics::Meter *meter) { - return meter->CreateDoubleGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); + return meter->CreateDoubleUpDownCounter(kMetricHwGpuMemoryLimit, descrMetricHwGpuMemoryLimit, + unitMetricHwGpuMemoryLimit); } -#endif /* OPENTELEMETRY_ABI_VERSION_NO */ -static inline nostd::shared_ptr CreateAsyncInt64MetricHwPower( - metrics::Meter *meter) +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwGpuMemoryLimit(metrics::Meter *meter) { - return meter->CreateInt64ObservableGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwGpuMemoryLimit, descrMetricHwGpuMemoryLimit, unitMetricHwGpuMemoryLimit); } -static inline nostd::shared_ptr CreateAsyncDoubleMetricHwPower( - metrics::Meter *meter) +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwGpuMemoryLimit(metrics::Meter *meter) { - return meter->CreateDoubleObservableGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwGpuMemoryLimit, descrMetricHwGpuMemoryLimit, unitMetricHwGpuMemoryLimit); } /** - Operational status: @code 1 @endcode (true) or @code 0 @endcode (false) for each of the possible - states

- @code hw.status @endcode is currently specified as an UpDownCounter but would ideally be - represented using a StateSet - as defined in OpenMetrics. This semantic convention will be updated once StateSet is - specified in OpenTelemetry. This planned change is not expected to have any consequence on the way - users query their timeseries backend to retrieve the values of @code hw.status @endcode over time. + GPU memory used.

updowncounter */ -static constexpr const char *kMetricHwStatus = "hw.status"; -static constexpr const char *descrMetricHwStatus = - "Operational status: `1` (true) or `0` (false) for each of the possible states"; -static constexpr const char *unitMetricHwStatus = "1"; +static constexpr const char *kMetricHwGpuMemoryUsage = "hw.gpu.memory.usage"; +static constexpr const char *descrMetricHwGpuMemoryUsage = "GPU memory used."; +static constexpr const char *unitMetricHwGpuMemoryUsage = "By"; -static inline nostd::unique_ptr> CreateSyncInt64MetricHwStatus( - metrics::Meter *meter) +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwGpuMemoryUsage(metrics::Meter *meter) { - return meter->CreateInt64UpDownCounter(kMetricHwStatus, descrMetricHwStatus, unitMetricHwStatus); + return meter->CreateInt64UpDownCounter(kMetricHwGpuMemoryUsage, descrMetricHwGpuMemoryUsage, + unitMetricHwGpuMemoryUsage); } -static inline nostd::unique_ptr> CreateSyncDoubleMetricHwStatus( - metrics::Meter *meter) +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwGpuMemoryUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwGpuMemoryUsage, descrMetricHwGpuMemoryUsage, + unitMetricHwGpuMemoryUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwGpuMemoryUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwGpuMemoryUsage, descrMetricHwGpuMemoryUsage, unitMetricHwGpuMemoryUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwGpuMemoryUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwGpuMemoryUsage, descrMetricHwGpuMemoryUsage, unitMetricHwGpuMemoryUsage); +} + +/** + Fraction of GPU memory used. +

+ gauge + */ +static constexpr const char *kMetricHwGpuMemoryUtilization = "hw.gpu.memory.utilization"; +static constexpr const char *descrMetricHwGpuMemoryUtilization = "Fraction of GPU memory used."; +static constexpr const char *unitMetricHwGpuMemoryUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwGpuMemoryUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwGpuMemoryUtilization, descrMetricHwGpuMemoryUtilization, + unitMetricHwGpuMemoryUtilization); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwGpuMemoryUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwGpuMemoryUtilization, descrMetricHwGpuMemoryUtilization, + unitMetricHwGpuMemoryUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwGpuMemoryUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwGpuMemoryUtilization, + descrMetricHwGpuMemoryUtilization, + unitMetricHwGpuMemoryUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwGpuMemoryUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwGpuMemoryUtilization, + descrMetricHwGpuMemoryUtilization, + unitMetricHwGpuMemoryUtilization); +} + +/** + Fraction of time spent in a specific task. +

+ gauge + */ +static constexpr const char *kMetricHwGpuUtilization = "hw.gpu.utilization"; +static constexpr const char *descrMetricHwGpuUtilization = + "Fraction of time spent in a specific task."; +static constexpr const char *unitMetricHwGpuUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwGpuUtilization( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwGpuUtilization, descrMetricHwGpuUtilization, + unitMetricHwGpuUtilization); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwGpuUtilization( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwGpuUtilization, descrMetricHwGpuUtilization, + unitMetricHwGpuUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwGpuUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwGpuUtilization, descrMetricHwGpuUtilization, + unitMetricHwGpuUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwGpuUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwGpuUtilization, descrMetricHwGpuUtilization, + unitMetricHwGpuUtilization); +} + +/** + Ambient (external) temperature of the physical host. +

+ gauge + */ +static constexpr const char *kMetricHwHostAmbientTemperature = "hw.host.ambient_temperature"; +static constexpr const char *descrMetricHwHostAmbientTemperature = + "Ambient (external) temperature of the physical host."; +static constexpr const char *unitMetricHwHostAmbientTemperature = "Cel"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwHostAmbientTemperature(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwHostAmbientTemperature, + descrMetricHwHostAmbientTemperature, + unitMetricHwHostAmbientTemperature); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwHostAmbientTemperature(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwHostAmbientTemperature, + descrMetricHwHostAmbientTemperature, + unitMetricHwHostAmbientTemperature); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwHostAmbientTemperature(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwHostAmbientTemperature, + descrMetricHwHostAmbientTemperature, + unitMetricHwHostAmbientTemperature); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwHostAmbientTemperature(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwHostAmbientTemperature, + descrMetricHwHostAmbientTemperature, + unitMetricHwHostAmbientTemperature); +} + +/** + Total energy consumed by the entire physical host, in joules. +

+ The overall energy usage of a host MUST be reported using the specific @code hw.host.energy + @endcode and @code hw.host.power @endcode metrics only, instead of the generic + @code hw.energy @endcode and @code hw.power @endcode described in the previous section, to prevent + summing up overlapping values.

counter + */ +static constexpr const char *kMetricHwHostEnergy = "hw.host.energy"; +static constexpr const char *descrMetricHwHostEnergy = + "Total energy consumed by the entire physical host, in joules."; +static constexpr const char *unitMetricHwHostEnergy = "J"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostEnergy( + metrics::Meter *meter) +{ + return meter->CreateUInt64Counter(kMetricHwHostEnergy, descrMetricHwHostEnergy, + unitMetricHwHostEnergy); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostEnergy( + metrics::Meter *meter) +{ + return meter->CreateDoubleCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, + unitMetricHwHostEnergy); +} + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwHostEnergy( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, + unitMetricHwHostEnergy); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwHostEnergy( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableCounter(kMetricHwHostEnergy, descrMetricHwHostEnergy, + unitMetricHwHostEnergy); +} + +/** + By how many degrees Celsius the temperature of the physical host can be increased, before reaching + a warning threshold on one of the internal sensors.

gauge + */ +static constexpr const char *kMetricHwHostHeatingMargin = "hw.host.heating_margin"; +static constexpr const char *descrMetricHwHostHeatingMargin = + "By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors. + "; + static constexpr const char *unitMetricHwHostHeatingMargin = "Cel"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostHeatingMargin( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, + unitMetricHwHostHeatingMargin); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostHeatingMargin( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, + unitMetricHwHostHeatingMargin); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwHostHeatingMargin(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge( + kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, unitMetricHwHostHeatingMargin); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwHostHeatingMargin(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge( + kMetricHwHostHeatingMargin, descrMetricHwHostHeatingMargin, unitMetricHwHostHeatingMargin); +} + +/** + Instantaneous power consumed by the entire physical host in Watts (@code hw.host.energy @endcode + is preferred).

The overall energy usage of a host MUST be reported using the specific @code + hw.host.energy @endcode and @code hw.host.power @endcode metrics only, instead of + the generic @code hw.energy @endcode and @code hw.power @endcode described in the previous + section, to prevent summing up overlapping values.

gauge + */ +static constexpr const char *kMetricHwHostPower = "hw.host.power"; +static constexpr const char *descrMetricHwHostPower = + "Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred). + "; + static constexpr const char *unitMetricHwHostPower = "W"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwHostPower( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwHostPower, descrMetricHwHostPower, unitMetricHwHostPower); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwHostPower( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwHostPower, descrMetricHwHostPower, + unitMetricHwHostPower); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwHostPower( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwHostPower, descrMetricHwHostPower, + unitMetricHwHostPower); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwHostPower( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwHostPower, descrMetricHwHostPower, + unitMetricHwHostPower); +} + +/** + Size of the logical disk. +

+ updowncounter + */ +static constexpr const char *kMetricHwLogicalDiskLimit = "hw.logical_disk.limit"; +static constexpr const char *descrMetricHwLogicalDiskLimit = "Size of the logical disk."; +static constexpr const char *unitMetricHwLogicalDiskLimit = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwLogicalDiskLimit(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwLogicalDiskLimit, descrMetricHwLogicalDiskLimit, + unitMetricHwLogicalDiskLimit); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwLogicalDiskLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwLogicalDiskLimit, descrMetricHwLogicalDiskLimit, + unitMetricHwLogicalDiskLimit); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwLogicalDiskLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwLogicalDiskLimit, descrMetricHwLogicalDiskLimit, unitMetricHwLogicalDiskLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwLogicalDiskLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwLogicalDiskLimit, descrMetricHwLogicalDiskLimit, unitMetricHwLogicalDiskLimit); +} + +/** + Logical disk space usage. +

+ updowncounter + */ +static constexpr const char *kMetricHwLogicalDiskUsage = "hw.logical_disk.usage"; +static constexpr const char *descrMetricHwLogicalDiskUsage = "Logical disk space usage."; +static constexpr const char *unitMetricHwLogicalDiskUsage = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwLogicalDiskUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwLogicalDiskUsage, descrMetricHwLogicalDiskUsage, + unitMetricHwLogicalDiskUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwLogicalDiskUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwLogicalDiskUsage, descrMetricHwLogicalDiskUsage, + unitMetricHwLogicalDiskUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwLogicalDiskUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwLogicalDiskUsage, descrMetricHwLogicalDiskUsage, unitMetricHwLogicalDiskUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwLogicalDiskUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwLogicalDiskUsage, descrMetricHwLogicalDiskUsage, unitMetricHwLogicalDiskUsage); +} + +/** + Logical disk space utilization as a fraction. +

+ gauge + */ +static constexpr const char *kMetricHwLogicalDiskUtilization = "hw.logical_disk.utilization"; +static constexpr const char *descrMetricHwLogicalDiskUtilization = + "Logical disk space utilization as a fraction."; +static constexpr const char *unitMetricHwLogicalDiskUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwLogicalDiskUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwLogicalDiskUtilization, + descrMetricHwLogicalDiskUtilization, + unitMetricHwLogicalDiskUtilization); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwLogicalDiskUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwLogicalDiskUtilization, + descrMetricHwLogicalDiskUtilization, + unitMetricHwLogicalDiskUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwLogicalDiskUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwLogicalDiskUtilization, + descrMetricHwLogicalDiskUtilization, + unitMetricHwLogicalDiskUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwLogicalDiskUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwLogicalDiskUtilization, + descrMetricHwLogicalDiskUtilization, + unitMetricHwLogicalDiskUtilization); +} + +/** + Size of the memory module. +

+ updowncounter + */ +static constexpr const char *kMetricHwMemorySize = "hw.memory.size"; +static constexpr const char *descrMetricHwMemorySize = "Size of the memory module."; +static constexpr const char *unitMetricHwMemorySize = "By"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwMemorySize( + metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwMemorySize, descrMetricHwMemorySize, + unitMetricHwMemorySize); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwMemorySize( + metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwMemorySize, descrMetricHwMemorySize, + unitMetricHwMemorySize); +} + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwMemorySize( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricHwMemorySize, descrMetricHwMemorySize, + unitMetricHwMemorySize); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwMemorySize( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricHwMemorySize, descrMetricHwMemorySize, + unitMetricHwMemorySize); +} + +/** + Link speed. +

+ updowncounter + */ +static constexpr const char *kMetricHwNetworkBandwidthLimit = "hw.network.bandwidth.limit"; +static constexpr const char *descrMetricHwNetworkBandwidthLimit = "Link speed."; +static constexpr const char *unitMetricHwNetworkBandwidthLimit = "By/s"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwNetworkBandwidthLimit(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwNetworkBandwidthLimit, + descrMetricHwNetworkBandwidthLimit, + unitMetricHwNetworkBandwidthLimit); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwNetworkBandwidthLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwNetworkBandwidthLimit, + descrMetricHwNetworkBandwidthLimit, + unitMetricHwNetworkBandwidthLimit); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwNetworkBandwidthLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricHwNetworkBandwidthLimit, + descrMetricHwNetworkBandwidthLimit, + unitMetricHwNetworkBandwidthLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwNetworkBandwidthLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricHwNetworkBandwidthLimit, + descrMetricHwNetworkBandwidthLimit, + unitMetricHwNetworkBandwidthLimit); +} + +/** + Utilization of the network bandwidth as a fraction. +

+ gauge + */ +static constexpr const char *kMetricHwNetworkBandwidthUtilization = + "hw.network.bandwidth.utilization"; +static constexpr const char *descrMetricHwNetworkBandwidthUtilization = + "Utilization of the network bandwidth as a fraction."; +static constexpr const char *unitMetricHwNetworkBandwidthUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwNetworkBandwidthUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwNetworkBandwidthUtilization, + descrMetricHwNetworkBandwidthUtilization, + unitMetricHwNetworkBandwidthUtilization); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwNetworkBandwidthUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwNetworkBandwidthUtilization, + descrMetricHwNetworkBandwidthUtilization, + unitMetricHwNetworkBandwidthUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwNetworkBandwidthUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwNetworkBandwidthUtilization, + descrMetricHwNetworkBandwidthUtilization, + unitMetricHwNetworkBandwidthUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwNetworkBandwidthUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwNetworkBandwidthUtilization, + descrMetricHwNetworkBandwidthUtilization, + unitMetricHwNetworkBandwidthUtilization); +} + +/** + Received and transmitted network traffic in bytes. +

+ counter + */ +static constexpr const char *kMetricHwNetworkIo = "hw.network.io"; +static constexpr const char *descrMetricHwNetworkIo = + "Received and transmitted network traffic in bytes."; +static constexpr const char *unitMetricHwNetworkIo = "By"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwNetworkIo( + metrics::Meter *meter) +{ + return meter->CreateUInt64Counter(kMetricHwNetworkIo, descrMetricHwNetworkIo, + unitMetricHwNetworkIo); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwNetworkIo( + metrics::Meter *meter) +{ + return meter->CreateDoubleCounter(kMetricHwNetworkIo, descrMetricHwNetworkIo, + unitMetricHwNetworkIo); +} + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwNetworkIo( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableCounter(kMetricHwNetworkIo, descrMetricHwNetworkIo, + unitMetricHwNetworkIo); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwNetworkIo( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableCounter(kMetricHwNetworkIo, descrMetricHwNetworkIo, + unitMetricHwNetworkIo); +} + +/** + Received and transmitted network traffic in packets (or frames). +

+ counter + */ +static constexpr const char *kMetricHwNetworkPackets = "hw.network.packets"; +static constexpr const char *descrMetricHwNetworkPackets = + "Received and transmitted network traffic in packets (or frames)."; +static constexpr const char *unitMetricHwNetworkPackets = "{packet}"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwNetworkPackets( + metrics::Meter *meter) +{ + return meter->CreateUInt64Counter(kMetricHwNetworkPackets, descrMetricHwNetworkPackets, + unitMetricHwNetworkPackets); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwNetworkPackets( + metrics::Meter *meter) +{ + return meter->CreateDoubleCounter(kMetricHwNetworkPackets, descrMetricHwNetworkPackets, + unitMetricHwNetworkPackets); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwNetworkPackets(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableCounter(kMetricHwNetworkPackets, descrMetricHwNetworkPackets, + unitMetricHwNetworkPackets); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwNetworkPackets(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableCounter(kMetricHwNetworkPackets, descrMetricHwNetworkPackets, + unitMetricHwNetworkPackets); +} + +/** + Link status: @code 1 @endcode (up) or @code 0 @endcode (down). +

+ updowncounter + */ +static constexpr const char *kMetricHwNetworkUp = "hw.network.up"; +static constexpr const char *descrMetricHwNetworkUp = "Link status: `1` (up) or `0` (down)."; +static constexpr const char *unitMetricHwNetworkUp = "1"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwNetworkUp( + metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwNetworkUp, descrMetricHwNetworkUp, + unitMetricHwNetworkUp); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwNetworkUp( + metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwNetworkUp, descrMetricHwNetworkUp, + unitMetricHwNetworkUp); +} + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwNetworkUp( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricHwNetworkUp, descrMetricHwNetworkUp, + unitMetricHwNetworkUp); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwNetworkUp( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricHwNetworkUp, descrMetricHwNetworkUp, + unitMetricHwNetworkUp); +} + +/** + Endurance remaining for this SSD disk. +

+ gauge + */ +static constexpr const char *kMetricHwPhysicalDiskEnduranceUtilization = + "hw.physical_disk.endurance_utilization"; +static constexpr const char *descrMetricHwPhysicalDiskEnduranceUtilization = + "Endurance remaining for this SSD disk."; +static constexpr const char *unitMetricHwPhysicalDiskEnduranceUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwPhysicalDiskEnduranceUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwPhysicalDiskEnduranceUtilization, + descrMetricHwPhysicalDiskEnduranceUtilization, + unitMetricHwPhysicalDiskEnduranceUtilization); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwPhysicalDiskEnduranceUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwPhysicalDiskEnduranceUtilization, + descrMetricHwPhysicalDiskEnduranceUtilization, + unitMetricHwPhysicalDiskEnduranceUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPhysicalDiskEnduranceUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwPhysicalDiskEnduranceUtilization, + descrMetricHwPhysicalDiskEnduranceUtilization, + unitMetricHwPhysicalDiskEnduranceUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPhysicalDiskEnduranceUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwPhysicalDiskEnduranceUtilization, + descrMetricHwPhysicalDiskEnduranceUtilization, + unitMetricHwPhysicalDiskEnduranceUtilization); +} + +/** + Size of the disk. +

+ updowncounter + */ +static constexpr const char *kMetricHwPhysicalDiskSize = "hw.physical_disk.size"; +static constexpr const char *descrMetricHwPhysicalDiskSize = "Size of the disk."; +static constexpr const char *unitMetricHwPhysicalDiskSize = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwPhysicalDiskSize(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwPhysicalDiskSize, descrMetricHwPhysicalDiskSize, + unitMetricHwPhysicalDiskSize); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwPhysicalDiskSize(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwPhysicalDiskSize, descrMetricHwPhysicalDiskSize, + unitMetricHwPhysicalDiskSize); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPhysicalDiskSize(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwPhysicalDiskSize, descrMetricHwPhysicalDiskSize, unitMetricHwPhysicalDiskSize); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPhysicalDiskSize(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwPhysicalDiskSize, descrMetricHwPhysicalDiskSize, unitMetricHwPhysicalDiskSize); +} + +/** + Value of the corresponding S.M.A.R.T. + (Self-Monitoring, Analysis, and Reporting Technology) attribute.

gauge + */ +static constexpr const char *kMetricHwPhysicalDiskSmart = "hw.physical_disk.smart"; +static constexpr const char *descrMetricHwPhysicalDiskSmart = + "Value of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) " + "(Self-Monitoring, Analysis, and Reporting Technology) attribute."; +static constexpr const char *unitMetricHwPhysicalDiskSmart = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwPhysicalDiskSmart( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwPhysicalDiskSmart, descrMetricHwPhysicalDiskSmart, + unitMetricHwPhysicalDiskSmart); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwPhysicalDiskSmart( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwPhysicalDiskSmart, descrMetricHwPhysicalDiskSmart, + unitMetricHwPhysicalDiskSmart); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPhysicalDiskSmart(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge( + kMetricHwPhysicalDiskSmart, descrMetricHwPhysicalDiskSmart, unitMetricHwPhysicalDiskSmart); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPhysicalDiskSmart(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge( + kMetricHwPhysicalDiskSmart, descrMetricHwPhysicalDiskSmart, unitMetricHwPhysicalDiskSmart); +} + +/** + Instantaneous power consumed by the component. +

+ It is recommended to report @code hw.energy @endcode instead of @code hw.power @endcode when + possible.

gauge + */ +static constexpr const char *kMetricHwPower = "hw.power"; +static constexpr const char *descrMetricHwPower = "Instantaneous power consumed by the component."; +static constexpr const char *unitMetricHwPower = "W"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwPower( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwPower( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwPower( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwPower( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwPower, descrMetricHwPower, unitMetricHwPower); +} + +/** + Maximum power output of the power supply. +

+ updowncounter + */ +static constexpr const char *kMetricHwPowerSupplyLimit = "hw.power_supply.limit"; +static constexpr const char *descrMetricHwPowerSupplyLimit = + "Maximum power output of the power supply."; +static constexpr const char *unitMetricHwPowerSupplyLimit = "W"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwPowerSupplyLimit(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwPowerSupplyLimit, descrMetricHwPowerSupplyLimit, + unitMetricHwPowerSupplyLimit); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwPowerSupplyLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwPowerSupplyLimit, descrMetricHwPowerSupplyLimit, + unitMetricHwPowerSupplyLimit); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPowerSupplyLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwPowerSupplyLimit, descrMetricHwPowerSupplyLimit, unitMetricHwPowerSupplyLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPowerSupplyLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwPowerSupplyLimit, descrMetricHwPowerSupplyLimit, unitMetricHwPowerSupplyLimit); +} + +/** + Current power output of the power supply. +

+ updowncounter + */ +static constexpr const char *kMetricHwPowerSupplyUsage = "hw.power_supply.usage"; +static constexpr const char *descrMetricHwPowerSupplyUsage = + "Current power output of the power supply."; +static constexpr const char *unitMetricHwPowerSupplyUsage = "W"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwPowerSupplyUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwPowerSupplyUsage, descrMetricHwPowerSupplyUsage, + unitMetricHwPowerSupplyUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwPowerSupplyUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricHwPowerSupplyUsage, descrMetricHwPowerSupplyUsage, + unitMetricHwPowerSupplyUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPowerSupplyUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricHwPowerSupplyUsage, descrMetricHwPowerSupplyUsage, unitMetricHwPowerSupplyUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPowerSupplyUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricHwPowerSupplyUsage, descrMetricHwPowerSupplyUsage, unitMetricHwPowerSupplyUsage); +} + +/** + Utilization of the power supply as a fraction of its maximum output. +

+ gauge + */ +static constexpr const char *kMetricHwPowerSupplyUtilization = "hw.power_supply.utilization"; +static constexpr const char *descrMetricHwPowerSupplyUtilization = + "Utilization of the power supply as a fraction of its maximum output."; +static constexpr const char *unitMetricHwPowerSupplyUtilization = "1"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwPowerSupplyUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwPowerSupplyUtilization, + descrMetricHwPowerSupplyUtilization, + unitMetricHwPowerSupplyUtilization); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwPowerSupplyUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwPowerSupplyUtilization, + descrMetricHwPowerSupplyUtilization, + unitMetricHwPowerSupplyUtilization); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwPowerSupplyUtilization(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwPowerSupplyUtilization, + descrMetricHwPowerSupplyUtilization, + unitMetricHwPowerSupplyUtilization); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwPowerSupplyUtilization(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwPowerSupplyUtilization, + descrMetricHwPowerSupplyUtilization, + unitMetricHwPowerSupplyUtilization); +} + +/** + Operational status: @code 1 @endcode (true) or @code 0 @endcode (false) for each of the possible + states.

+ @code hw.status @endcode is currently specified as an UpDownCounter but would ideally be + represented using a StateSet + as defined in OpenMetrics. This semantic convention will be updated once StateSet is + specified in OpenTelemetry. This planned change is not expected to have any consequence on the way + users query their timeseries backend to retrieve the values of @code hw.status @endcode over time. +

+ updowncounter + */ +static constexpr const char *kMetricHwStatus = "hw.status"; +static constexpr const char *descrMetricHwStatus = + "Operational status: `1` (true) or `0` (false) for each of the possible states."; +static constexpr const char *unitMetricHwStatus = "1"; + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwStatus( + metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricHwStatus, descrMetricHwStatus, unitMetricHwStatus); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwStatus( + metrics::Meter *meter) { return meter->CreateDoubleUpDownCounter(kMetricHwStatus, descrMetricHwStatus, unitMetricHwStatus); } @@ -340,6 +1451,245 @@ static inline nostd::shared_ptr CreateAsyncDouble unitMetricHwStatus); } +/** + Operations performed by the tape drive. +

+ counter + */ +static constexpr const char *kMetricHwTapeDriveOperations = "hw.tape_drive.operations"; +static constexpr const char *descrMetricHwTapeDriveOperations = + "Operations performed by the tape drive."; +static constexpr const char *unitMetricHwTapeDriveOperations = "{operation}"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricHwTapeDriveOperations(metrics::Meter *meter) +{ + return meter->CreateUInt64Counter(kMetricHwTapeDriveOperations, descrMetricHwTapeDriveOperations, + unitMetricHwTapeDriveOperations); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricHwTapeDriveOperations(metrics::Meter *meter) +{ + return meter->CreateDoubleCounter(kMetricHwTapeDriveOperations, descrMetricHwTapeDriveOperations, + unitMetricHwTapeDriveOperations); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwTapeDriveOperations(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableCounter(kMetricHwTapeDriveOperations, + descrMetricHwTapeDriveOperations, + unitMetricHwTapeDriveOperations); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwTapeDriveOperations(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableCounter(kMetricHwTapeDriveOperations, + descrMetricHwTapeDriveOperations, + unitMetricHwTapeDriveOperations); +} + +/** + Temperature in degrees Celsius. +

+ gauge + */ +static constexpr const char *kMetricHwTemperature = "hw.temperature"; +static constexpr const char *descrMetricHwTemperature = "Temperature in degrees Celsius."; +static constexpr const char *unitMetricHwTemperature = "Cel"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwTemperature( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwTemperature, descrMetricHwTemperature, + unitMetricHwTemperature); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwTemperature( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwTemperature, descrMetricHwTemperature, + unitMetricHwTemperature); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwTemperature( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwTemperature, descrMetricHwTemperature, + unitMetricHwTemperature); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwTemperature( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwTemperature, descrMetricHwTemperature, + unitMetricHwTemperature); +} + +/** + Temperature limit in degrees Celsius. +

+ gauge + */ +static constexpr const char *kMetricHwTemperatureLimit = "hw.temperature.limit"; +static constexpr const char *descrMetricHwTemperatureLimit = + "Temperature limit in degrees Celsius."; +static constexpr const char *unitMetricHwTemperatureLimit = "Cel"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwTemperatureLimit( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwTemperatureLimit, descrMetricHwTemperatureLimit, + unitMetricHwTemperatureLimit); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwTemperatureLimit( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwTemperatureLimit, descrMetricHwTemperatureLimit, + unitMetricHwTemperatureLimit); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwTemperatureLimit(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwTemperatureLimit, descrMetricHwTemperatureLimit, + unitMetricHwTemperatureLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwTemperatureLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge( + kMetricHwTemperatureLimit, descrMetricHwTemperatureLimit, unitMetricHwTemperatureLimit); +} + +/** + Voltage measured by the sensor. +

+ gauge + */ +static constexpr const char *kMetricHwVoltage = "hw.voltage"; +static constexpr const char *descrMetricHwVoltage = "Voltage measured by the sensor."; +static constexpr const char *unitMetricHwVoltage = "V"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwVoltage( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwVoltage, descrMetricHwVoltage, unitMetricHwVoltage); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwVoltage( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwVoltage, descrMetricHwVoltage, unitMetricHwVoltage); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwVoltage( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwVoltage, descrMetricHwVoltage, + unitMetricHwVoltage); +} + +static inline nostd::shared_ptr CreateAsyncDoubleMetricHwVoltage( + metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwVoltage, descrMetricHwVoltage, + unitMetricHwVoltage); +} + +/** + Voltage limit in Volts. +

+ gauge + */ +static constexpr const char *kMetricHwVoltageLimit = "hw.voltage.limit"; +static constexpr const char *descrMetricHwVoltageLimit = "Voltage limit in Volts."; +static constexpr const char *unitMetricHwVoltageLimit = "V"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwVoltageLimit( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwVoltageLimit, descrMetricHwVoltageLimit, + unitMetricHwVoltageLimit); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwVoltageLimit( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwVoltageLimit, descrMetricHwVoltageLimit, + unitMetricHwVoltageLimit); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr CreateAsyncInt64MetricHwVoltageLimit( + metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwVoltageLimit, descrMetricHwVoltageLimit, + unitMetricHwVoltageLimit); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwVoltageLimit(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwVoltageLimit, descrMetricHwVoltageLimit, + unitMetricHwVoltageLimit); +} + +/** + Nominal (expected) voltage. +

+ gauge + */ +static constexpr const char *kMetricHwVoltageNominal = "hw.voltage.nominal"; +static constexpr const char *descrMetricHwVoltageNominal = "Nominal (expected) voltage."; +static constexpr const char *unitMetricHwVoltageNominal = "V"; + +#if OPENTELEMETRY_ABI_VERSION_NO >= 2 + +static inline nostd::unique_ptr> CreateSyncInt64MetricHwVoltageNominal( + metrics::Meter *meter) +{ + return meter->CreateInt64Gauge(kMetricHwVoltageNominal, descrMetricHwVoltageNominal, + unitMetricHwVoltageNominal); +} + +static inline nostd::unique_ptr> CreateSyncDoubleMetricHwVoltageNominal( + metrics::Meter *meter) +{ + return meter->CreateDoubleGauge(kMetricHwVoltageNominal, descrMetricHwVoltageNominal, + unitMetricHwVoltageNominal); +} +#endif /* OPENTELEMETRY_ABI_VERSION_NO */ + +static inline nostd::shared_ptr +CreateAsyncInt64MetricHwVoltageNominal(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableGauge(kMetricHwVoltageNominal, descrMetricHwVoltageNominal, + unitMetricHwVoltageNominal); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricHwVoltageNominal(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableGauge(kMetricHwVoltageNominal, descrMetricHwVoltageNominal, + unitMetricHwVoltageNominal); +} + } // namespace hw } // namespace semconv OPENTELEMETRY_END_NAMESPACE diff --git a/api/include/opentelemetry/semconv/incubating/k8s_attributes.h b/api/include/opentelemetry/semconv/incubating/k8s_attributes.h index 29f08e7793..80ef2a964b 100644 --- a/api/include/opentelemetry/semconv/incubating/k8s_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/k8s_attributes.h @@ -595,19 +595,11 @@ static constexpr const char *kTerminating = "terminating"; namespace K8sNodeConditionStatusValues { -/** - none - */ + static constexpr const char *kConditionTrue = "true"; -/** - none - */ static constexpr const char *kConditionFalse = "false"; -/** - none - */ static constexpr const char *kConditionUnknown = "unknown"; } // namespace K8sNodeConditionStatusValues diff --git a/api/include/opentelemetry/semconv/incubating/k8s_metrics.h b/api/include/opentelemetry/semconv/incubating/k8s_metrics.h index d37bd12741..678b24ff85 100644 --- a/api/include/opentelemetry/semconv/incubating/k8s_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/k8s_metrics.h @@ -21,7 +21,7 @@ namespace k8s { /** - Maximum CPU resource limit set for the container + Maximum CPU resource limit set for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -29,7 +29,7 @@ namespace k8s */ static constexpr const char *kMetricK8sContainerCpuLimit = "k8s.container.cpu.limit"; static constexpr const char *descrMetricK8sContainerCpuLimit = - "Maximum CPU resource limit set for the container"; + "Maximum CPU resource limit set for the container."; static constexpr const char *unitMetricK8sContainerCpuLimit = "{cpu}"; static inline nostd::unique_ptr> @@ -61,7 +61,7 @@ CreateAsyncDoubleMetricK8sContainerCpuLimit(metrics::Meter *meter) } /** - CPU resource requested for the container + CPU resource requested for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -69,7 +69,7 @@ CreateAsyncDoubleMetricK8sContainerCpuLimit(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerCpuRequest = "k8s.container.cpu.request"; static constexpr const char *descrMetricK8sContainerCpuRequest = - "CPU resource requested for the container"; + "CPU resource requested for the container."; static constexpr const char *unitMetricK8sContainerCpuRequest = "{cpu}"; static inline nostd::unique_ptr> @@ -105,7 +105,7 @@ CreateAsyncDoubleMetricK8sContainerCpuRequest(metrics::Meter *meter) } /** - Maximum ephemeral storage resource limit set for the container + Maximum ephemeral storage resource limit set for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -114,7 +114,7 @@ CreateAsyncDoubleMetricK8sContainerCpuRequest(metrics::Meter *meter) static constexpr const char *kMetricK8sContainerEphemeralStorageLimit = "k8s.container.ephemeral_storage.limit"; static constexpr const char *descrMetricK8sContainerEphemeralStorageLimit = - "Maximum ephemeral storage resource limit set for the container"; + "Maximum ephemeral storage resource limit set for the container."; static constexpr const char *unitMetricK8sContainerEphemeralStorageLimit = "By"; static inline nostd::unique_ptr> @@ -150,7 +150,7 @@ CreateAsyncDoubleMetricK8sContainerEphemeralStorageLimit(metrics::Meter *meter) } /** - Ephemeral storage resource requested for the container + Ephemeral storage resource requested for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -159,7 +159,7 @@ CreateAsyncDoubleMetricK8sContainerEphemeralStorageLimit(metrics::Meter *meter) static constexpr const char *kMetricK8sContainerEphemeralStorageRequest = "k8s.container.ephemeral_storage.request"; static constexpr const char *descrMetricK8sContainerEphemeralStorageRequest = - "Ephemeral storage resource requested for the container"; + "Ephemeral storage resource requested for the container."; static constexpr const char *unitMetricK8sContainerEphemeralStorageRequest = "By"; static inline nostd::unique_ptr> @@ -195,7 +195,7 @@ CreateAsyncDoubleMetricK8sContainerEphemeralStorageRequest(metrics::Meter *meter } /** - Maximum memory resource limit set for the container + Maximum memory resource limit set for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -203,7 +203,7 @@ CreateAsyncDoubleMetricK8sContainerEphemeralStorageRequest(metrics::Meter *meter */ static constexpr const char *kMetricK8sContainerMemoryLimit = "k8s.container.memory.limit"; static constexpr const char *descrMetricK8sContainerMemoryLimit = - "Maximum memory resource limit set for the container"; + "Maximum memory resource limit set for the container."; static constexpr const char *unitMetricK8sContainerMemoryLimit = "By"; static inline nostd::unique_ptr> @@ -239,7 +239,7 @@ CreateAsyncDoubleMetricK8sContainerMemoryLimit(metrics::Meter *meter) } /** - Memory resource requested for the container + Memory resource requested for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -247,7 +247,7 @@ CreateAsyncDoubleMetricK8sContainerMemoryLimit(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerMemoryRequest = "k8s.container.memory.request"; static constexpr const char *descrMetricK8sContainerMemoryRequest = - "Memory resource requested for the container"; + "Memory resource requested for the container."; static constexpr const char *unitMetricK8sContainerMemoryRequest = "By"; static inline nostd::unique_ptr> @@ -284,14 +284,14 @@ CreateAsyncDoubleMetricK8sContainerMemoryRequest(metrics::Meter *meter) /** Indicates whether the container is currently marked as ready to accept traffic, based on its - readiness probe (1 = ready, 0 = not ready)

This metric SHOULD reflect the value of the @code + readiness probe (1 = ready, 0 = not ready).

This metric SHOULD reflect the value of the @code ready @endcode field in the K8s ContainerStatus.

updowncounter */ static constexpr const char *kMetricK8sContainerReady = "k8s.container.ready"; static constexpr const char *descrMetricK8sContainerReady = - "Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready) + "Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready). "; static constexpr const char *unitMetricK8sContainerReady = "{container}"; @@ -324,7 +324,7 @@ CreateAsyncDoubleMetricK8sContainerReady(metrics::Meter *meter) } /** - Describes how many times the container has restarted (since the last counter reset) + Describes how many times the container has restarted (since the last counter reset).

This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 at any time depending on how your kubelet is configured to prune dead containers. It is best @@ -335,7 +335,7 @@ CreateAsyncDoubleMetricK8sContainerReady(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerRestartCount = "k8s.container.restart.count"; static constexpr const char *descrMetricK8sContainerRestartCount = - "Describes how many times the container has restarted (since the last counter reset)"; + "Describes how many times the container has restarted (since the last counter reset)."; static constexpr const char *unitMetricK8sContainerRestartCount = "{restart}"; static inline nostd::unique_ptr> @@ -371,7 +371,7 @@ CreateAsyncDoubleMetricK8sContainerRestartCount(metrics::Meter *meter) } /** - Describes the number of K8s containers that are currently in a state for a given reason + Describes the number of K8s containers that are currently in a state for a given reason.

All possible container state reasons will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state reason will be non-zero.

@@ -379,7 +379,7 @@ CreateAsyncDoubleMetricK8sContainerRestartCount(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerStatusReason = "k8s.container.status.reason"; static constexpr const char *descrMetricK8sContainerStatusReason = - "Describes the number of K8s containers that are currently in a state for a given reason"; + "Describes the number of K8s containers that are currently in a state for a given reason."; static constexpr const char *unitMetricK8sContainerStatusReason = "{container}"; static inline nostd::unique_ptr> @@ -415,7 +415,7 @@ CreateAsyncDoubleMetricK8sContainerStatusReason(metrics::Meter *meter) } /** - Describes the number of K8s containers that are currently in a given state + Describes the number of K8s containers that are currently in a given state.

All possible container states will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state will be non-zero. @@ -424,7 +424,7 @@ CreateAsyncDoubleMetricK8sContainerStatusReason(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerStatusState = "k8s.container.status.state"; static constexpr const char *descrMetricK8sContainerStatusState = - "Describes the number of K8s containers that are currently in a given state"; + "Describes the number of K8s containers that are currently in a given state."; static constexpr const char *unitMetricK8sContainerStatusState = "{container}"; static inline nostd::unique_ptr> @@ -460,7 +460,7 @@ CreateAsyncDoubleMetricK8sContainerStatusState(metrics::Meter *meter) } /** - Maximum storage resource limit set for the container + Maximum storage resource limit set for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -468,7 +468,7 @@ CreateAsyncDoubleMetricK8sContainerStatusState(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerStorageLimit = "k8s.container.storage.limit"; static constexpr const char *descrMetricK8sContainerStorageLimit = - "Maximum storage resource limit set for the container"; + "Maximum storage resource limit set for the container."; static constexpr const char *unitMetricK8sContainerStorageLimit = "By"; static inline nostd::unique_ptr> @@ -504,7 +504,7 @@ CreateAsyncDoubleMetricK8sContainerStorageLimit(metrics::Meter *meter) } /** - Storage resource requested for the container + Storage resource requested for the container.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core @@ -512,7 +512,7 @@ CreateAsyncDoubleMetricK8sContainerStorageLimit(metrics::Meter *meter) */ static constexpr const char *kMetricK8sContainerStorageRequest = "k8s.container.storage.request"; static constexpr const char *descrMetricK8sContainerStorageRequest = - "Storage resource requested for the container"; + "Storage resource requested for the container."; static constexpr const char *unitMetricK8sContainerStorageRequest = "By"; static inline nostd::unique_ptr> @@ -548,7 +548,7 @@ CreateAsyncDoubleMetricK8sContainerStorageRequest(metrics::Meter *meter) } /** - The number of actively running jobs for a cronjob + The number of actively running jobs for a cronjob.

This metric aligns with the @code active @endcode field of the > @@ -589,7 +589,7 @@ CreateAsyncDoubleMetricK8sCronjobActiveJobs(metrics::Meter *meter) } /** - Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod + Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod.

This metric aligns with the @code currentNumberScheduled @endcode field of the > @@ -636,7 +637,7 @@ CreateAsyncDoubleMetricK8sDaemonsetCurrentScheduledNodes(metrics::Meter *meter) /** 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 This metric aligns with the @code desiredNumberScheduled @endcode field of the K8s DaemonSetStatus.

updowncounter */ @@ -644,7 +645,7 @@ 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)"; + "daemon pod)."; static constexpr const char *unitMetricK8sDaemonsetDesiredScheduledNodes = "{node}"; static inline nostd::unique_ptr> @@ -680,7 +681,7 @@ CreateAsyncDoubleMetricK8sDaemonsetDesiredScheduledNodes(metrics::Meter *meter) } /** - Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod + Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod.

This metric aligns with the @code numberMisscheduled @endcode field of the > @@ -727,14 +728,14 @@ CreateAsyncDoubleMetricK8sDaemonsetMisscheduledNodes(metrics::Meter *meter) /** 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 This metric aligns with the @code numberReady @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"; + "running and ready."; static constexpr const char *unitMetricK8sDaemonsetReadyNodes = "{node}"; static inline nostd::unique_ptr> @@ -771,14 +772,14 @@ CreateAsyncDoubleMetricK8sDaemonsetReadyNodes(metrics::Meter *meter) /** Total number of available replica pods (ready for at least minReadySeconds) targeted by this - deployment

This metric aligns with the @code availableReplicas @endcode field of the This metric aligns with the @code availableReplicas @endcode field of the K8s DeploymentStatus.

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"; + "deployment."; static constexpr const char *unitMetricK8sDeploymentAvailablePods = "{pod}"; static inline nostd::unique_ptr> @@ -814,7 +815,7 @@ CreateAsyncDoubleMetricK8sDeploymentAvailablePods(metrics::Meter *meter) } /** - Number of desired replica pods in this deployment + Number of desired replica pods in this deployment.

This metric aligns with the @code replicas @endcode field of the > @@ -860,14 +861,14 @@ CreateAsyncDoubleMetricK8sDeploymentDesiredPods(metrics::Meter *meter) /** 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 This metric aligns with the @code currentReplicas @endcode field of the K8s HorizontalPodAutoscalerStatus

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"; + "autoscaler."; static constexpr const char *unitMetricK8sHpaCurrentPods = "{pod}"; static inline nostd::unique_ptr> @@ -900,14 +901,14 @@ CreateAsyncDoubleMetricK8sHpaCurrentPods(metrics::Meter *meter) /** Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by - the autoscaler

This metric aligns with the @code desiredReplicas @endcode field of the This metric aligns with the @code desiredReplicas @endcode field of the K8s HorizontalPodAutoscalerStatus

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"; + "by the autoscaler."; static constexpr const char *unitMetricK8sHpaDesiredPods = "{pod}"; static inline nostd::unique_ptr> @@ -939,7 +940,7 @@ CreateAsyncDoubleMetricK8sHpaDesiredPods(metrics::Meter *meter) } /** - The upper limit for the number of replica pods to which the autoscaler can scale up + The upper limit for the number of replica pods to which the autoscaler can scale up.

This metric aligns with the @code maxReplicas @endcode field of the > CreateSyncInt64MetricK8sHpaMaxPods( @@ -1135,7 +1136,7 @@ CreateAsyncDoubleMetricK8sHpaMetricTargetCpuValue(metrics::Meter *meter) } /** - The lower limit for the number of replica pods to which the autoscaler can scale down + The lower limit for the number of replica pods to which the autoscaler can scale down.

This metric aligns with the @code minReplicas @endcode field of the > CreateSyncInt64MetricK8sHpaMinPods( @@ -1176,7 +1177,7 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - The number of pending and actively running pods for a job + The number of pending and actively running pods for a job.

This metric aligns with the @code active @endcode field of the CreateAsyncDouble */ 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"; + "The number of pending and actively running pods for a job."; static constexpr const char *unitMetricK8sJobActivePods = "{pod}"; static inline nostd::unique_ptr> @@ -1217,7 +1218,7 @@ CreateAsyncDoubleMetricK8sJobActivePods(metrics::Meter *meter) } /** - The desired number of successfully finished pods the job should be run with + The desired number of successfully finished pods the job should be run with.

This metric aligns with the @code completions @endcode field of the > @@ -1262,7 +1263,7 @@ CreateAsyncDoubleMetricK8sJobDesiredSuccessfulPods(metrics::Meter *meter) } /** - The number of pods which reached phase Failed for a job + The number of pods which reached phase Failed for a job.

This metric aligns with the @code failed @endcode field of the > @@ -1303,7 +1304,7 @@ CreateAsyncDoubleMetricK8sJobFailedPods(metrics::Meter *meter) } /** - The max desired number of pods the job should run at any given time + The max desired number of pods the job should run at any given time.

This metric aligns with the @code parallelism @endcode field of the > @@ -1348,7 +1349,7 @@ CreateAsyncDoubleMetricK8sJobMaxParallelPods(metrics::Meter *meter) } /** - The number of pods which reached phase Succeeded for a job + The number of pods which reached phase Succeeded for a job.

This metric aligns with the @code succeeded @endcode field of the > @@ -1427,13 +1428,13 @@ CreateAsyncDoubleMetricK8sNamespacePhase(metrics::Meter *meter) } /** - Amount of cpu allocatable on the node + Amount of cpu allocatable on the node.

updowncounter */ static constexpr const char *kMetricK8sNodeAllocatableCpu = "k8s.node.allocatable.cpu"; static constexpr const char *descrMetricK8sNodeAllocatableCpu = - "Amount of cpu allocatable on the node"; + "Amount of cpu allocatable on the node."; static constexpr const char *unitMetricK8sNodeAllocatableCpu = "{cpu}"; static inline nostd::unique_ptr> @@ -1469,14 +1470,14 @@ CreateAsyncDoubleMetricK8sNodeAllocatableCpu(metrics::Meter *meter) } /** - Amount of ephemeral-storage allocatable on the node + Amount of ephemeral-storage allocatable on the node.

updowncounter */ static constexpr const char *kMetricK8sNodeAllocatableEphemeralStorage = "k8s.node.allocatable.ephemeral_storage"; static constexpr const char *descrMetricK8sNodeAllocatableEphemeralStorage = - "Amount of ephemeral-storage allocatable on the node"; + "Amount of ephemeral-storage allocatable on the node."; static constexpr const char *unitMetricK8sNodeAllocatableEphemeralStorage = "By"; static inline nostd::unique_ptr> @@ -1512,13 +1513,13 @@ CreateAsyncDoubleMetricK8sNodeAllocatableEphemeralStorage(metrics::Meter *meter) } /** - Amount of memory allocatable on the node + Amount of memory allocatable on the node.

updowncounter */ static constexpr const char *kMetricK8sNodeAllocatableMemory = "k8s.node.allocatable.memory"; static constexpr const char *descrMetricK8sNodeAllocatableMemory = - "Amount of memory allocatable on the node"; + "Amount of memory allocatable on the node."; static constexpr const char *unitMetricK8sNodeAllocatableMemory = "By"; static inline nostd::unique_ptr> @@ -1554,13 +1555,13 @@ CreateAsyncDoubleMetricK8sNodeAllocatableMemory(metrics::Meter *meter) } /** - Amount of pods allocatable on the node + Amount of pods allocatable on the node.

updowncounter */ static constexpr const char *kMetricK8sNodeAllocatablePods = "k8s.node.allocatable.pods"; static constexpr const char *descrMetricK8sNodeAllocatablePods = - "Amount of pods allocatable on the node"; + "Amount of pods allocatable on the node."; static constexpr const char *unitMetricK8sNodeAllocatablePods = "{pod}"; static inline nostd::unique_ptr> @@ -1640,14 +1641,14 @@ CreateAsyncDoubleMetricK8sNodeConditionStatus(metrics::Meter *meter) } /** - Total CPU time consumed + Total CPU time consumed.

Total CPU time consumed by the specific Node on all available CPU cores

counter */ static constexpr const char *kMetricK8sNodeCpuTime = "k8s.node.cpu.time"; -static constexpr const char *descrMetricK8sNodeCpuTime = "Total CPU time consumed"; +static constexpr const char *descrMetricK8sNodeCpuTime = "Total CPU time consumed."; static constexpr const char *unitMetricK8sNodeCpuTime = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricK8sNodeCpuTime( @@ -1679,7 +1680,7 @@ CreateAsyncDoubleMetricK8sNodeCpuTime(metrics::Meter *meter) } /** - Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs + Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.

CPU usage of the specific Node on all available CPU cores, averaged over the sample window

@@ -1687,7 +1688,7 @@ CreateAsyncDoubleMetricK8sNodeCpuTime(metrics::Meter *meter) */ static constexpr const char *kMetricK8sNodeCpuUsage = "k8s.node.cpu.usage"; static constexpr const char *descrMetricK8sNodeCpuUsage = - "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs"; + "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs."; static constexpr const char *unitMetricK8sNodeCpuUsage = "{cpu}"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -1722,14 +1723,161 @@ CreateAsyncDoubleMetricK8sNodeCpuUsage(metrics::Meter *meter) } /** - Memory usage of the Node + Node filesystem available bytes. +

+ This metric is derived from the + FsStats.AvailableBytes + field of the NodeStats.Fs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sNodeFilesystemAvailable = "k8s.node.filesystem.available"; +static constexpr const char *descrMetricK8sNodeFilesystemAvailable = + "Node filesystem available bytes."; +static constexpr const char *unitMetricK8sNodeFilesystemAvailable = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sNodeFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sNodeFilesystemAvailable, + descrMetricK8sNodeFilesystemAvailable, + unitMetricK8sNodeFilesystemAvailable); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sNodeFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sNodeFilesystemAvailable, + descrMetricK8sNodeFilesystemAvailable, + unitMetricK8sNodeFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sNodeFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sNodeFilesystemAvailable, + descrMetricK8sNodeFilesystemAvailable, + unitMetricK8sNodeFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sNodeFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sNodeFilesystemAvailable, + descrMetricK8sNodeFilesystemAvailable, + unitMetricK8sNodeFilesystemAvailable); +} + +/** + Node filesystem capacity. +

+ This metric is derived from the + FsStats.CapacityBytes + field of the NodeStats.Fs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sNodeFilesystemCapacity = "k8s.node.filesystem.capacity"; +static constexpr const char *descrMetricK8sNodeFilesystemCapacity = "Node filesystem capacity."; +static constexpr const char *unitMetricK8sNodeFilesystemCapacity = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sNodeFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sNodeFilesystemCapacity, + descrMetricK8sNodeFilesystemCapacity, + unitMetricK8sNodeFilesystemCapacity); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sNodeFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sNodeFilesystemCapacity, + descrMetricK8sNodeFilesystemCapacity, + unitMetricK8sNodeFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sNodeFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sNodeFilesystemCapacity, + descrMetricK8sNodeFilesystemCapacity, + unitMetricK8sNodeFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sNodeFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sNodeFilesystemCapacity, + descrMetricK8sNodeFilesystemCapacity, + unitMetricK8sNodeFilesystemCapacity); +} + +/** + Node filesystem usage. +

+ This may not equal capacity - available. +

+ This metric is derived from the + FsStats.UsedBytes + field of the NodeStats.Fs + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sNodeFilesystemUsage = "k8s.node.filesystem.usage"; +static constexpr const char *descrMetricK8sNodeFilesystemUsage = "Node filesystem usage."; +static constexpr const char *unitMetricK8sNodeFilesystemUsage = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sNodeFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sNodeFilesystemUsage, + descrMetricK8sNodeFilesystemUsage, + unitMetricK8sNodeFilesystemUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sNodeFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sNodeFilesystemUsage, + descrMetricK8sNodeFilesystemUsage, + unitMetricK8sNodeFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sNodeFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sNodeFilesystemUsage, + descrMetricK8sNodeFilesystemUsage, + unitMetricK8sNodeFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sNodeFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sNodeFilesystemUsage, + descrMetricK8sNodeFilesystemUsage, + unitMetricK8sNodeFilesystemUsage); +} + +/** + Memory usage of the Node.

Total memory usage of the Node

gauge */ static constexpr const char *kMetricK8sNodeMemoryUsage = "k8s.node.memory.usage"; -static constexpr const char *descrMetricK8sNodeMemoryUsage = "Memory usage of the Node"; +static constexpr const char *descrMetricK8sNodeMemoryUsage = "Memory usage of the Node."; static constexpr const char *unitMetricK8sNodeMemoryUsage = "By"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -1764,12 +1912,12 @@ CreateAsyncDoubleMetricK8sNodeMemoryUsage(metrics::Meter *meter) } /** - Node network errors + Node network errors.

counter */ static constexpr const char *kMetricK8sNodeNetworkErrors = "k8s.node.network.errors"; -static constexpr const char *descrMetricK8sNodeNetworkErrors = "Node network errors"; +static constexpr const char *descrMetricK8sNodeNetworkErrors = "Node network errors."; static constexpr const char *unitMetricK8sNodeNetworkErrors = "{error}"; static inline nostd::unique_ptr> @@ -1801,12 +1949,12 @@ CreateAsyncDoubleMetricK8sNodeNetworkErrors(metrics::Meter *meter) } /** - Network bytes for the Node + Network bytes for the Node.

counter */ static constexpr const char *kMetricK8sNodeNetworkIo = "k8s.node.network.io"; -static constexpr const char *descrMetricK8sNodeNetworkIo = "Network bytes for the Node"; +static constexpr const char *descrMetricK8sNodeNetworkIo = "Network bytes for the Node."; static constexpr const char *unitMetricK8sNodeNetworkIo = "By"; static inline nostd::unique_ptr> CreateSyncInt64MetricK8sNodeNetworkIo( @@ -1838,14 +1986,14 @@ CreateAsyncDoubleMetricK8sNodeNetworkIo(metrics::Meter *meter) } /** - The time the Node has been running + The time the Node has been running.

Instrumentations SHOULD use a gauge with type @code double @endcode and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

gauge */ static constexpr const char *kMetricK8sNodeUptime = "k8s.node.uptime"; -static constexpr const char *descrMetricK8sNodeUptime = "The time the Node has been running"; +static constexpr const char *descrMetricK8sNodeUptime = "The time the Node has been running."; static constexpr const char *unitMetricK8sNodeUptime = "s"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -1880,14 +2028,14 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Total CPU time consumed + Total CPU time consumed.

Total CPU time consumed by the specific Pod on all available CPU cores

counter */ static constexpr const char *kMetricK8sPodCpuTime = "k8s.pod.cpu.time"; -static constexpr const char *descrMetricK8sPodCpuTime = "Total CPU time consumed"; +static constexpr const char *descrMetricK8sPodCpuTime = "Total CPU time consumed."; static constexpr const char *unitMetricK8sPodCpuTime = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricK8sPodCpuTime( @@ -1919,7 +2067,7 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs + Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.

CPU usage of the specific Pod on all available CPU cores, averaged over the sample window

@@ -1927,7 +2075,7 @@ static inline nostd::shared_ptr CreateAsyncDouble */ static constexpr const char *kMetricK8sPodCpuUsage = "k8s.pod.cpu.usage"; static constexpr const char *descrMetricK8sPodCpuUsage = - "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs"; + "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs."; static constexpr const char *unitMetricK8sPodCpuUsage = "{cpu}"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -1962,14 +2110,161 @@ CreateAsyncDoubleMetricK8sPodCpuUsage(metrics::Meter *meter) } /** - Memory usage of the Pod + Pod filesystem available bytes. +

+ This metric is derived from the + FsStats.AvailableBytes + field of the PodStats.EphemeralStorage + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sPodFilesystemAvailable = "k8s.pod.filesystem.available"; +static constexpr const char *descrMetricK8sPodFilesystemAvailable = + "Pod filesystem available bytes."; +static constexpr const char *unitMetricK8sPodFilesystemAvailable = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodFilesystemAvailable, + descrMetricK8sPodFilesystemAvailable, + unitMetricK8sPodFilesystemAvailable); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodFilesystemAvailable, + descrMetricK8sPodFilesystemAvailable, + unitMetricK8sPodFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodFilesystemAvailable, + descrMetricK8sPodFilesystemAvailable, + unitMetricK8sPodFilesystemAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodFilesystemAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodFilesystemAvailable, + descrMetricK8sPodFilesystemAvailable, + unitMetricK8sPodFilesystemAvailable); +} + +/** + Pod filesystem capacity. +

+ This metric is derived from the + FsStats.CapacityBytes + field of the PodStats.EphemeralStorage + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sPodFilesystemCapacity = "k8s.pod.filesystem.capacity"; +static constexpr const char *descrMetricK8sPodFilesystemCapacity = "Pod filesystem capacity."; +static constexpr const char *unitMetricK8sPodFilesystemCapacity = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodFilesystemCapacity, + descrMetricK8sPodFilesystemCapacity, + unitMetricK8sPodFilesystemCapacity); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodFilesystemCapacity, + descrMetricK8sPodFilesystemCapacity, + unitMetricK8sPodFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodFilesystemCapacity, + descrMetricK8sPodFilesystemCapacity, + unitMetricK8sPodFilesystemCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodFilesystemCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodFilesystemCapacity, + descrMetricK8sPodFilesystemCapacity, + unitMetricK8sPodFilesystemCapacity); +} + +/** + Pod filesystem usage. +

+ This may not equal capacity - available. +

+ This metric is derived from the + FsStats.UsedBytes + field of the PodStats.EphemeralStorage + of the Kubelet's stats API. +

+ updowncounter + */ +static constexpr const char *kMetricK8sPodFilesystemUsage = "k8s.pod.filesystem.usage"; +static constexpr const char *descrMetricK8sPodFilesystemUsage = "Pod filesystem usage."; +static constexpr const char *unitMetricK8sPodFilesystemUsage = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodFilesystemUsage, + descrMetricK8sPodFilesystemUsage, + unitMetricK8sPodFilesystemUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodFilesystemUsage, + descrMetricK8sPodFilesystemUsage, + unitMetricK8sPodFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodFilesystemUsage, + descrMetricK8sPodFilesystemUsage, + unitMetricK8sPodFilesystemUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodFilesystemUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodFilesystemUsage, + descrMetricK8sPodFilesystemUsage, + unitMetricK8sPodFilesystemUsage); +} + +/** + Memory usage of the Pod.

Total memory usage of the Pod

gauge */ static constexpr const char *kMetricK8sPodMemoryUsage = "k8s.pod.memory.usage"; -static constexpr const char *descrMetricK8sPodMemoryUsage = "Memory usage of the Pod"; +static constexpr const char *descrMetricK8sPodMemoryUsage = "Memory usage of the Pod."; static constexpr const char *unitMetricK8sPodMemoryUsage = "By"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -2004,12 +2299,12 @@ CreateAsyncDoubleMetricK8sPodMemoryUsage(metrics::Meter *meter) } /** - Pod network errors + Pod network errors.

counter */ static constexpr const char *kMetricK8sPodNetworkErrors = "k8s.pod.network.errors"; -static constexpr const char *descrMetricK8sPodNetworkErrors = "Pod network errors"; +static constexpr const char *descrMetricK8sPodNetworkErrors = "Pod network errors."; static constexpr const char *unitMetricK8sPodNetworkErrors = "{error}"; static inline nostd::unique_ptr> @@ -2041,12 +2336,12 @@ CreateAsyncDoubleMetricK8sPodNetworkErrors(metrics::Meter *meter) } /** - Network bytes for the Pod + Network bytes for the Pod.

counter */ static constexpr const char *kMetricK8sPodNetworkIo = "k8s.pod.network.io"; -static constexpr const char *descrMetricK8sPodNetworkIo = "Network bytes for the Pod"; +static constexpr const char *descrMetricK8sPodNetworkIo = "Network bytes for the Pod."; static constexpr const char *unitMetricK8sPodNetworkIo = "By"; static inline nostd::unique_ptr> CreateSyncInt64MetricK8sPodNetworkIo( @@ -2078,14 +2373,14 @@ CreateAsyncDoubleMetricK8sPodNetworkIo(metrics::Meter *meter) } /** - The time the Pod has been running + The time the Pod has been running.

Instrumentations SHOULD use a gauge with type @code double @endcode and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

gauge */ static constexpr const char *kMetricK8sPodUptime = "k8s.pod.uptime"; -static constexpr const char *descrMetricK8sPodUptime = "The time the Pod has been running"; +static constexpr const char *descrMetricK8sPodUptime = "The time the Pod has been running."; static constexpr const char *unitMetricK8sPodUptime = "s"; #if OPENTELEMETRY_ABI_VERSION_NO >= 2 @@ -2119,16 +2414,291 @@ static inline nostd::shared_ptr CreateAsyncDouble unitMetricK8sPodUptime); } +/** + Pod volume storage space available. +

+ This metric is derived from the + VolumeStats.AvailableBytes + field of the PodStats of + the Kubelet's stats API.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeAvailable = "k8s.pod.volume.available"; +static constexpr const char *descrMetricK8sPodVolumeAvailable = + "Pod volume storage space available."; +static constexpr const char *unitMetricK8sPodVolumeAvailable = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodVolumeAvailable, + descrMetricK8sPodVolumeAvailable, + unitMetricK8sPodVolumeAvailable); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodVolumeAvailable, + descrMetricK8sPodVolumeAvailable, + unitMetricK8sPodVolumeAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeAvailable(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodVolumeAvailable, + descrMetricK8sPodVolumeAvailable, + unitMetricK8sPodVolumeAvailable); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeAvailable(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodVolumeAvailable, + descrMetricK8sPodVolumeAvailable, + unitMetricK8sPodVolumeAvailable); +} + +/** + Pod volume total capacity. +

+ This metric is derived from the + VolumeStats.CapacityBytes + field of the PodStats of + the Kubelet's stats API.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeCapacity = "k8s.pod.volume.capacity"; +static constexpr const char *descrMetricK8sPodVolumeCapacity = "Pod volume total capacity."; +static constexpr const char *unitMetricK8sPodVolumeCapacity = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter( + kMetricK8sPodVolumeCapacity, descrMetricK8sPodVolumeCapacity, unitMetricK8sPodVolumeCapacity); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter( + kMetricK8sPodVolumeCapacity, descrMetricK8sPodVolumeCapacity, unitMetricK8sPodVolumeCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeCapacity(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricK8sPodVolumeCapacity, descrMetricK8sPodVolumeCapacity, unitMetricK8sPodVolumeCapacity); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeCapacity(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricK8sPodVolumeCapacity, descrMetricK8sPodVolumeCapacity, unitMetricK8sPodVolumeCapacity); +} + +/** + The total inodes in the filesystem of the Pod's volume. +

+ This metric is derived from the + VolumeStats.Inodes + field of the PodStats of + the Kubelet's stats API.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeInodeCount = "k8s.pod.volume.inode.count"; +static constexpr const char *descrMetricK8sPodVolumeInodeCount = + "The total inodes in the filesystem of the Pod's volume."; +static constexpr const char *unitMetricK8sPodVolumeInodeCount = "{inode}"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeInodeCount(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodVolumeInodeCount, + descrMetricK8sPodVolumeInodeCount, + unitMetricK8sPodVolumeInodeCount); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeInodeCount(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodVolumeInodeCount, + descrMetricK8sPodVolumeInodeCount, + unitMetricK8sPodVolumeInodeCount); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeInodeCount(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodVolumeInodeCount, + descrMetricK8sPodVolumeInodeCount, + unitMetricK8sPodVolumeInodeCount); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeInodeCount(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodVolumeInodeCount, + descrMetricK8sPodVolumeInodeCount, + unitMetricK8sPodVolumeInodeCount); +} + +/** + The free inodes in the filesystem of the Pod's volume. +

+ This metric is derived from the + VolumeStats.InodesFree + field of the PodStats of + the Kubelet's stats API.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeInodeFree = "k8s.pod.volume.inode.free"; +static constexpr const char *descrMetricK8sPodVolumeInodeFree = + "The free inodes in the filesystem of the Pod's volume."; +static constexpr const char *unitMetricK8sPodVolumeInodeFree = "{inode}"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeInodeFree(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodVolumeInodeFree, + descrMetricK8sPodVolumeInodeFree, + unitMetricK8sPodVolumeInodeFree); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeInodeFree(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodVolumeInodeFree, + descrMetricK8sPodVolumeInodeFree, + unitMetricK8sPodVolumeInodeFree); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeInodeFree(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodVolumeInodeFree, + descrMetricK8sPodVolumeInodeFree, + unitMetricK8sPodVolumeInodeFree); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeInodeFree(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodVolumeInodeFree, + descrMetricK8sPodVolumeInodeFree, + unitMetricK8sPodVolumeInodeFree); +} + +/** + The inodes used by the filesystem of the Pod's volume. +

+ This metric is derived from the + VolumeStats.InodesUsed + field of the PodStats of + the Kubelet's stats API.

This may not be equal to @code inodes - free @endcode because + filesystem may share inodes with other filesystems.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeInodeUsed = "k8s.pod.volume.inode.used"; +static constexpr const char *descrMetricK8sPodVolumeInodeUsed = + "The inodes used by the filesystem of the Pod's volume."; +static constexpr const char *unitMetricK8sPodVolumeInodeUsed = "{inode}"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeInodeUsed(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodVolumeInodeUsed, + descrMetricK8sPodVolumeInodeUsed, + unitMetricK8sPodVolumeInodeUsed); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeInodeUsed(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodVolumeInodeUsed, + descrMetricK8sPodVolumeInodeUsed, + unitMetricK8sPodVolumeInodeUsed); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeInodeUsed(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter(kMetricK8sPodVolumeInodeUsed, + descrMetricK8sPodVolumeInodeUsed, + unitMetricK8sPodVolumeInodeUsed); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeInodeUsed(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter(kMetricK8sPodVolumeInodeUsed, + descrMetricK8sPodVolumeInodeUsed, + unitMetricK8sPodVolumeInodeUsed); +} + +/** + Pod volume usage. +

+ This may not equal capacity - available. +

+ This metric is derived from the + VolumeStats.UsedBytes + field of the PodStats of + the Kubelet's stats API.

updowncounter + */ +static constexpr const char *kMetricK8sPodVolumeUsage = "k8s.pod.volume.usage"; +static constexpr const char *descrMetricK8sPodVolumeUsage = "Pod volume usage."; +static constexpr const char *unitMetricK8sPodVolumeUsage = "By"; + +static inline nostd::unique_ptr> +CreateSyncInt64MetricK8sPodVolumeUsage(metrics::Meter *meter) +{ + return meter->CreateInt64UpDownCounter(kMetricK8sPodVolumeUsage, descrMetricK8sPodVolumeUsage, + unitMetricK8sPodVolumeUsage); +} + +static inline nostd::unique_ptr> +CreateSyncDoubleMetricK8sPodVolumeUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleUpDownCounter(kMetricK8sPodVolumeUsage, descrMetricK8sPodVolumeUsage, + unitMetricK8sPodVolumeUsage); +} + +static inline nostd::shared_ptr +CreateAsyncInt64MetricK8sPodVolumeUsage(metrics::Meter *meter) +{ + return meter->CreateInt64ObservableUpDownCounter( + kMetricK8sPodVolumeUsage, descrMetricK8sPodVolumeUsage, unitMetricK8sPodVolumeUsage); +} + +static inline nostd::shared_ptr +CreateAsyncDoubleMetricK8sPodVolumeUsage(metrics::Meter *meter) +{ + return meter->CreateDoubleObservableUpDownCounter( + kMetricK8sPodVolumeUsage, descrMetricK8sPodVolumeUsage, unitMetricK8sPodVolumeUsage); +} + /** Total number of available replica pods (ready for at least minReadySeconds) targeted by this - replicaset

This metric aligns with the @code availableReplicas @endcode field of the This metric aligns with the @code availableReplicas @endcode field of the K8s ReplicaSetStatus.

updowncounter */ static constexpr const char *kMetricK8sReplicasetAvailablePods = "k8s.replicaset.available_pods"; static constexpr const char *descrMetricK8sReplicasetAvailablePods = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this " - "replicaset"; + "replicaset."; static constexpr const char *unitMetricK8sReplicasetAvailablePods = "{pod}"; static inline nostd::unique_ptr> @@ -2164,7 +2734,7 @@ CreateAsyncDoubleMetricK8sReplicasetAvailablePods(metrics::Meter *meter) } /** - Number of desired replica pods in this replicaset + Number of desired replica pods in this replicaset.

This metric aligns with the @code replicas @endcode field of the > @@ -2305,7 +2875,7 @@ CreateAsyncDoubleMetricK8sReplicationControllerDesiredPods(metrics::Meter *meter /** Total number of available replica pods (ready for at least minReadySeconds) targeted by this - replication controller

This metric aligns with the @code availableReplicas @endcode field of + replication controller.

This metric aligns with the @code availableReplicas @endcode field of the K8s ReplicationControllerStatus

updowncounter @@ -2314,7 +2884,7 @@ static constexpr const char *kMetricK8sReplicationcontrollerAvailablePods = "k8s.replicationcontroller.available_pods"; static constexpr const char *descrMetricK8sReplicationcontrollerAvailablePods = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this " - "replication controller"; + "replication controller."; static constexpr const char *unitMetricK8sReplicationcontrollerAvailablePods = "{pod}"; static inline nostd::unique_ptr> @@ -2351,7 +2921,7 @@ CreateAsyncDoubleMetricK8sReplicationcontrollerAvailablePods(metrics::Meter *met } /** - Number of desired replica pods in this replication controller + Number of desired replica pods in this replication controller.

This metric aligns with the @code replicas @endcode field of the > @@ -3380,7 +3950,7 @@ CreateAsyncDoubleMetricK8sResourcequotaStorageRequestUsed(metrics::Meter *meter) /** The number of replica pods created by the statefulset controller from the statefulset version - indicated by currentRevision

This metric aligns with the @code currentReplicas @endcode field + indicated by currentRevision.

This metric aligns with the @code currentReplicas @endcode field of the K8s StatefulSetStatus.

updowncounter @@ -3388,7 +3958,7 @@ CreateAsyncDoubleMetricK8sResourcequotaStorageRequestUsed(metrics::Meter *meter) static constexpr const char *kMetricK8sStatefulsetCurrentPods = "k8s.statefulset.current_pods"; static constexpr const char *descrMetricK8sStatefulsetCurrentPods = "The number of replica pods created by the statefulset controller from the statefulset version " - "indicated by currentRevision"; + "indicated by currentRevision."; static constexpr const char *unitMetricK8sStatefulsetCurrentPods = "{pod}"; static inline nostd::unique_ptr> @@ -3424,7 +3994,7 @@ CreateAsyncDoubleMetricK8sStatefulsetCurrentPods(metrics::Meter *meter) } /** - Number of desired replica pods in this statefulset + Number of desired replica pods in this statefulset.

This metric aligns with the @code replicas @endcode field of the > @@ -3469,7 +4039,7 @@ CreateAsyncDoubleMetricK8sStatefulsetDesiredPods(metrics::Meter *meter) } /** - The number of replica pods created for this statefulset with a Ready Condition + The number of replica pods created for this statefulset with a Ready Condition.

This metric aligns with the @code readyReplicas @endcode field of the > @@ -3515,7 +4085,7 @@ CreateAsyncDoubleMetricK8sStatefulsetReadyPods(metrics::Meter *meter) /** Number of replica pods created by the statefulset controller from the statefulset version - indicated by updateRevision

This metric aligns with the @code updatedReplicas @endcode field + indicated by updateRevision.

This metric aligns with the @code updatedReplicas @endcode field of the K8s StatefulSetStatus.

updowncounter @@ -3523,7 +4093,7 @@ CreateAsyncDoubleMetricK8sStatefulsetReadyPods(metrics::Meter *meter) static constexpr const char *kMetricK8sStatefulsetUpdatedPods = "k8s.statefulset.updated_pods"; static constexpr const char *descrMetricK8sStatefulsetUpdatedPods = "Number of replica pods created by the statefulset controller from the statefulset version " - "indicated by updateRevision"; + "indicated by updateRevision."; static constexpr const char *unitMetricK8sStatefulsetUpdatedPods = "{pod}"; static inline nostd::unique_ptr> diff --git a/api/include/opentelemetry/semconv/incubating/linux_attributes.h b/api/include/opentelemetry/semconv/incubating/linux_attributes.h index c3f90337a4..18e77516bc 100644 --- a/api/include/opentelemetry/semconv/incubating/linux_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/linux_attributes.h @@ -26,14 +26,9 @@ static constexpr const char *kLinuxMemorySlabState = "linux.memory.slab.state"; namespace LinuxMemorySlabStateValues { -/** - none - */ + static constexpr const char *kReclaimable = "reclaimable"; -/** - none - */ static constexpr const char *kUnreclaimable = "unreclaimable"; } // namespace LinuxMemorySlabStateValues diff --git a/api/include/opentelemetry/semconv/incubating/message_attributes.h b/api/include/opentelemetry/semconv/incubating/message_attributes.h index 05941248c9..0643e94ed5 100644 --- a/api/include/opentelemetry/semconv/incubating/message_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/message_attributes.h @@ -59,14 +59,9 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kMessageUncompressedSize = namespace MessageTypeValues { -/** - none - */ + static constexpr const char *kSent = "SENT"; -/** - none - */ static constexpr const char *kReceived = "RECEIVED"; } // namespace MessageTypeValues diff --git a/api/include/opentelemetry/semconv/incubating/messaging_attributes.h b/api/include/opentelemetry/semconv/incubating/messaging_attributes.h index f036c3654a..4a3e48eac1 100644 --- a/api/include/opentelemetry/semconv/incubating/messaging_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/messaging_attributes.h @@ -386,13 +386,19 @@ static constexpr const char *kSettle = "settle"; /** Deprecated. Use @code process @endcode instead. + + @deprecated + {"note": "Replaced by @code process @endcode.", "reason": "renamed", "renamed_to": "process"} */ -static constexpr const char *kDeliver = "deliver"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kDeliver = "deliver"; /** Deprecated. Use @code send @endcode instead. + + @deprecated + {"note": "Replaced by @code send @endcode.", "reason": "renamed", "renamed_to": "send"} */ -static constexpr const char *kPublish = "publish"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kPublish = "publish"; } // namespace MessagingOperationTypeValues @@ -465,6 +471,11 @@ namespace MessagingSystemValues */ static constexpr const char *kActivemq = "activemq"; +/** + Amazon Simple Notification Service (SNS) + */ +static constexpr const char *kAwsSns = "aws.sns"; + /** Amazon Simple Queue Service (SQS) */ diff --git a/api/include/opentelemetry/semconv/incubating/net_attributes.h b/api/include/opentelemetry/semconv/incubating/net_attributes.h index 951217616a..266982691f 100644 --- a/api/include/opentelemetry/semconv/incubating/net_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/net_attributes.h @@ -176,14 +176,9 @@ static constexpr const char *kUnix = "unix"; namespace NetTransportValues { -/** - none - */ + static constexpr const char *kIpTcp = "ip_tcp"; -/** - none - */ static constexpr const char *kIpUdp = "ip_udp"; /** diff --git a/api/include/opentelemetry/semconv/incubating/network_attributes.h b/api/include/opentelemetry/semconv/incubating/network_attributes.h index 7b8404b2c9..34c6a880e1 100644 --- a/api/include/opentelemetry/semconv/incubating/network_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/network_attributes.h @@ -122,59 +122,27 @@ static constexpr const char *kNetworkType = "network.type"; namespace NetworkConnectionStateValues { -/** - none - */ + static constexpr const char *kClosed = "closed"; -/** - none - */ static constexpr const char *kCloseWait = "close_wait"; -/** - none - */ static constexpr const char *kClosing = "closing"; -/** - none - */ static constexpr const char *kEstablished = "established"; -/** - none - */ static constexpr const char *kFinWait1 = "fin_wait_1"; -/** - none - */ static constexpr const char *kFinWait2 = "fin_wait_2"; -/** - none - */ static constexpr const char *kLastAck = "last_ack"; -/** - none - */ static constexpr const char *kListen = "listen"; -/** - none - */ static constexpr const char *kSynReceived = "syn_received"; -/** - none - */ static constexpr const char *kSynSent = "syn_sent"; -/** - none - */ static constexpr const char *kTimeWait = "time_wait"; } // namespace NetworkConnectionStateValues @@ -290,43 +258,24 @@ static constexpr const char *kLteCa = "lte_ca"; namespace NetworkConnectionTypeValues { -/** - none - */ + static constexpr const char *kWifi = "wifi"; -/** - none - */ static constexpr const char *kWired = "wired"; -/** - none - */ static constexpr const char *kCell = "cell"; -/** - none - */ static constexpr const char *kUnavailable = "unavailable"; -/** - none - */ static constexpr const char *kUnknown = "unknown"; } // namespace NetworkConnectionTypeValues namespace NetworkIoDirectionValues { -/** - none - */ + static constexpr const char *kTransmit = "transmit"; -/** - none - */ static constexpr const char *kReceive = "receive"; } // namespace NetworkIoDirectionValues diff --git a/api/include/opentelemetry/semconv/incubating/openai_attributes.h b/api/include/opentelemetry/semconv/incubating/openai_attributes.h new file mode 100644 index 0000000000..83cbd44e8c --- /dev/null +++ b/api/include/opentelemetry/semconv/incubating/openai_attributes.h @@ -0,0 +1,54 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * DO NOT EDIT, this is an Auto-generated file from: + * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2 + */ + +#pragma once + +#include "opentelemetry/common/macros.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace semconv +{ +namespace openai +{ + +/** + The service tier requested. May be a specific tier, default, or auto. + */ +static constexpr const char *kOpenaiRequestServiceTier = "openai.request.service_tier"; + +/** + The service tier used for the response. + */ +static constexpr const char *kOpenaiResponseServiceTier = "openai.response.service_tier"; + +/** + A fingerprint to track any eventual change in the Generative AI environment. + */ +static constexpr const char *kOpenaiResponseSystemFingerprint = + "openai.response.system_fingerprint"; + +namespace OpenaiRequestServiceTierValues +{ +/** + The system will utilize scale tier credits until they are exhausted. + */ +static constexpr const char *kAuto = "auto"; + +/** + The system will utilize the default scale tier. + */ +static constexpr const char *kDefault = "default"; + +} // namespace OpenaiRequestServiceTierValues + +} // namespace openai +} // namespace semconv +OPENTELEMETRY_END_NAMESPACE diff --git a/api/include/opentelemetry/semconv/incubating/os_attributes.h b/api/include/opentelemetry/semconv/incubating/os_attributes.h index 1c12402c61..90ca8e5aa1 100644 --- a/api/include/opentelemetry/semconv/incubating/os_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/os_attributes.h @@ -100,8 +100,11 @@ static constexpr const char *kSolaris = "solaris"; /** Deprecated. Use @code zos @endcode instead. + + @deprecated + {"note": "Replaced by @code zos @endcode.", "reason": "renamed", "renamed_to": "zos"} */ -static constexpr const char *kZOs = "z_os"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kZOs = "z_os"; /** IBM z/OS diff --git a/api/include/opentelemetry/semconv/incubating/otel_attributes.h b/api/include/opentelemetry/semconv/incubating/otel_attributes.h index ddf04b9406..20f7bd7786 100644 --- a/api/include/opentelemetry/semconv/incubating/otel_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/otel_attributes.h @@ -69,6 +69,11 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kOtelLibraryVersion = "ote */ static constexpr const char *kOtelScopeName = "otel.scope.name"; +/** + The schema URL of the instrumentation scope. + */ +static constexpr const char *kOtelScopeSchemaUrl = "otel.scope.schema_url"; + /** The version of the instrumentation scope - (@code InstrumentationScope.Version @endcode in OTLP). */ diff --git a/api/include/opentelemetry/semconv/incubating/otel_metrics.h b/api/include/opentelemetry/semconv/incubating/otel_metrics.h index 2f4d9cd2fc..607939122d 100644 --- a/api/include/opentelemetry/semconv/incubating/otel_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/otel_metrics.h @@ -21,7 +21,7 @@ namespace otel { /** - The number of log records for which the export has finished, either successful or failed + The number of log records for which the export has finished, either successful or failed.

For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code error.type @endcode MUST contain the failure cause. For exporters with partial success semantics @@ -31,7 +31,7 @@ namespace otel */ static constexpr const char *kMetricOtelSdkExporterLogExported = "otel.sdk.exporter.log.exported"; static constexpr const char *descrMetricOtelSdkExporterLogExported = - "The number of log records for which the export has finished, either successful or failed"; + "The number of log records for which the export has finished, either successful or failed."; static constexpr const char *unitMetricOtelSdkExporterLogExported = "{log_record}"; static inline nostd::unique_ptr> @@ -68,14 +68,14 @@ CreateAsyncDoubleMetricOtelSdkExporterLogExported(metrics::Meter *meter) /** The number of log records which were passed to the exporter, but that have not been exported yet - (neither successful, nor failed)

For successful exports, @code error.type @endcode MUST NOT be - set. For failed exports, @code error.type @endcode MUST contain the failure cause.

+ (neither successful, nor failed).

For successful exports, @code error.type @endcode MUST NOT + be set. For failed exports, @code error.type @endcode MUST contain the failure cause.

updowncounter */ static constexpr const char *kMetricOtelSdkExporterLogInflight = "otel.sdk.exporter.log.inflight"; static constexpr const char *descrMetricOtelSdkExporterLogInflight = "The number of log records which were passed to the exporter, but that have not been exported " - "yet (neither successful, nor failed)"; + "yet (neither successful, nor failed)."; static constexpr const char *unitMetricOtelSdkExporterLogInflight = "{log_record}"; static inline nostd::unique_ptr> @@ -111,7 +111,7 @@ CreateAsyncDoubleMetricOtelSdkExporterLogInflight(metrics::Meter *meter) } /** - The number of metric data points for which the export has finished, either successful or failed + The number of metric data points for which the export has finished, either successful or failed.

For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code error.type @endcode MUST contain the failure cause. For exporters with partial success semantics @@ -123,7 +123,7 @@ static constexpr const char *kMetricOtelSdkExporterMetricDataPointExported = "otel.sdk.exporter.metric_data_point.exported"; static constexpr const char *descrMetricOtelSdkExporterMetricDataPointExported = "The number of metric data points for which the export has finished, either successful or " - "failed"; + "failed."; static constexpr const char *unitMetricOtelSdkExporterMetricDataPointExported = "{data_point}"; static inline nostd::unique_ptr> @@ -160,7 +160,7 @@ CreateAsyncDoubleMetricOtelSdkExporterMetricDataPointExported(metrics::Meter *me /** The number of metric data points which were passed to the exporter, but that have not been - exported yet (neither successful, nor failed)

For successful exports, @code error.type + exported yet (neither successful, nor failed).

For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code error.type @endcode MUST contain the failure cause.

updowncounter */ @@ -168,7 +168,7 @@ static constexpr const char *kMetricOtelSdkExporterMetricDataPointInflight = "otel.sdk.exporter.metric_data_point.inflight"; static constexpr const char *descrMetricOtelSdkExporterMetricDataPointInflight = "The number of metric data points which were passed to the exporter, but that have not been " - "exported yet (neither successful, nor failed)"; + "exported yet (neither successful, nor failed)."; static constexpr const char *unitMetricOtelSdkExporterMetricDataPointInflight = "{data_point}"; static inline nostd::unique_ptr> @@ -239,7 +239,7 @@ CreateSyncDoubleMetricOtelSdkExporterOperationDuration(metrics::Meter *meter) } /** - The number of spans for which the export has finished, either successful or failed + The number of spans for which the export has finished, either successful or failed.

For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code error.type @endcode MUST contain the failure cause. For exporters with partial success semantics @@ -249,7 +249,7 @@ CreateSyncDoubleMetricOtelSdkExporterOperationDuration(metrics::Meter *meter) */ static constexpr const char *kMetricOtelSdkExporterSpanExported = "otel.sdk.exporter.span.exported"; static constexpr const char *descrMetricOtelSdkExporterSpanExported = - "The number of spans for which the export has finished, either successful or failed"; + "The number of spans for which the export has finished, either successful or failed."; static constexpr const char *unitMetricOtelSdkExporterSpanExported = "{span}"; static inline nostd::unique_ptr> @@ -332,14 +332,14 @@ CreateAsyncDoubleMetricOtelSdkExporterSpanExportedCount(metrics::Meter *meter) /** The number of spans which were passed to the exporter, but that have not been exported yet - (neither successful, nor failed)

For successful exports, @code error.type @endcode MUST NOT be - set. For failed exports, @code error.type @endcode MUST contain the failure cause.

+ (neither successful, nor failed).

For successful exports, @code error.type @endcode MUST NOT + be set. For failed exports, @code error.type @endcode MUST contain the failure cause.

updowncounter */ static constexpr const char *kMetricOtelSdkExporterSpanInflight = "otel.sdk.exporter.span.inflight"; static constexpr const char *descrMetricOtelSdkExporterSpanInflight = "The number of spans which were passed to the exporter, but that have not been exported yet " - "(neither successful, nor failed)"; + "(neither successful, nor failed)."; static constexpr const char *unitMetricOtelSdkExporterSpanInflight = "{span}"; static inline nostd::unique_ptr> @@ -421,13 +421,13 @@ CreateAsyncDoubleMetricOtelSdkExporterSpanInflightCount(metrics::Meter *meter) } /** - The number of logs submitted to enabled SDK Loggers + The number of logs submitted to enabled SDK Loggers.

counter */ static constexpr const char *kMetricOtelSdkLogCreated = "otel.sdk.log.created"; static constexpr const char *descrMetricOtelSdkLogCreated = - "The number of logs submitted to enabled SDK Loggers"; + "The number of logs submitted to enabled SDK Loggers."; static constexpr const char *unitMetricOtelSdkLogCreated = "{log_record}"; static inline nostd::unique_ptr> CreateSyncInt64MetricOtelSdkLogCreated( @@ -489,7 +489,7 @@ CreateSyncDoubleMetricOtelSdkMetricReaderCollectionDuration(metrics::Meter *mete } /** - The number of log records for which the processing has finished, either successful or failed + The number of log records for which the processing has finished, either successful or failed.

For successful processing, @code error.type @endcode MUST NOT be set. For failed processing, @code error.type @endcode MUST contain the failure cause. For the SDK Simple and Batching Log Record @@ -499,7 +499,7 @@ CreateSyncDoubleMetricOtelSdkMetricReaderCollectionDuration(metrics::Meter *mete static constexpr const char *kMetricOtelSdkProcessorLogProcessed = "otel.sdk.processor.log.processed"; static constexpr const char *descrMetricOtelSdkProcessorLogProcessed = - "The number of log records for which the processing has finished, either successful or failed"; + "The number of log records for which the processing has finished, either successful or failed."; static constexpr const char *unitMetricOtelSdkProcessorLogProcessed = "{log_record}"; static inline nostd::unique_ptr> @@ -536,14 +536,14 @@ CreateAsyncDoubleMetricOtelSdkProcessorLogProcessed(metrics::Meter *meter) /** The maximum number of log records the queue of a given instance of an SDK Log Record processor can - hold

Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log Record - Processor.

updowncounter + hold.

Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log + Record Processor.

updowncounter */ static constexpr const char *kMetricOtelSdkProcessorLogQueueCapacity = "otel.sdk.processor.log.queue.capacity"; static constexpr const char *descrMetricOtelSdkProcessorLogQueueCapacity = "The maximum number of log records the queue of a given instance of an SDK Log Record " - "processor can hold"; + "processor can hold."; static constexpr const char *unitMetricOtelSdkProcessorLogQueueCapacity = "{log_record}"; static inline nostd::unique_ptr> @@ -579,7 +579,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter) } /** - The number of log records in the queue of a given instance of an SDK log processor + The number of log records in the queue of a given instance of an SDK log processor.

Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record Processor.

updowncounter @@ -587,7 +587,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter) static constexpr const char *kMetricOtelSdkProcessorLogQueueSize = "otel.sdk.processor.log.queue.size"; static constexpr const char *descrMetricOtelSdkProcessorLogQueueSize = - "The number of log records in the queue of a given instance of an SDK log processor"; + "The number of log records in the queue of a given instance of an SDK log processor."; static constexpr const char *unitMetricOtelSdkProcessorLogQueueSize = "{log_record}"; static inline nostd::unique_ptr> @@ -623,7 +623,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter) } /** - The number of spans for which the processing has finished, either successful or failed + The number of spans for which the processing has finished, either successful or failed.

For successful processing, @code error.type @endcode MUST NOT be set. For failed processing, @code error.type @endcode MUST contain the failure cause. For the SDK Simple and Batching Span Processor @@ -633,7 +633,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter) static constexpr const char *kMetricOtelSdkProcessorSpanProcessed = "otel.sdk.processor.span.processed"; static constexpr const char *descrMetricOtelSdkProcessorSpanProcessed = - "The number of spans for which the processing has finished, either successful or failed"; + "The number of spans for which the processing has finished, either successful or failed."; static constexpr const char *unitMetricOtelSdkProcessorSpanProcessed = "{span}"; static inline nostd::unique_ptr> @@ -716,7 +716,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter) } /** - The maximum number of spans the queue of a given instance of an SDK span processor can hold + The maximum number of spans the queue of a given instance of an SDK span processor can hold.

Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.

@@ -725,7 +725,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter) static constexpr const char *kMetricOtelSdkProcessorSpanQueueCapacity = "otel.sdk.processor.span.queue.capacity"; static constexpr const char *descrMetricOtelSdkProcessorSpanQueueCapacity = - "The maximum number of spans the queue of a given instance of an SDK span processor can hold"; + "The maximum number of spans the queue of a given instance of an SDK span processor can hold."; static constexpr const char *unitMetricOtelSdkProcessorSpanQueueCapacity = "{span}"; static inline nostd::unique_ptr> @@ -761,7 +761,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter) } /** - The number of spans in the queue of a given instance of an SDK span processor + The number of spans in the queue of a given instance of an SDK span processor.

Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.

@@ -770,7 +770,7 @@ CreateAsyncDoubleMetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter) static constexpr const char *kMetricOtelSdkProcessorSpanQueueSize = "otel.sdk.processor.span.queue.size"; static constexpr const char *descrMetricOtelSdkProcessorSpanQueueSize = - "The number of spans in the queue of a given instance of an SDK span processor"; + "The number of spans in the queue of a given instance of an SDK span processor."; static constexpr const char *unitMetricOtelSdkProcessorSpanQueueSize = "{span}"; static inline nostd::unique_ptr> @@ -895,12 +895,12 @@ CreateAsyncDoubleMetricOtelSdkSpanEndedCount(metrics::Meter *meter) /** The number of created spans with @code recording=true @endcode for which the end operation has not - been called yet

updowncounter + been called yet.

updowncounter */ static constexpr const char *kMetricOtelSdkSpanLive = "otel.sdk.span.live"; static constexpr const char *descrMetricOtelSdkSpanLive = "The number of created spans with `recording=true` for which the end operation has not been " - "called yet"; + "called yet."; static constexpr const char *unitMetricOtelSdkSpanLive = "{span}"; static inline nostd::unique_ptr> @@ -973,14 +973,14 @@ CreateAsyncDoubleMetricOtelSdkSpanLiveCount(metrics::Meter *meter) } /** - The number of created spans + The number of created spans.

Implementations MUST record this metric for all spans, even for non-recording ones.

counter */ static constexpr const char *kMetricOtelSdkSpanStarted = "otel.sdk.span.started"; -static constexpr const char *descrMetricOtelSdkSpanStarted = "The number of created spans"; +static constexpr const char *descrMetricOtelSdkSpanStarted = "The number of created spans."; static constexpr const char *unitMetricOtelSdkSpanStarted = "{span}"; static inline nostd::unique_ptr> CreateSyncInt64MetricOtelSdkSpanStarted( diff --git a/api/include/opentelemetry/semconv/incubating/other_attributes.h b/api/include/opentelemetry/semconv/incubating/other_attributes.h index ab0939606f..c8feb59b62 100644 --- a/api/include/opentelemetry/semconv/incubating/other_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/other_attributes.h @@ -30,14 +30,9 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kState = "state"; namespace StateValues { -/** - none - */ + static constexpr const char *kIdle = "idle"; -/** - none - */ static constexpr const char *kUsed = "used"; } // namespace StateValues diff --git a/api/include/opentelemetry/semconv/incubating/process_attributes.h b/api/include/opentelemetry/semconv/incubating/process_attributes.h index e6f32fbc08..b6a8bd1d02 100644 --- a/api/include/opentelemetry/semconv/incubating/process_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/process_attributes.h @@ -247,47 +247,29 @@ static constexpr const char *kProcessWorkingDirectory = "process.working_directo namespace ProcessContextSwitchTypeValues { -/** - none - */ + static constexpr const char *kVoluntary = "voluntary"; -/** - none - */ static constexpr const char *kInvoluntary = "involuntary"; } // namespace ProcessContextSwitchTypeValues namespace ProcessCpuStateValues { -/** - none - */ + static constexpr const char *kSystem = "system"; -/** - none - */ static constexpr const char *kUser = "user"; -/** - none - */ static constexpr const char *kWait = "wait"; } // namespace ProcessCpuStateValues namespace ProcessPagingFaultTypeValues { -/** - none - */ + static constexpr const char *kMajor = "major"; -/** - none - */ static constexpr const char *kMinor = "minor"; } // namespace ProcessPagingFaultTypeValues diff --git a/api/include/opentelemetry/semconv/incubating/rpc_attributes.h b/api/include/opentelemetry/semconv/incubating/rpc_attributes.h index daf36ce67b..8a85fe4697 100644 --- a/api/include/opentelemetry/semconv/incubating/rpc_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/rpc_attributes.h @@ -149,84 +149,37 @@ static constexpr const char *kRpcSystem = "rpc.system"; namespace RpcConnectRpcErrorCodeValues { -/** - none - */ + static constexpr const char *kCancelled = "cancelled"; -/** - none - */ static constexpr const char *kUnknown = "unknown"; -/** - none - */ static constexpr const char *kInvalidArgument = "invalid_argument"; -/** - none - */ static constexpr const char *kDeadlineExceeded = "deadline_exceeded"; -/** - none - */ static constexpr const char *kNotFound = "not_found"; -/** - none - */ static constexpr const char *kAlreadyExists = "already_exists"; -/** - none - */ static constexpr const char *kPermissionDenied = "permission_denied"; -/** - none - */ static constexpr const char *kResourceExhausted = "resource_exhausted"; -/** - none - */ static constexpr const char *kFailedPrecondition = "failed_precondition"; -/** - none - */ static constexpr const char *kAborted = "aborted"; -/** - none - */ static constexpr const char *kOutOfRange = "out_of_range"; -/** - none - */ static constexpr const char *kUnimplemented = "unimplemented"; -/** - none - */ static constexpr const char *kInternal = "internal"; -/** - none - */ static constexpr const char *kUnavailable = "unavailable"; -/** - none - */ static constexpr const char *kDataLoss = "data_loss"; -/** - none - */ static constexpr const char *kUnauthenticated = "unauthenticated"; } // namespace RpcConnectRpcErrorCodeValues @@ -322,14 +275,9 @@ static constexpr int kUnauthenticated = 16; namespace RpcMessageTypeValues { -/** - none - */ + static constexpr const char *kSent = "SENT"; -/** - none - */ static constexpr const char *kReceived = "RECEIVED"; } // namespace RpcMessageTypeValues diff --git a/api/include/opentelemetry/semconv/incubating/system_attributes.h b/api/include/opentelemetry/semconv/incubating/system_attributes.h index 917d507b36..7000190351 100644 --- a/api/include/opentelemetry/semconv/incubating/system_attributes.h +++ b/api/include/opentelemetry/semconv/incubating/system_attributes.h @@ -105,92 +105,47 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kSystemProcessesStatus = namespace SystemCpuStateValues { -/** - none - */ + static constexpr const char *kUser = "user"; -/** - none - */ static constexpr const char *kSystem = "system"; -/** - none - */ static constexpr const char *kNice = "nice"; -/** - none - */ static constexpr const char *kIdle = "idle"; -/** - none - */ static constexpr const char *kIowait = "iowait"; -/** - none - */ static constexpr const char *kInterrupt = "interrupt"; -/** - none - */ static constexpr const char *kSteal = "steal"; } // namespace SystemCpuStateValues namespace SystemFilesystemStateValues { -/** - none - */ + static constexpr const char *kUsed = "used"; -/** - none - */ static constexpr const char *kFree = "free"; -/** - none - */ static constexpr const char *kReserved = "reserved"; } // namespace SystemFilesystemStateValues namespace SystemFilesystemTypeValues { -/** - none - */ + static constexpr const char *kFat32 = "fat32"; -/** - none - */ static constexpr const char *kExfat = "exfat"; -/** - none - */ static constexpr const char *kNtfs = "ntfs"; -/** - none - */ static constexpr const char *kRefs = "refs"; -/** - none - */ static constexpr const char *kHfsplus = "hfsplus"; -/** - none - */ static constexpr const char *kExt4 = "ext4"; } // namespace SystemFilesystemTypeValues @@ -198,182 +153,103 @@ static constexpr const char *kExt4 = "ext4"; namespace SystemMemoryStateValues { /** - none + Actual used virtual memory in bytes. */ static constexpr const char *kUsed = "used"; -/** - none - */ static constexpr const char *kFree = "free"; /** - none + @deprecated + {"note": "Removed, report shared memory usage with @code metric.system.memory.shared @endcode + metric", "reason": "uncategorized"} */ -static constexpr const char *kShared = "shared"; +OPENTELEMETRY_DEPRECATED static constexpr const char *kShared = "shared"; -/** - none - */ static constexpr const char *kBuffers = "buffers"; -/** - none - */ static constexpr const char *kCached = "cached"; } // namespace SystemMemoryStateValues namespace SystemNetworkStateValues { -/** - none - */ + static constexpr const char *kClose = "close"; -/** - none - */ static constexpr const char *kCloseWait = "close_wait"; -/** - none - */ static constexpr const char *kClosing = "closing"; -/** - none - */ static constexpr const char *kDelete = "delete"; -/** - none - */ static constexpr const char *kEstablished = "established"; -/** - none - */ static constexpr const char *kFinWait1 = "fin_wait_1"; -/** - none - */ static constexpr const char *kFinWait2 = "fin_wait_2"; -/** - none - */ static constexpr const char *kLastAck = "last_ack"; -/** - none - */ static constexpr const char *kListen = "listen"; -/** - none - */ static constexpr const char *kSynRecv = "syn_recv"; -/** - none - */ static constexpr const char *kSynSent = "syn_sent"; -/** - none - */ static constexpr const char *kTimeWait = "time_wait"; } // namespace SystemNetworkStateValues namespace SystemPagingDirectionValues { -/** - none - */ + static constexpr const char *kIn = "in"; -/** - none - */ static constexpr const char *kOut = "out"; } // namespace SystemPagingDirectionValues namespace SystemPagingStateValues { -/** - none - */ + static constexpr const char *kUsed = "used"; -/** - none - */ static constexpr const char *kFree = "free"; } // namespace SystemPagingStateValues namespace SystemPagingTypeValues { -/** - none - */ + static constexpr const char *kMajor = "major"; -/** - none - */ static constexpr const char *kMinor = "minor"; } // namespace SystemPagingTypeValues namespace SystemProcessStatusValues { -/** - none - */ + static constexpr const char *kRunning = "running"; -/** - none - */ static constexpr const char *kSleeping = "sleeping"; -/** - none - */ static constexpr const char *kStopped = "stopped"; -/** - none - */ static constexpr const char *kDefunct = "defunct"; } // namespace SystemProcessStatusValues namespace SystemProcessesStatusValues { -/** - none - */ + static constexpr const char *kRunning = "running"; -/** - none - */ static constexpr const char *kSleeping = "sleeping"; -/** - none - */ static constexpr const char *kStopped = "stopped"; -/** - none - */ static constexpr const char *kDefunct = "defunct"; } // namespace SystemProcessesStatusValues diff --git a/api/include/opentelemetry/semconv/incubating/system_metrics.h b/api/include/opentelemetry/semconv/incubating/system_metrics.h index f905b73b6f..d0767b51a6 100644 --- a/api/include/opentelemetry/semconv/incubating/system_metrics.h +++ b/api/include/opentelemetry/semconv/incubating/system_metrics.h @@ -63,13 +63,13 @@ CreateAsyncDoubleMetricSystemCpuFrequency(metrics::Meter *meter) /** Reports the number of logical (virtual) processor cores created by the operating system to manage - multitasking

Calculated by multiplying the number of sockets by the number of cores per + multitasking.

Calculated by multiplying the number of sockets by the number of cores per socket, and then by the number of threads per core

updowncounter */ static constexpr const char *kMetricSystemCpuLogicalCount = "system.cpu.logical.count"; static constexpr const char *descrMetricSystemCpuLogicalCount = "Reports the number of logical (virtual) processor cores created by the operating system to " - "manage multitasking"; + "manage multitasking."; static constexpr const char *unitMetricSystemCpuLogicalCount = "{cpu}"; static inline nostd::unique_ptr> @@ -105,7 +105,7 @@ CreateAsyncDoubleMetricSystemCpuLogicalCount(metrics::Meter *meter) } /** - Reports the number of actual physical processor cores on the hardware + Reports the number of actual physical processor cores on the hardware.

Calculated by multiplying the number of sockets by the number of cores per socket

@@ -113,7 +113,7 @@ CreateAsyncDoubleMetricSystemCpuLogicalCount(metrics::Meter *meter) */ static constexpr const char *kMetricSystemCpuPhysicalCount = "system.cpu.physical.count"; static constexpr const char *descrMetricSystemCpuPhysicalCount = - "Reports the number of actual physical processor cores on the hardware"; + "Reports the number of actual physical processor cores on the hardware."; static constexpr const char *unitMetricSystemCpuPhysicalCount = "{cpu}"; static inline nostd::unique_ptr> @@ -149,13 +149,13 @@ CreateAsyncDoubleMetricSystemCpuPhysicalCount(metrics::Meter *meter) } /** - Seconds each logical CPU spent on each mode + Seconds each logical CPU spent on each mode.

counter */ static constexpr const char *kMetricSystemCpuTime = "system.cpu.time"; static constexpr const char *descrMetricSystemCpuTime = - "Seconds each logical CPU spent on each mode"; + "Seconds each logical CPU spent on each mode."; static constexpr const char *unitMetricSystemCpuTime = "s"; static inline nostd::unique_ptr> CreateSyncInt64MetricSystemCpuTime( @@ -228,10 +228,12 @@ CreateAsyncDoubleMetricSystemCpuUtilization(metrics::Meter *meter) } /** + TODO. +

counter */ static constexpr const char *kMetricSystemDiskIo = "system.disk.io"; -static constexpr const char *descrMetricSystemDiskIo = ""; +static constexpr const char *descrMetricSystemDiskIo = "TODO."; static constexpr const char *unitMetricSystemDiskIo = "By"; static inline nostd::unique_ptr> CreateSyncInt64MetricSystemDiskIo( @@ -263,7 +265,7 @@ static inline nostd::shared_ptr CreateAsyncDouble } /** - Time disk spent activated + Time disk spent activated.

The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as: