From 5da1d1e71c0bb6c2c23c71a2c94f9d73d94acf41 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 00:15:55 +0000 Subject: [PATCH 1/2] Update opentelemetry-semconv to 1.40.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8e1c7db54..a459815f9 100644 --- a/build.sbt +++ b/build.sbt @@ -79,7 +79,7 @@ val OpenTelemetryVersion = "1.59.0" val OpenTelemetryAlphaVersion = s"$OpenTelemetryVersion-alpha" val OpenTelemetryInstrumentationVersion = "2.25.0" val OpenTelemetryInstrumentationAlphaVersion = s"$OpenTelemetryInstrumentationVersion-alpha" -val OpenTelemetrySemConvVersion = "1.39.0" +val OpenTelemetrySemConvVersion = "1.40.0" val OpenTelemetrySemConvAlphaVersion = s"$OpenTelemetrySemConvVersion-alpha" val Otel4sAgentVersion = "2.22.0" val PekkoStreamVersion = "1.4.0" From 3ba0295e7fb71fae56e31da7b484e317a8513cac Mon Sep 17 00:00:00 2001 From: Maksym Ochenashko Date: Fri, 20 Feb 2026 18:05:27 +0200 Subject: [PATCH 2/2] Generate semantic conventions using 1.40.0 schema --- .../otel4s/metrics/SemanticMetrics.scala.j2 | 1 + .../attributes/DbExperimentalAttributes.scala | 5 +- .../ErrorExperimentalAttributes.scala | 4 + .../ExceptionExperimentalAttributes.scala | 3 + .../FeatureFlagExperimentalAttributes.scala | 10 +- .../GcpExperimentalAttributes.scala | 17 + .../GenAiExperimentalAttributes.scala | 39 + .../HttpExperimentalAttributes.scala | 16 +- .../K8sExperimentalAttributes.scala | 179 ++++ .../MessageExperimentalAttributes.scala | 18 +- .../OpenaiExperimentalAttributes.scala | 21 + .../OracleCloudExperimentalAttributes.scala | 33 + .../OracleExperimentalAttributes.scala | 74 ++ .../PprofExperimentalAttributes.scala | 18 + .../RpcExperimentalAttributes.scala | 10 +- .../ServiceExperimentalAttributes.scala | 41 + .../UrlExperimentalAttributes.scala | 19 +- .../metrics/DbExperimentalMetrics.scala | 6 + .../metrics/HttpExperimentalMetrics.scala | 120 ++- .../metrics/JvmExperimentalMetrics.scala | 36 + .../metrics/K8sExperimentalMetrics.scala | 179 +++- .../metrics/McpExperimentalMetrics.scala | 4 +- .../metrics/OtelExperimentalMetrics.scala | 2 +- .../metrics/RpcExperimentalMetrics.scala | 838 ++---------------- .../metrics/SystemExperimentalMetrics.scala | 49 +- .../typelevel/otel4s/semconv/Stability.scala | 2 + .../otel4s/semconv/metrics/DbMetrics.scala | 3 + .../otel4s/semconv/metrics/HttpMetrics.scala | 30 +- .../typelevel/otel4s/semconv/SchemaUrls.scala | 3 +- .../semconv/attributes/DbAttributes.scala | 5 +- .../attributes/ExceptionAttributes.scala | 3 + .../semconv/attributes/HttpAttributes.scala | 16 +- .../attributes/ServiceAttributes.scala | 38 + .../semconv/attributes/UrlAttributes.scala | 19 +- 34 files changed, 1013 insertions(+), 848 deletions(-) create mode 100644 semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleCloudExperimentalAttributes.scala create mode 100644 semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleExperimentalAttributes.scala diff --git a/buildscripts/semantic-convention/templates/registry/otel4s/metrics/SemanticMetrics.scala.j2 b/buildscripts/semantic-convention/templates/registry/otel4s/metrics/SemanticMetrics.scala.j2 index 9d247c292..ea1f74959 100644 --- a/buildscripts/semantic-convention/templates/registry/otel4s/metrics/SemanticMetrics.scala.j2 +++ b/buildscripts/semantic-convention/templates/registry/otel4s/metrics/SemanticMetrics.scala.j2 @@ -62,6 +62,7 @@ {%- elif type == "stable" -%} Stability.stable {%- elif type == "release_candidate" -%} Stability.releaseCandidate {%- elif type == "alpha" -%} Stability.alpha +{%- elif type == "beta" -%} Stability.beta {%- else -%} _unknown_stability_type_{{ type }} {%- endif -%} {%- endmacro -%} diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/DbExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/DbExperimentalAttributes.scala index 4f3bd374e..4b19aab76 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/DbExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/DbExperimentalAttributes.scala @@ -308,7 +308,10 @@ object DbExperimentalAttributes { * analyzing telemetry for database calls involving complex queries.

Summary may be available to the * instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating query summary section. + * href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query summary section.

+ * For batch operations, if the individual operations are known to have the same query summary then that query + * summary SHOULD be used prepended by `BATCH `, otherwise `db.query.summary` SHOULD be `BATCH` or some other + * database system specific term if more applicable. */ @deprecated( "use `org.typelevel.otel4s.semconv.attributes.DbAttributes.DbQuerySummary` instead.", diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ErrorExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ErrorExperimentalAttributes.scala index 1737cf492..5fcdf9536 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ErrorExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ErrorExperimentalAttributes.scala @@ -29,6 +29,10 @@ object ErrorExperimentalAttributes { * `exception.message` in `error.message`.

`error.message` is NOT RECOMMENDED for metrics or spans due to its * unbounded cardinality and overlap with span status. */ + @deprecated( + "Use domain-specific error message attribute. For example, use `feature_flag.error.message` for feature flag errors.", + "" + ) val ErrorMessage: AttributeKey[String] = AttributeKey("error.message") diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ExceptionExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ExceptionExperimentalAttributes.scala index 03f1ab48f..5ad8d4c19 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ExceptionExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ExceptionExperimentalAttributes.scala @@ -22,6 +22,9 @@ package experimental.attributes object ExceptionExperimentalAttributes { /** The exception message. + * + * @note + *

[!WARNING]

This attribute may contain sensitive information.

*/ @deprecated( "use `org.typelevel.otel4s.semconv.attributes.ExceptionAttributes.ExceptionMessage` instead.", diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/FeatureFlagExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/FeatureFlagExperimentalAttributes.scala index bfca62f66..3ff04976d 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/FeatureFlagExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/FeatureFlagExperimentalAttributes.scala @@ -26,9 +26,15 @@ object FeatureFlagExperimentalAttributes { val FeatureFlagContextId: AttributeKey[String] = AttributeKey("feature_flag.context.id") - /** Deprecated, use `error.message` instead. + /** A message providing more detail about an error that occurred during feature flag evaluation in human-readable + * form. */ - @deprecated("Replaced by `error.message`.", "") + val FeatureFlagErrorMessage: AttributeKey[String] = + AttributeKey("feature_flag.error.message") + + /** Deprecated, use `feature_flag.error.message` instead. + */ + @deprecated("Replaced by `feature_flag.error.message`.", "") val FeatureFlagEvaluationErrorMessage: AttributeKey[String] = AttributeKey("feature_flag.evaluation.error.message") diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GcpExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GcpExperimentalAttributes.scala index 225776a79..309966a5d 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GcpExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GcpExperimentalAttributes.scala @@ -168,6 +168,23 @@ object GcpExperimentalAttributes { val GcpGceInstanceName: AttributeKey[String] = AttributeKey("gcp.gce.instance.name") + /** The name of the Instance Group Manager (IGM) that manages this VM, if any. + */ + val GcpGceInstanceGroupManagerName: AttributeKey[String] = + AttributeKey("gcp.gce.instance_group_manager.name") + + /** The region of a regional Instance Group Manager (e.g., `us-central1`). Set this + * only when the IGM is regional. + */ + val GcpGceInstanceGroupManagerRegion: AttributeKey[String] = + AttributeKey("gcp.gce.instance_group_manager.region") + + /** The zone of a zonal Instance Group Manager (e.g., `us-central1-a`). Set this + * only when the IGM is zonal. + */ + val GcpGceInstanceGroupManagerZone: AttributeKey[String] = + AttributeKey("gcp.gce.instance_group_manager.zone") + /** Values for [[GcpApphubServiceCriticalityType]]. */ abstract class GcpApphubServiceCriticalityTypeValue(val value: String) diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GenAiExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GenAiExperimentalAttributes.scala index e939b0d3e..5ee9d287d 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GenAiExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/GenAiExperimentalAttributes.scala @@ -36,6 +36,11 @@ object GenAiExperimentalAttributes { val GenAiAgentName: AttributeKey[String] = AttributeKey("gen_ai.agent.name") + /** The version of the GenAI agent. + */ + val GenAiAgentVersion: AttributeKey[String] = + AttributeKey("gen_ai.agent.version") + /** Deprecated, use Event API to report completions contents. */ @deprecated("Removed, no replacement at this time.", "") @@ -245,6 +250,14 @@ object GenAiExperimentalAttributes { val GenAiResponseModel: AttributeKey[String] = AttributeKey("gen_ai.response.model") + /** The query text used for retrieval. + * + * @note + *
[!Warning] This attribute may contain sensitive information.
+ */ + val GenAiRetrievalQueryText: AttributeKey[String] = + AttributeKey("gen_ai.retrieval.query.text") + /** Deprecated, use `gen_ai.provider.name` instead. */ @deprecated("Replaced by `gen_ai.provider.name`.", "") @@ -284,6 +297,22 @@ object GenAiExperimentalAttributes { val GenAiToolType: AttributeKey[String] = AttributeKey("gen_ai.tool.type") + /** The number of input tokens written to a provider-managed cache. + * + * @note + *

The value SHOULD be included in `gen_ai.usage.input_tokens`. + */ + val GenAiUsageCacheCreationInputTokens: AttributeKey[Long] = + AttributeKey("gen_ai.usage.cache_creation.input_tokens") + + /** The number of input tokens served from a provider-managed cache. + * + * @note + *

The value SHOULD be included in `gen_ai.usage.input_tokens`. + */ + val GenAiUsageCacheReadInputTokens: AttributeKey[Long] = + AttributeKey("gen_ai.usage.cache_read.input_tokens") + /** Deprecated, use `gen_ai.usage.output_tokens` instead. */ @deprecated("Replaced by `gen_ai.usage.output_tokens`.", "") @@ -291,6 +320,11 @@ object GenAiExperimentalAttributes { AttributeKey("gen_ai.usage.completion_tokens") /** The number of tokens used in the GenAI input (prompt). + * + * @note + *

This value SHOULD include all types of input tokens, including cached tokens. Instrumentations SHOULD make a + * best effort to populate this value, using a total provided by the provider when available or, depending on the + * provider API, by summing different token types parsed from the provider output. */ val GenAiUsageInputTokens: AttributeKey[Long] = AttributeKey("gen_ai.usage.input_tokens") @@ -372,6 +406,11 @@ object GenAiExperimentalAttributes { */ case object Embeddings extends GenAiOperationNameValue("embeddings") + /** Retrieval operation such as OpenAI + * Search Vector Store API + */ + case object Retrieval extends GenAiOperationNameValue("retrieval") + /** Create GenAI agent */ case object CreateAgent extends GenAiOperationNameValue("create_agent") diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/HttpExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/HttpExperimentalAttributes.scala index f07c59e04..e1988bc68 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/HttpExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/HttpExperimentalAttributes.scala @@ -96,12 +96,16 @@ object HttpExperimentalAttributes { * to `_OTHER`.

If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, * then it MUST provide a way to override the list of known HTTP methods. If this override is done via environment * variable, then the environment variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a - * comma-separated list of case-sensitive known HTTP methods (this list MUST be a full override of the default - * known method, it is not a list of known methods in addition to the defaults).

HTTP method names are - * case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly. - * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate - * a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the - * original value. + * comma-separated list of case-sensitive known HTTP methods.

+ * + * If this override is done via declarative configuration, then the list MUST be configurable via the `known_methods` + * property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`.

+ * In either case, this list MUST be a full override of the default known methods, it is not a list of known methods + * in addition to the defaults.

HTTP method names are case-sensitive and `http.request.method` attribute value + * MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP + * methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST + * also set `http.request.method_original` to the original value. */ @deprecated( "use `org.typelevel.otel4s.semconv.attributes.HttpAttributes.HttpRequestMethod` instead.", diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/K8sExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/K8sExperimentalAttributes.scala index f5376c999..514269ab7 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/K8sExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/K8sExperimentalAttributes.scala @@ -489,6 +489,122 @@ object K8sExperimentalAttributes { val K8sResourcequotaUid: AttributeKey[String] = AttributeKey("k8s.resourcequota.uid") + /** The annotation placed on the Service, the `` being the annotation name, the value being the annotation value, + * even if the value is empty. + * + * @note + *

Examples:

+ */ + val K8sServiceAnnotation: AttributeKey[String] = + AttributeKey("k8s.service.annotation") + + /** The address type of the service endpoint. + * + * @note + *

The network address family or type of the endpoint. This attribute aligns with the `addressType` field of + * the K8s + * EndpointSlice. It is used to differentiate metrics when a Service is backed by multiple address types (e.g., + * in dual-stack clusters). + */ + val K8sServiceEndpointAddressType: AttributeKey[String] = + AttributeKey("k8s.service.endpoint.address_type") + + /** The condition of the service endpoint. + * + * @note + *

The current operational condition of the service endpoint. An endpoint can have multiple conditions set at + * once (e.g., both `serving` and `terminating` during rollout). This attribute aligns with the condition fields in + * the K8s + * EndpointSlice. + */ + val K8sServiceEndpointCondition: AttributeKey[String] = + AttributeKey("k8s.service.endpoint.condition") + + /** The zone of the service endpoint. + * + * @note + *

The zone where the endpoint is located, typically corresponding to a failure domain. This attribute aligns + * with the `zone` field of endpoints in the K8s + * EndpointSlice. It enables zone-aware monitoring of service endpoint distribution and supports features like + * Topology Aware + * Routing.

If the zone is not populated (e.g., nodes without the `topology.kubernetes.io/zone` label), the + * attribute value will be an empty string. + */ + val K8sServiceEndpointZone: AttributeKey[String] = + AttributeKey("k8s.service.endpoint.zone") + + /** The label placed on the Service, the `` being the label name, the value being the label value, even if the + * value is empty. + * + * @note + *

Examples:

+ */ + val K8sServiceLabel: AttributeKey[String] = + AttributeKey("k8s.service.label") + + /** The name of the Service. + */ + val K8sServiceName: AttributeKey[String] = + AttributeKey("k8s.service.name") + + /** Whether the Service publishes not-ready endpoints. + * + * @note + *

Whether the Service is configured to publish endpoints before the pods are ready. This attribute is + * typically used to indicate that a Service (such as a headless Service for a StatefulSet) allows peer discovery + * before pods pass their readiness probes. It aligns with the `publishNotReadyAddresses` field of the K8s + * ServiceSpec. + */ + val K8sServicePublishNotReadyAddresses: AttributeKey[Boolean] = + AttributeKey("k8s.service.publish_not_ready_addresses") + + /** The selector key-value pair placed on the Service, the `` being the selector key, the value being the + * selector value. + * + * @note + *

These selectors are used to correlate with pod labels. Each selector key-value pair becomes a separate + * attribute.

Examples:

+ */ + val K8sServiceSelector: AttributeKey[String] = + AttributeKey("k8s.service.selector") + + /** The traffic distribution policy for the Service. + * + * @note + *

Specifies how traffic is distributed to endpoints for this Service. This attribute aligns with the + * `trafficDistribution` field of the K8s ServiceSpec. + * Known values include `PreferSameZone` (prefer endpoints in the same zone as the client) and `PreferSameNode` + * (prefer endpoints on the same node, fallback to same zone, then cluster-wide). If this field is not set on the + * Service, the attribute SHOULD NOT be emitted. When not set, Kubernetes distributes traffic evenly across all + * endpoints cluster-wide. + */ + val K8sServiceTrafficDistribution: AttributeKey[String] = + AttributeKey("k8s.service.traffic_distribution") + + /** The type of the Kubernetes Service. + * + * @note + *

This attribute aligns with the `type` field of the K8s + * ServiceSpec. + */ + val K8sServiceType: AttributeKey[String] = + AttributeKey("k8s.service.type") + + /** The UID of the Service. + */ + val K8sServiceUid: AttributeKey[String] = + AttributeKey("k8s.service.uid") + /** The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation * value, even if the value is empty. * @@ -725,6 +841,69 @@ object K8sExperimentalAttributes { case object UnexpectedAdmissionError extends K8sPodStatusReasonValue("UnexpectedAdmissionError") } + /** Values for [[K8sServiceEndpointAddressType]]. + */ + abstract class K8sServiceEndpointAddressTypeValue(val value: String) + object K8sServiceEndpointAddressTypeValue { + implicit val attributeFromK8sServiceEndpointAddressTypeValue + : Attribute.From[K8sServiceEndpointAddressTypeValue, String] = _.value + + /** IPv4 address type + */ + case object Ipv4 extends K8sServiceEndpointAddressTypeValue("IPv4") + + /** IPv6 address type + */ + case object Ipv6 extends K8sServiceEndpointAddressTypeValue("IPv6") + + /** FQDN address type + */ + case object Fqdn extends K8sServiceEndpointAddressTypeValue("FQDN") + } + + /** Values for [[K8sServiceEndpointCondition]]. + */ + abstract class K8sServiceEndpointConditionValue(val value: String) + object K8sServiceEndpointConditionValue { + implicit val attributeFromK8sServiceEndpointConditionValue + : Attribute.From[K8sServiceEndpointConditionValue, String] = _.value + + /** The endpoint is ready to receive new connections. + */ + case object Ready extends K8sServiceEndpointConditionValue("ready") + + /** The endpoint is currently handling traffic. + */ + case object Serving extends K8sServiceEndpointConditionValue("serving") + + /** The endpoint is in the process of shutting down. + */ + case object Terminating extends K8sServiceEndpointConditionValue("terminating") + } + + /** Values for [[K8sServiceType]]. + */ + abstract class K8sServiceTypeValue(val value: String) + object K8sServiceTypeValue { + implicit val attributeFromK8sServiceTypeValue: Attribute.From[K8sServiceTypeValue, String] = _.value + + /** ClusterIP service type + */ + case object ClusterIp extends K8sServiceTypeValue("ClusterIP") + + /** NodePort service type + */ + case object NodePort extends K8sServiceTypeValue("NodePort") + + /** LoadBalancer service type + */ + case object LoadBalancer extends K8sServiceTypeValue("LoadBalancer") + + /** ExternalName service type + */ + case object ExternalName extends K8sServiceTypeValue("ExternalName") + } + /** Values for [[K8sVolumeType]]. */ abstract class K8sVolumeTypeValue(val value: String) diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/MessageExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/MessageExperimentalAttributes.scala index 4e74f0cb1..c78a904d3 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/MessageExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/MessageExperimentalAttributes.scala @@ -21,33 +21,33 @@ package experimental.attributes // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 object MessageExperimentalAttributes { - /** Deprecated, use `rpc.message.compressed_size` instead. + /** Deprecated, no replacement at this time. */ - @deprecated("Replaced by `rpc.message.compressed_size`.", "") + @deprecated("Deprecated, no replacement at this time.", "") val MessageCompressedSize: AttributeKey[Long] = AttributeKey("message.compressed_size") - /** Deprecated, use `rpc.message.id` instead. + /** Deprecated, no replacement at this time. */ - @deprecated("Replaced by `rpc.message.id`.", "") + @deprecated("Deprecated, no replacement at this time.", "") val MessageId: AttributeKey[Long] = AttributeKey("message.id") - /** Deprecated, use `rpc.message.type` instead. + /** Deprecated, no replacement at this time. */ - @deprecated("Replaced by `rpc.message.type`.", "") + @deprecated("Deprecated, no replacement at this time.", "") val MessageType: AttributeKey[String] = AttributeKey("message.type") - /** Deprecated, use `rpc.message.uncompressed_size` instead. + /** Deprecated, no replacement at this time. */ - @deprecated("Replaced by `rpc.message.uncompressed_size`.", "") + @deprecated("Deprecated, no replacement at this time.", "") val MessageUncompressedSize: AttributeKey[Long] = AttributeKey("message.uncompressed_size") /** Values for [[MessageType]]. */ - @deprecated("Replaced by `rpc.message.type`.", "") + @deprecated("Deprecated, no replacement at this time.", "") abstract class MessageTypeValue(val value: String) @annotation.nowarn("cat=deprecation") object MessageTypeValue { diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OpenaiExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OpenaiExperimentalAttributes.scala index 8a04b8776..9e13203fb 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OpenaiExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OpenaiExperimentalAttributes.scala @@ -21,6 +21,11 @@ package experimental.attributes // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 object OpenaiExperimentalAttributes { + /** The type of OpenAI API being used. + */ + val OpenaiApiType: AttributeKey[String] = + AttributeKey("openai.api.type") + /** The service tier requested. May be a specific tier, default, or auto. */ val OpenaiRequestServiceTier: AttributeKey[String] = @@ -36,6 +41,22 @@ object OpenaiExperimentalAttributes { val OpenaiResponseSystemFingerprint: AttributeKey[String] = AttributeKey("openai.response.system_fingerprint") + /** Values for [[OpenaiApiType]]. + */ + abstract class OpenaiApiTypeValue(val value: String) + object OpenaiApiTypeValue { + implicit val attributeFromOpenaiApiTypeValue: Attribute.From[OpenaiApiTypeValue, String] = _.value + + /** The OpenAI Chat Completions + * API. + */ + case object ChatCompletions extends OpenaiApiTypeValue("chat_completions") + + /** The OpenAI Responses API. + */ + case object Responses extends OpenaiApiTypeValue("responses") + } + /** Values for [[OpenaiRequestServiceTier]]. */ abstract class OpenaiRequestServiceTierValue(val value: String) diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleCloudExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleCloudExperimentalAttributes.scala new file mode 100644 index 000000000..66fe913a6 --- /dev/null +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleCloudExperimentalAttributes.scala @@ -0,0 +1,33 @@ +/* + * Copyright 2023 Typelevel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.typelevel.otel4s +package semconv +package experimental.attributes + +// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 +object OracleCloudExperimentalAttributes { + + /** The OCI realm identifier that indicates the isolated partition in which the tenancy and its resources reside. + * + * @note + *

See OCI documentation on + * realms + */ + val OracleCloudRealm: AttributeKey[String] = + AttributeKey("oracle_cloud.realm") + +} diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleExperimentalAttributes.scala new file mode 100644 index 000000000..30e1e463c --- /dev/null +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/OracleExperimentalAttributes.scala @@ -0,0 +1,74 @@ +/* + * Copyright 2023 Typelevel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.typelevel.otel4s +package semconv +package experimental.attributes + +// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 +object OracleExperimentalAttributes { + + /** The database domain associated with the connection. + * + * @note + *

This attribute SHOULD be set to the value of the `DB_DOMAIN` initialization parameter, as exposed in + * `v$$parameter`. `DB_DOMAIN` defines the domain portion of the global database name and SHOULD be configured when + * a database is, or may become, part of a distributed environment. Its value consists of one or more valid + * identifiers (alphanumeric ASCII characters) separated by periods. + */ + val OracleDbDomain: AttributeKey[String] = + AttributeKey("oracle.db.domain") + + /** The instance name associated with the connection in an Oracle Real Application Clusters environment. + * + * @note + *

There can be multiple instances associated with a single database service. It indicates the unique instance + * name to which the connection is currently bound. For non-RAC databases, this value defaults to the + * `oracle.db.name`. + */ + val OracleDbInstanceName: AttributeKey[String] = + AttributeKey("oracle.db.instance.name") + + /** The database name associated with the connection. + * + * @note + *

This attribute SHOULD be set to the value of the parameter `DB_NAME` exposed in `v$$parameter`. + */ + val OracleDbName: AttributeKey[String] = + AttributeKey("oracle.db.name") + + /** The pluggable database (PDB) name associated with the connection. + * + * @note + *

This attribute SHOULD reflect the PDB that the session is currently connected to. If instrumentation cannot + * reliably obtain the active PDB name for each operation without issuing an additional query (such as + * `SELECT SYS_CONTEXT`), it is RECOMMENDED to fall back to the PDB name specified at connection establishment. + */ + val OracleDbPdb: AttributeKey[String] = + AttributeKey("oracle.db.pdb") + + /** The service name currently associated with the database connection. + * + * @note + *

The effective service name for a connection can change during its lifetime, for example after executing sql, + * `ALTER SESSION`. If an instrumentation cannot reliably obtain the current service name for each operation + * without issuing an additional query (such as `SELECT SYS_CONTEXT`), it is RECOMMENDED to fall back to the + * service name originally provided at connection establishment. + */ + val OracleDbService: AttributeKey[String] = + AttributeKey("oracle.db.service") + +} diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/PprofExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/PprofExperimentalAttributes.scala index fa7d41f77..324d5cbdf 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/PprofExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/PprofExperimentalAttributes.scala @@ -73,4 +73,22 @@ object PprofExperimentalAttributes { val PprofProfileKeepFrames: AttributeKey[String] = AttributeKey("pprof.profile.keep_frames") + /** Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing. + * + * @note + *

This attribute, if present, MUST be set at the scope level + * (resource_profiles[].scope_profiles[].scope.attributes[]). + */ + val PprofScopeDefaultSampleType: AttributeKey[String] = + AttributeKey("pprof.scope.default_sample_type") + + /** Records the indexes of the sample types in the original profile. + * + * @note + *

This attribute, if present, MUST be set at the scope level + * (resource_profiles[].scope_profiles[].scope.attributes[]). + */ + val PprofScopeSampleTypeOrder: AttributeKey[Seq[Long]] = + AttributeKey("pprof.scope.sample_type_order") + } diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/RpcExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/RpcExperimentalAttributes.scala index 378f57049..64fc55608 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/RpcExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/RpcExperimentalAttributes.scala @@ -63,9 +63,9 @@ object RpcExperimentalAttributes { val RpcJsonrpcErrorCode: AttributeKey[Long] = AttributeKey("rpc.jsonrpc.error_code") - /** Deprecated, use span status description or `error.message` attribute on other signals. + /** Deprecated, use the span status description when reporting JSON-RPC spans. */ - @deprecated("Use the span status description or `error.message` attribute on other signals.", "") + @deprecated("Use the span status description when reporting JSON-RPC spans.", "") val RpcJsonrpcErrorMessage: AttributeKey[String] = AttributeKey("rpc.jsonrpc.error_message") @@ -83,6 +83,7 @@ object RpcExperimentalAttributes { /** Compressed size of the message in bytes. */ + @deprecated("Deprecated, no replacement at this time.", "") val RpcMessageCompressedSize: AttributeKey[Long] = AttributeKey("rpc.message.compressed_size") @@ -91,16 +92,19 @@ object RpcExperimentalAttributes { * @note *

This way we guarantee that the values will be consistent between different implementations. */ + @deprecated("Deprecated, no replacement at this time.", "") val RpcMessageId: AttributeKey[Long] = AttributeKey("rpc.message.id") /** Whether this is a received or sent message. */ + @deprecated("Deprecated, no replacement at this time.", "") val RpcMessageType: AttributeKey[String] = AttributeKey("rpc.message.type") /** Uncompressed size of the message in bytes. */ + @deprecated("Deprecated, no replacement at this time.", "") val RpcMessageUncompressedSize: AttributeKey[Long] = AttributeKey("rpc.message.uncompressed_size") @@ -336,7 +340,9 @@ object RpcExperimentalAttributes { /** Values for [[RpcMessageType]]. */ + @deprecated("Deprecated, no replacement at this time.", "") abstract class RpcMessageTypeValue(val value: String) + @annotation.nowarn("cat=deprecation") object RpcMessageTypeValue { implicit val attributeFromRpcMessageTypeValue: Attribute.From[RpcMessageTypeValue, String] = _.value diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ServiceExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ServiceExperimentalAttributes.scala index 2e363df84..28dd1ddc9 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ServiceExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/ServiceExperimentalAttributes.scala @@ -21,6 +21,16 @@ package experimental.attributes // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 object ServiceExperimentalAttributes { + /** The operational criticality of the service. + * + * @note + *

Application developers are encouraged to set `service.criticality` to express the operational importance of + * their services. Telemetry consumers MAY use this attribute to optimize telemetry collection or improve user + * experience. + */ + val ServiceCriticality: AttributeKey[String] = + AttributeKey("service.criticality") + /** The string ID of the service instance. * * @note @@ -44,6 +54,10 @@ object ServiceExperimentalAttributes { * Collectors can set the `service.instance.id` if they can unambiguously determine the service instance for that * telemetry. This is typically the case for scraping receivers, as they know the target address and port. */ + @deprecated( + "use `org.typelevel.otel4s.semconv.attributes.ServiceAttributes.ServiceInstanceId` instead.", + "" + ) val ServiceInstanceId: AttributeKey[String] = AttributeKey("service.instance.id") @@ -71,6 +85,10 @@ object ServiceExperimentalAttributes { * services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid * namespace). Zero-length namespace string is assumed equal to unspecified namespace. */ + @deprecated( + "use `org.typelevel.otel4s.semconv.attributes.ServiceAttributes.ServiceNamespace` instead.", + "" + ) val ServiceNamespace: AttributeKey[String] = AttributeKey("service.namespace") @@ -95,4 +113,27 @@ object ServiceExperimentalAttributes { val ServiceVersion: AttributeKey[String] = AttributeKey("service.version") + /** Values for [[ServiceCriticality]]. + */ + abstract class ServiceCriticalityValue(val value: String) + object ServiceCriticalityValue { + implicit val attributeFromServiceCriticalityValue: Attribute.From[ServiceCriticalityValue, String] = _.value + + /** Service is business-critical; downtime directly impacts revenue, user experience, or core functionality. + */ + case object Critical extends ServiceCriticalityValue("critical") + + /** Service is important but has degradation tolerance or fallback mechanisms. + */ + case object High extends ServiceCriticalityValue("high") + + /** Service provides supplementary functionality; degradation has limited user impact. + */ + case object Medium extends ServiceCriticalityValue("medium") + + /** Service is non-essential to core operations; used for background tasks or internal tools. + */ + case object Low extends ServiceCriticalityValue("low") + } + } diff --git a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/UrlExperimentalAttributes.scala b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/UrlExperimentalAttributes.scala index 4fc08c13f..7aa03be8c 100644 --- a/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/UrlExperimentalAttributes.scala +++ b/semconv/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/attributes/UrlExperimentalAttributes.scala @@ -69,8 +69,15 @@ object UrlExperimentalAttributes { * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth">`Signature` *

  • `sig`
  • `X-Goog-Signature`

    This list - * is subject to change over time.

    When a query string value is redacted, the query string key SHOULD still be - * preserved, e.g. `https://www.example.com/path?color=blue&sig=REDACTED`. + * is subject to change over time.

    Matching of query parameter keys against the sensitive list SHOULD be + * case-sensitive.

    + * + * Instrumentation MAY provide a way to override this list via declarative configuration. If so, it SHOULD use the + * `sensitive_query_parameters` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.sanitization.url`. This list is a full override of the default sensitive + * query parameter keys, it is not a list of keys in addition to the defaults.

    When a query string value is + * redacted, the query string key SHOULD still be preserved, e.g. + * `https://www.example.com/path?color=blue&sig=REDACTED`. */ @deprecated( "use `org.typelevel.otel4s.semconv.attributes.UrlAttributes.UrlFull` instead.", @@ -119,8 +126,12 @@ object UrlExperimentalAttributes { * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth">`Signature` *

  • `sig`
  • `X-Goog-Signature`

    This list - * is subject to change over time.

    When a query string value is redacted, the query string key SHOULD still be - * preserved, e.g. `q=OpenTelemetry&sig=REDACTED`. + * is subject to change over time.

    Matching of query parameter keys against the sensitive list SHOULD be + * case-sensitive.

    Instrumentation MAY provide a way to override this list via declarative configuration. If so, + * it SHOULD use the `sensitive_query_parameters` property (an array of case-sensitive strings with minimum items 0) + * under `.instrumentation/development.general.sanitization.url`. This list is a full override of the default + * sensitive query parameter keys, it is not a list of keys in addition to the defaults.

    When a query string + * value is redacted, the query string key SHOULD still be preserved, e.g. `q=OpenTelemetry&sig=REDACTED`. */ @deprecated( "use `org.typelevel.otel4s.semconv.attributes.UrlAttributes.UrlQuery` instead.", diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/DbExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/DbExperimentalMetrics.scala index 27c4a3887..934577dfa 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/DbExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/DbExperimentalMetrics.scala @@ -1349,6 +1349,9 @@ object DbExperimentalMetrics { * instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating query summary section. + *

    For batch operations, if the individual operations are known to have the same query summary then that + * query summary SHOULD be used prepended by `BATCH `, otherwise `db.query.summary` SHOULD be `BATCH` or some + * other database system specific term if more applicable. */ val dbQuerySummary: AttributeSpec[String] = AttributeSpec( @@ -1647,6 +1650,9 @@ object DbExperimentalMetrics { * instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating query summary section. + *

    For batch operations, if the individual operations are known to have the same query summary then that + * query summary SHOULD be used prepended by `BATCH `, otherwise `db.query.summary` SHOULD be `BATCH` or some + * other database system specific term if more applicable. */ val dbQuerySummary: AttributeSpec[String] = AttributeSpec( diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/HttpExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/HttpExperimentalMetrics.scala index 9afd387c8..1a8d73532 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/HttpExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/HttpExperimentalMetrics.scala @@ -66,11 +66,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -508,11 +513,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -727,11 +737,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -951,11 +966,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -1141,11 +1161,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -1306,11 +1331,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -1555,11 +1585,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -1809,11 +1844,16 @@ object HttpExperimentalMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/JvmExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/JvmExperimentalMetrics.scala index be506ee8d..29e7a09c4 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/JvmExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/JvmExperimentalMetrics.scala @@ -40,6 +40,7 @@ object JvmExperimentalMetrics { CpuRecentUtilization, CpuTime, FileDescriptorCount, + FileDescriptorLimit, GcDuration, MemoryCommitted, MemoryInit, @@ -548,6 +549,41 @@ object JvmExperimentalMetrics { } + /** Measure of max open file descriptors as reported by the JVM. + */ + object FileDescriptorLimit extends MetricSpec.Unsealed { + + val name: String = "jvm.file_descriptor.limit" + val description: String = "Measure of max open file descriptors as reported by the JVM." + val unit: String = "{file_descriptor}" + val stability: Stability = Stability.development + val attributeSpecs: List[AttributeSpec[_]] = Nil + + def create[F[_]: Meter, A: MeasurementValue]: F[UpDownCounter[F, A]] = + Meter[F] + .upDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .create + + def createObserver[F[_]: Meter, A: MeasurementValue]: F[ObservableMeasurement[F, A]] = + Meter[F] + .observableUpDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .createObserver + + def createWithCallback[F[_]: Meter, A: MeasurementValue]( + callback: ObservableMeasurement[F, A] => F[Unit] + ): Resource[F, ObservableUpDownCounter] = + Meter[F] + .observableUpDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .createWithCallback(callback) + + } + /** Duration of JVM garbage collection actions. */ @deprecated("Use stable `org.typelevel.otel4s.semconv.metrics.JvmMetrics.GcDuration` instead.", "") diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/K8sExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/K8sExperimentalMetrics.scala index afaaf6aeb..d5bfb33fa 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/K8sExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/K8sExperimentalMetrics.scala @@ -149,6 +149,8 @@ object K8sExperimentalMetrics { ResourcequotaPersistentvolumeclaimCountUsed, ResourcequotaStorageRequestHard, ResourcequotaStorageRequestUsed, + ServiceEndpointCount, + ServiceLoadBalancerIngressCount, StatefulsetCurrentPods, StatefulsetDesiredPods, StatefulsetPodCurrent, @@ -1488,7 +1490,7 @@ object K8sExperimentalMetrics { "redis", ), Requirement.conditionallyRequired("if and only if k8s.hpa.metric.type is ContainerResource."), - Stability.alpha + Stability.beta ) /** The type of metric source for the horizontal pod autoscaler. @@ -1569,7 +1571,7 @@ object K8sExperimentalMetrics { "redis", ), Requirement.conditionallyRequired("if and only if k8s.hpa.metric.type is ContainerResource"), - Stability.alpha + Stability.beta ) /** The type of metric source for the horizontal pod autoscaler. @@ -1650,7 +1652,7 @@ object K8sExperimentalMetrics { "redis", ), Requirement.conditionallyRequired("if and only if k8s.hpa.metric.type is ContainerResource"), - Stability.alpha + Stability.beta ) /** The type of metric source for the horizontal pod autoscaler. @@ -5884,6 +5886,177 @@ object K8sExperimentalMetrics { } + /** Number of endpoints for a service by condition and address type. + * + * @note + *

    This metric is derived from the Kubernetes EndpointSlice + * API. It reports the number of network endpoints backing a Service, broken down by their condition and + * address type.

    In dual-stack or multi-protocol clusters, separate counts are reported for each address family + * (`IPv4`, `IPv6`, `FQDN`).

    When the optional `zone` attribute is enabled, counts are further broken down by + * availability zone for zone-aware monitoring.

    An endpoint may be reported under multiple conditions + * simultaneously (e.g., both `serving` and `terminating` during a graceful shutdown). See K8s + * EndpointConditions for more details.

    The conditions represent:

    For Services with + * `publishNotReadyAddresses` enabled (common for headless StatefulSets), this metric will include endpoints that + * are published despite not being ready. The `k8s.service.publish_not_ready_addresses` resource attribute + * indicates this setting. + */ + object ServiceEndpointCount extends MetricSpec.Unsealed { + + val name: String = "k8s.service.endpoint.count" + val description: String = "Number of endpoints for a service by condition and address type." + val unit: String = "{endpoint}" + val stability: Stability = Stability.development + val attributeSpecs: List[AttributeSpec[_]] = AttributeSpecs.specs + + object AttributeSpecs { + + /** The address type of the service endpoint. + * + * @note + *

    The network address family or type of the endpoint. This attribute aligns with the `addressType` field + * of the K8s + * EndpointSlice. It is used to differentiate metrics when a Service is backed by multiple address types + * (e.g., in dual-stack clusters). + */ + val k8sServiceEndpointAddressType: AttributeSpec[String] = + AttributeSpec( + K8sExperimentalAttributes.K8sServiceEndpointAddressType, + List( + "IPv4", + "IPv6", + ), + Requirement.required, + Stability.development + ) + + /** The condition of the service endpoint. + * + * @note + *

    The current operational condition of the service endpoint. An endpoint can have multiple conditions set + * at once (e.g., both `serving` and `terminating` during rollout). This attribute aligns with the condition + * fields in the K8s + * EndpointSlice. + */ + val k8sServiceEndpointCondition: AttributeSpec[String] = + AttributeSpec( + K8sExperimentalAttributes.K8sServiceEndpointCondition, + List( + "ready", + "serving", + "terminating", + ), + Requirement.required, + Stability.development + ) + + /** The zone of the service endpoint. + * + * @note + *

    The zone where the endpoint is located, typically corresponding to a failure domain. This attribute + * aligns with the `zone` field of endpoints in the K8s + * EndpointSlice. It enables zone-aware monitoring of service endpoint distribution and supports features + * like Topology + * Aware Routing.

    If the zone is not populated (e.g., nodes without the `topology.kubernetes.io/zone` + * label), the attribute value will be an empty string. + */ + val k8sServiceEndpointZone: AttributeSpec[String] = + AttributeSpec( + K8sExperimentalAttributes.K8sServiceEndpointZone, + List( + "us-east-1a", + "us-west-2b", + "zone-a", + "", + ), + Requirement.recommended, + Stability.development + ) + + val specs: List[AttributeSpec[_]] = + List( + k8sServiceEndpointAddressType, + k8sServiceEndpointCondition, + k8sServiceEndpointZone, + ) + } + + def create[F[_]: Meter, A: MeasurementValue]: F[Gauge[F, A]] = + Meter[F] + .gauge[A](name) + .withDescription(description) + .withUnit(unit) + .create + + def createObserver[F[_]: Meter, A: MeasurementValue]: F[ObservableMeasurement[F, A]] = + Meter[F] + .observableGauge[A](name) + .withDescription(description) + .withUnit(unit) + .createObserver + + def createWithCallback[F[_]: Meter, A: MeasurementValue]( + callback: ObservableMeasurement[F, A] => F[Unit] + ): Resource[F, ObservableGauge] = + Meter[F] + .observableGauge[A](name) + .withDescription(description) + .withUnit(unit) + .createWithCallback(callback) + + } + + /** Number of load balancer ingress points (external IPs/hostnames) assigned to the service. + * + * @note + *

    This metric reports the number of external ingress points (IP addresses or hostnames) assigned to a + * LoadBalancer Service.

    It is only emitted for Services of type `LoadBalancer` and reflects the assignments + * made by the underlying infrastructure's load balancer controller in the .status.loadBalancer.ingress + * field.

    A value of `0` indicates that no ingress points have been assigned yet (e.g., during provisioning). A + * value greater than `1` may occur when multiple IPs or hostnames are assigned (e.g., dual-stack configurations). + *

    This metric signals that external endpoints have been assigned by the load balancer controller, but it does + * not guarantee that the load balancer is healthy. + */ + object ServiceLoadBalancerIngressCount extends MetricSpec.Unsealed { + + val name: String = "k8s.service.load_balancer.ingress.count" + val description: String = "Number of load balancer ingress points (external IPs/hostnames) assigned to the service." + val unit: String = "{ingress}" + val stability: Stability = Stability.development + val attributeSpecs: List[AttributeSpec[_]] = Nil + + def create[F[_]: Meter, A: MeasurementValue]: F[Gauge[F, A]] = + Meter[F] + .gauge[A](name) + .withDescription(description) + .withUnit(unit) + .create + + def createObserver[F[_]: Meter, A: MeasurementValue]: F[ObservableMeasurement[F, A]] = + Meter[F] + .observableGauge[A](name) + .withDescription(description) + .withUnit(unit) + .createObserver + + def createWithCallback[F[_]: Meter, A: MeasurementValue]( + callback: ObservableMeasurement[F, A] => F[Unit] + ): Resource[F, ObservableGauge] = + Meter[F] + .observableGauge[A](name) + .withDescription(description) + .withUnit(unit) + .createWithCallback(callback) + + } + /** Deprecated, use `k8s.statefulset.pod.current` instead. * * @note diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/McpExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/McpExperimentalMetrics.scala index bc5747191..ad3385d47 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/McpExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/McpExperimentalMetrics.scala @@ -229,7 +229,7 @@ object McpExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("If response contains an error code."), - Stability.development + Stability.releaseCandidate ) /** Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. @@ -664,7 +664,7 @@ object McpExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("If response contains an error code."), - Stability.development + Stability.releaseCandidate ) val specs: List[AttributeSpec[_]] = diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/OtelExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/OtelExperimentalMetrics.scala index 681637e40..69105a1ad 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/OtelExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/OtelExperimentalMetrics.scala @@ -755,7 +755,7 @@ object OtelExperimentalMetrics { "-32602", ), Requirement.recommended("when applicable"), - Stability.development + Stability.releaseCandidate ) /** Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/RpcExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/RpcExperimentalMetrics.scala index 7313661e6..5fc387836 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/RpcExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/RpcExperimentalMetrics.scala @@ -42,7 +42,7 @@ object RpcExperimentalMetrics { ServerResponsesPerRpc, ) - /** Measures the duration of outbound remote procedure calls (RPC). + /** Measures the duration of an outgoing Remote Procedure Call (RPC). * * @note *

    When this metric is reported alongside an RPC client span, the metric value SHOULD be the same as the RPC @@ -51,9 +51,9 @@ object RpcExperimentalMetrics { object ClientCallDuration extends MetricSpec.Unsealed { val name: String = "rpc.client.call.duration" - val description: String = "Measures the duration of outbound remote procedure calls (RPC)." + val description: String = "Measures the duration of an outgoing Remote Procedure Call (RPC)." val unit: String = "s" - val stability: Stability = Stability.development + val stability: Stability = Stability.releaseCandidate val attributeSpecs: List[AttributeSpec[_]] = AttributeSpecs.specs object AttributeSpecs { @@ -81,58 +81,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -158,7 +106,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -178,7 +126,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -194,15 +142,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -230,18 +179,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -301,58 +245,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -378,7 +270,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -398,7 +290,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -414,15 +306,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -450,18 +343,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -485,6 +373,7 @@ object RpcExperimentalMetrics { * @note *

    Streaming: Recorded per message in a streaming batch */ + @deprecated("Removed, no replacement at this time.", "") object ClientRequestSize extends MetricSpec.Unsealed { val name: String = "rpc.client.request.size" @@ -518,58 +407,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -595,7 +432,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -615,7 +452,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -631,15 +468,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -667,18 +505,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -737,58 +570,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -814,7 +595,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -834,7 +615,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -850,15 +631,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -886,18 +668,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -921,6 +698,7 @@ object RpcExperimentalMetrics { * @note *

    Streaming: Recorded per response in a streaming batch */ + @deprecated("Removed, no replacement at this time.", "") object ClientResponseSize extends MetricSpec.Unsealed { val name: String = "rpc.client.response.size" @@ -954,58 +732,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -1031,7 +757,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -1051,7 +777,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -1067,15 +793,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -1103,18 +830,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -1173,58 +895,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -1250,7 +920,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -1270,7 +940,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -1286,15 +956,16 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. * * @note - *

    May contain server IP address, DNS name, or local socket name. When host component is an IP address, - * instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to - * the IP address provided in the host component. + *

    May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP + * address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. + * When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and + * SHOULD set `server.address` to the provided IP address. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -1322,18 +993,13 @@ object RpcExperimentalMetrics { 8080, 443, ), - Requirement.conditionallyRequired( - "if `server.address` is set and if the port is supported by the network transport used for communication." - ), + Requirement.conditionallyRequired("if applicable and if `server.address` is set."), Stability.stable ) val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -1352,7 +1018,7 @@ object RpcExperimentalMetrics { } - /** Measures the duration of inbound remote procedure calls (RPC). + /** Measures the duration of an incoming Remote Procedure Call (RPC). * * @note *

    When this metric is reported alongside an RPC server span, the metric value SHOULD be the same as the RPC @@ -1361,9 +1027,9 @@ object RpcExperimentalMetrics { object ServerCallDuration extends MetricSpec.Unsealed { val name: String = "rpc.server.call.duration" - val description: String = "Measures the duration of inbound remote procedure calls (RPC)." + val description: String = "Measures the duration of an incoming Remote Procedure Call (RPC)." val unit: String = "s" - val stability: Stability = Stability.development + val stability: Stability = Stability.releaseCandidate val attributeSpecs: List[AttributeSpec[_]] = AttributeSpecs.specs object AttributeSpecs { @@ -1391,58 +1057,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -1468,7 +1082,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -1488,7 +1102,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -1504,10 +1118,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -1538,9 +1152,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -1600,58 +1211,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -1677,7 +1236,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -1697,7 +1256,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -1713,10 +1272,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -1747,9 +1306,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -1773,6 +1329,7 @@ object RpcExperimentalMetrics { * @note *

    Streaming: Recorded per message in a streaming batch */ + @deprecated("Removed, no replacement at this time.", "") object ServerRequestSize extends MetricSpec.Unsealed { val name: String = "rpc.server.request.size" @@ -1806,58 +1363,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -1883,7 +1388,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -1903,7 +1408,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -1919,10 +1424,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -1953,9 +1458,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -2014,58 +1516,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -2091,7 +1541,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -2111,7 +1561,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -2127,10 +1577,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -2161,9 +1611,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -2187,6 +1634,7 @@ object RpcExperimentalMetrics { * @note *

    Streaming: Recorded per response in a streaming batch */ + @deprecated("Removed, no replacement at this time.", "") object ServerResponseSize extends MetricSpec.Unsealed { val name: String = "rpc.server.response.size" @@ -2220,58 +1668,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -2297,7 +1693,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -2317,7 +1713,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -2333,10 +1729,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -2367,9 +1763,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, @@ -2428,58 +1821,6 @@ object RpcExperimentalMetrics { Stability.stable ) - /** OSI application layer or non-OSI equivalent. - * - * @note - *

    The value SHOULD be normalized to lowercase. - */ - val networkProtocolName: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolName, - List( - "http", - ), - Requirement.recommended, - Stability.stable - ) - - /** The actual version of the protocol used for network communication. - * - * @note - *

    If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to the negotiated - * version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - */ - val networkProtocolVersion: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkProtocolVersion, - List( - "1.1", - "2", - ), - Requirement.recommended, - Stability.stable - ) - - /** OSI transport layer or inter-process communication method. - * - * @note - *

    The value SHOULD be normalized to lowercase.

    Consider always setting the transport when setting a - * port number, since a port number is ambiguous without knowing the transport. For example different processes - * could be listening on TCP port 12345 and UDP port 12345. - */ - val networkTransport: AttributeSpec[String] = - AttributeSpec( - NetworkAttributes.NetworkTransport, - List( - "tcp", - "udp", - ), - Requirement.recommended, - Stability.stable - ) - /** The fully-qualified logical name of the method from the RPC interface perspective. * * @note @@ -2505,7 +1846,7 @@ object RpcExperimentalMetrics { "_OTHER", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** Status code of the RPC returned by the RPC server or generated by the client @@ -2525,7 +1866,7 @@ object RpcExperimentalMetrics { "-32602", ), Requirement.conditionallyRequired("if available."), - Stability.development + Stability.releaseCandidate ) /** The Remote Procedure Call (RPC) system. @@ -2541,10 +1882,10 @@ object RpcExperimentalMetrics { List( ), Requirement.required, - Stability.development + Stability.releaseCandidate ) - /** RPC server host name. + /** A string identifying a group of RPC server instances request is sent to. */ val serverAddress: AttributeSpec[String] = AttributeSpec( @@ -2575,9 +1916,6 @@ object RpcExperimentalMetrics { val specs: List[AttributeSpec[_]] = List( errorType, - networkProtocolName, - networkProtocolVersion, - networkTransport, rpcMethod, rpcResponseStatusCode, rpcSystemName, diff --git a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/SystemExperimentalMetrics.scala b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/SystemExperimentalMetrics.scala index fd313e40c..7b643a6c8 100644 --- a/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/SystemExperimentalMetrics.scala +++ b/semconv/metrics/experimental/src/main/scala/org/typelevel/otel4s/semconv/experimental/metrics/SystemExperimentalMetrics.scala @@ -47,6 +47,7 @@ object SystemExperimentalMetrics { LinuxMemorySlabUsage, MemoryLimit, MemoryLinuxAvailable, + MemoryLinuxShared, MemoryLinuxSlabUsage, MemoryShared, MemoryUsage, @@ -1230,6 +1231,45 @@ object SystemExperimentalMetrics { } + /** Shared memory used (mostly by tmpfs). + * + * @note + *

    Equivalent of `shared` from `free` command + * or `Shmem` from `/proc/meminfo`" + */ + object MemoryLinuxShared extends MetricSpec.Unsealed { + + val name: String = "system.memory.linux.shared" + val description: String = "Shared memory used (mostly by tmpfs)." + val unit: String = "By" + val stability: Stability = Stability.development + val attributeSpecs: List[AttributeSpec[_]] = Nil + + def create[F[_]: Meter, A: MeasurementValue]: F[UpDownCounter[F, A]] = + Meter[F] + .upDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .create + + def createObserver[F[_]: Meter, A: MeasurementValue]: F[ObservableMeasurement[F, A]] = + Meter[F] + .observableUpDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .createObserver + + def createWithCallback[F[_]: Meter, A: MeasurementValue]( + callback: ObservableMeasurement[F, A] => F[Unit] + ): Resource[F, ObservableUpDownCounter] = + Meter[F] + .observableUpDownCounter[A](name) + .withDescription(description) + .withUnit(unit) + .createWithCallback(callback) + + } + /** Reports the memory used by the Linux kernel for managing caches of frequently used objects. * * @note @@ -1294,16 +1334,13 @@ object SystemExperimentalMetrics { } - /** Shared memory used (mostly by tmpfs). - * - * @note - *

    Equivalent of `shared` from `free` command - * or `Shmem` from `/proc/meminfo`" + /** Deprecated, use `system.memory.linux.shared` instead. */ + @deprecated("Replaced by `system.memory.linux.shared`.", "") object MemoryShared extends MetricSpec.Unsealed { val name: String = "system.memory.shared" - val description: String = "Shared memory used (mostly by tmpfs)." + val description: String = "Deprecated, use `system.memory.linux.shared` instead." val unit: String = "By" val stability: Stability = Stability.development val attributeSpecs: List[AttributeSpec[_]] = Nil diff --git a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/Stability.scala b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/Stability.scala index a6c995dd5..1cb46c46a 100644 --- a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/Stability.scala +++ b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/Stability.scala @@ -26,9 +26,11 @@ object Stability { def development: Stability = Development def releaseCandidate: Stability = ReleaseCandidate def alpha: Stability = Alpha + def beta: Stability = Beta private case object Stable extends Stability private case object Development extends Stability private case object ReleaseCandidate extends Stability private case object Alpha extends Stability + private case object Beta extends Stability } diff --git a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/DbMetrics.scala b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/DbMetrics.scala index 4940ec081..e3bb33d35 100644 --- a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/DbMetrics.scala +++ b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/DbMetrics.scala @@ -118,6 +118,9 @@ object DbMetrics { * instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating query summary section. + *

    For batch operations, if the individual operations are known to have the same query summary then that + * query summary SHOULD be used prepended by `BATCH `, otherwise `db.query.summary` SHOULD be `BATCH` or some + * other database system specific term if more applicable. */ val dbQuerySummary: AttributeSpec[String] = AttributeSpec( diff --git a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/HttpMetrics.scala b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/HttpMetrics.scala index 42a2b844b..5a37525ce 100644 --- a/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/HttpMetrics.scala +++ b/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/HttpMetrics.scala @@ -82,11 +82,16 @@ object HttpMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( @@ -280,11 +285,16 @@ object HttpMetrics { * `_OTHER`, then it MUST provide a way to override the list of known HTTP methods. If this override is done * via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP - * methods (this list MUST be a full override of the default known method, it is not a list of known methods in - * addition to the defaults).

    HTTP method names are case-sensitive and `http.request.method` attribute - * value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing - * instrumentations that do so, MUST also set `http.request.method_original` to the original value. + * methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the + * `known_methods` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`. + *

    In either case, this list MUST be a full override of the default known methods, it is not a list of known + * methods in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` + * attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations + * that do so, MUST also set `http.request.method_original` to the original value. */ val httpRequestMethod: AttributeSpec[String] = AttributeSpec( diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/SchemaUrls.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/SchemaUrls.scala index 57971463b..7aec65b88 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/SchemaUrls.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/SchemaUrls.scala @@ -18,6 +18,7 @@ package org.typelevel.otel4s.semconv object SchemaUrls { + val V1_40_0: String = "https://opentelemetry.io/schemas/1.40.0" val V1_39_0: String = "https://opentelemetry.io/schemas/1.39.0" val V1_38_0: String = "https://opentelemetry.io/schemas/1.38.0" val V1_37_0: String = "https://opentelemetry.io/schemas/1.37.0" @@ -33,6 +34,6 @@ object SchemaUrls { val V1_27_0: String = "https://opentelemetry.io/schemas/1.27.0" val V1_26_0: String = "https://opentelemetry.io/schemas/1.26.0" - private[otel4s] val Current: String = V1_39_0 + private[otel4s] val Current: String = V1_40_0 } diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/DbAttributes.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/DbAttributes.scala index d8e333c88..20658fd9f 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/DbAttributes.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/DbAttributes.scala @@ -74,7 +74,10 @@ object DbAttributes { * analyzing telemetry for database calls involving complex queries.

    Summary may be available to the * instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating query summary section. + * href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query summary section.

    + * For batch operations, if the individual operations are known to have the same query summary then that query + * summary SHOULD be used prepended by `BATCH `, otherwise `db.query.summary` SHOULD be `BATCH` or some other + * database system specific term if more applicable. */ val DbQuerySummary: AttributeKey[String] = AttributeKey("db.query.summary") diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ExceptionAttributes.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ExceptionAttributes.scala index e7c161a39..3dba4e913 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ExceptionAttributes.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ExceptionAttributes.scala @@ -22,6 +22,9 @@ package attributes object ExceptionAttributes { /** The exception message. + * + * @note + *

    [!WARNING]

    This attribute may contain sensitive information.

    */ val ExceptionMessage: AttributeKey[String] = AttributeKey("exception.message") diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/HttpAttributes.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/HttpAttributes.scala index 592c02e2b..800fabbc6 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/HttpAttributes.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/HttpAttributes.scala @@ -51,12 +51,16 @@ object HttpAttributes { * to `_OTHER`.

    If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, * then it MUST provide a way to override the list of known HTTP methods. If this override is done via environment * variable, then the environment variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a - * comma-separated list of case-sensitive known HTTP methods (this list MUST be a full override of the default - * known method, it is not a list of known methods in addition to the defaults).

    HTTP method names are - * case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly. - * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate - * a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the - * original value. + * comma-separated list of case-sensitive known HTTP methods.

    + * + * If this override is done via declarative configuration, then the list MUST be configurable via the `known_methods` + * property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.http.client` and/or `.instrumentation/development.general.http.server`.

    + * In either case, this list MUST be a full override of the default known methods, it is not a list of known methods + * in addition to the defaults.

    HTTP method names are case-sensitive and `http.request.method` attribute value + * MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP + * methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST + * also set `http.request.method_original` to the original value. */ val HttpRequestMethod: AttributeKey[String] = AttributeKey("http.request.method") diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ServiceAttributes.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ServiceAttributes.scala index 044b8e55b..3e75f29bd 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ServiceAttributes.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/ServiceAttributes.scala @@ -21,6 +21,32 @@ package attributes // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/otel4s/attributes/SemanticAttributes.scala.j2 object ServiceAttributes { + /** The string ID of the service instance. + * + * @note + *

    MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words + * `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to + * distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled + * service).

    Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 RFC 4122 UUID, but are free to use an inherent unique ID as the + * source of this value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version + * 5 and SHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.

    UUIDs are + * typically recommended, as only an opaque value for the purposes of identifying a service instance is needed. + * Similar to what can be seen in the man page for the `/etc/machine-id` file, the + * underlying data, such as pod name and namespace should be treated as confidential, being the user's choice to + * expose it or not via another resource attribute.

    For applications running behind an application server (like + * unicorn), we do not recommend using one identifier for all processes participating in the application. Instead, + * it's recommended each division (e.g. a worker thread in unicorn) to have its own instance.id.

    It's not + * recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the service + * instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will likely be + * wrong, as the Collector might not know from which container within that pod the telemetry originated. However, + * Collectors can set the `service.instance.id` if they can unambiguously determine the service instance for that + * telemetry. This is typically the case for scraping receivers, as they know the target address and port. + */ + val ServiceInstanceId: AttributeKey[String] = + AttributeKey("service.instance.id") + /** Logical name of the service. * * @note @@ -32,6 +58,18 @@ object ServiceAttributes { val ServiceName: AttributeKey[String] = AttributeKey("service.name") + /** A namespace for `service.name`. + * + * @note + *

    A string value having a meaning that helps to distinguish a group of services, for example the team name + * that owns a group of services. `service.name` is expected to be unique within the same namespace. If + * `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all + * services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid + * namespace). Zero-length namespace string is assumed equal to unspecified namespace. + */ + val ServiceNamespace: AttributeKey[String] = + AttributeKey("service.namespace") + /** The version string of the service component. The format is not defined by these conventions. */ val ServiceVersion: AttributeKey[String] = diff --git a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/UrlAttributes.scala b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/UrlAttributes.scala index fe005218b..1f2f38050 100644 --- a/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/UrlAttributes.scala +++ b/semconv/stable/src/main/scala/org/typelevel/otel4s/semconv/attributes/UrlAttributes.scala @@ -45,8 +45,15 @@ object UrlAttributes { * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth">`Signature` *

  • `sig`
  • `X-Goog-Signature`

    This list - * is subject to change over time.

    When a query string value is redacted, the query string key SHOULD still be - * preserved, e.g. `https://www.example.com/path?color=blue&sig=REDACTED`. + * is subject to change over time.

    Matching of query parameter keys against the sensitive list SHOULD be + * case-sensitive.

    + * + * Instrumentation MAY provide a way to override this list via declarative configuration. If so, it SHOULD use the + * `sensitive_query_parameters` property (an array of case-sensitive strings with minimum items 0) under + * `.instrumentation/development.general.sanitization.url`. This list is a full override of the default sensitive + * query parameter keys, it is not a list of keys in addition to the defaults.

    When a query string value is + * redacted, the query string key SHOULD still be preserved, e.g. + * `https://www.example.com/path?color=blue&sig=REDACTED`. */ val UrlFull: AttributeKey[String] = AttributeKey("url.full") @@ -71,8 +78,12 @@ object UrlAttributes { * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth">`Signature` *

  • `sig`
  • `X-Goog-Signature`

    This list - * is subject to change over time.

    When a query string value is redacted, the query string key SHOULD still be - * preserved, e.g. `q=OpenTelemetry&sig=REDACTED`. + * is subject to change over time.

    Matching of query parameter keys against the sensitive list SHOULD be + * case-sensitive.

    Instrumentation MAY provide a way to override this list via declarative configuration. If so, + * it SHOULD use the `sensitive_query_parameters` property (an array of case-sensitive strings with minimum items 0) + * under `.instrumentation/development.general.sanitization.url`. This list is a full override of the default + * sensitive query parameter keys, it is not a list of keys in addition to the defaults.

    When a query string + * value is redacted, the query string key SHOULD still be preserved, e.g. `q=OpenTelemetry&sig=REDACTED`. */ val UrlQuery: AttributeKey[String] = AttributeKey("url.query")