diff --git a/distro-conventions/model/jmx-activemq-conventions/jmx-activemq-metrics.yaml b/distro-conventions/model/jmx-activemq-conventions/jmx-activemq-metrics.yaml new file mode 100644 index 0000000..6f098f2 --- /dev/null +++ b/distro-conventions/model/jmx-activemq-conventions/jmx-activemq-metrics.yaml @@ -0,0 +1,27 @@ +file_format: definition/2.0.0 +attributes: + - key: activemq.broker.name + type: string + brief: The name of the ActiveMQ broker. + stability: development + examples: ["broker-1", "broker-xyz"] + - key: activemq.destination.type + type: string + brief: The type of the ActiveMQ destination. + stability: development + examples: ["queue", "topic"] +metrics: + # based on https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/library/activemq.md + - name: activemq.producer.count + instrument: updowncounter + stability: development + brief: The number of producers attached to this destination + unit: "{producer}" + attributes: + - ref: messaging.destination.name + - ref: activemq.destination.type + - ref: activemq.broker.name +imports: + metrics: + # this is not realistic, just an example of how to import existing metric + - messaging.client.operation.duration \ No newline at end of file diff --git a/distro-conventions/model/registry_manifest.yaml b/distro-conventions/model/registry_manifest.yaml new file mode 100644 index 0000000..502f0c8 --- /dev/null +++ b/distro-conventions/model/registry_manifest.yaml @@ -0,0 +1,9 @@ +name: opentelemetry-java-instrumentation +description: This registry contains semantic conventions for OpenTelemetry Java agent +version: 1.0.0-dev +repository_url: https://github.com/open-telemetry/opentelemetry-java-instrumentation +stability: development +dependencies: + - name: otel + registry_path: https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.38.0.zip[model] + diff --git a/distro-conventions/model/spring-conventions/spring-spans.yaml b/distro-conventions/model/spring-conventions/spring-spans.yaml new file mode 100644 index 0000000..cff140d --- /dev/null +++ b/distro-conventions/model/spring-conventions/spring-spans.yaml @@ -0,0 +1,23 @@ +file_format: definition/2.0.0 +attributes: + - key: spring-webmvc.view.type + type: string + brief: The type of the Spring Web MVC view. + stability: development + examples: ["com.app.MyView"] +spans: + # based on https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/spring/spring-webmvc/spring-webmvc-6.0 + - type: spring.webmvc.controller.span + stability: development + kind: internal + brief: Spring Web MVC controller span + name: + note: "render {spring-webmvc.view.type}" + attributes: + - ref: spring-webmvc.view.type + - ref: error.type +imports: + metrics: + - http.server.* + # spans - not supported yet + # - http.server diff --git a/distro-conventions/output/resolved_schema.yaml b/distro-conventions/output/resolved_schema.yaml new file mode 100644 index 0000000..e980453 --- /dev/null +++ b/distro-conventions/output/resolved_schema.yaml @@ -0,0 +1,563 @@ +file_format: resolved/2.0.0 +attribute_catalog: +- key: http.response.status_code + type: int + examples: + - 200 + brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).' + stability: stable +- key: network.protocol.version + type: string + examples: + - '1.0' + - '1.1' + - '2' + - '3' + brief: The actual version of the protocol used for network communication. + note: | + If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. + stability: stable +- key: spring-webmvc.view.type + type: string + examples: + - com.app.MyView + brief: The type of the Spring Web MVC view. + stability: development +- key: user_agent.synthetic.type + type: + members: + - id: bot + value: bot + brief: Bot source. + stability: development + - id: test + value: test + brief: Synthetic test source. + stability: development + brief: | + Specifies the category of synthetic traffic, such as tests or bots. + note: | + This attribute MAY be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests. + stability: development +- key: server.port + type: int + examples: + - 80 + - 8080 + - 443 + brief: | + Port of the local HTTP server that received the request. + note: | + See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). + > **Warning** + > Since this attribute is based on HTTP headers, opting in to it may allow an attacker + > to trigger cardinality limits, degrading the usefulness of the metric. + stability: stable +- key: http.route + type: string + examples: + - /users/:userID? + - my-controller/my-action/{id?} + brief: | + The matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders. + note: | + MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. + SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. + + A static path segment is a part of the route template with a fixed, low-cardinality value. This includes literal strings like `/users/` and placeholders that + are constrained to a finite, predefined set of values, e.g. `{controller}` or `{action}`. + + A dynamic path segment is a placeholder for a value that can have high cardinality and is not constrained to a predefined list like static path segments. + + Instrumentations SHOULD use routing information provided by the corresponding web framework. They SHOULD pick the most precise source of routing information and MAY + support custom route formatting. Instrumentations SHOULD document the format and the API used to obtain the route string. + stability: stable +- key: url.scheme + type: string + examples: + - http + - https + brief: | + The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. + note: | + The scheme of the original client request, if known (e.g. from [Forwarded#proto](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#proto), [X-Forwarded-Proto](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Proto), or a similar header). Otherwise, the scheme of the immediate peer request. + stability: stable +- key: messaging.destination.name + type: string + examples: + - MyQueue + - MyTopic + brief: The message destination name + note: | + Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If + the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. + stability: development +- key: error.type + type: + members: + - id: other + value: _OTHER + brief: | + A fallback error value to be used when the instrumentation doesn't define a custom value. + stability: stable + examples: + - timeout + - java.net.UnknownHostException + - server_certificate_invalid + - '500' + brief: | + Describes a class of error the operation ended with. + note: | + If the request fails with an error before response status code was sent or received, + `error.type` SHOULD be set to exception type (its fully-qualified class name, if applicable) + or a component-specific low cardinality error identifier. + + If response status code was sent or received and status indicates an error according to [HTTP span status definition](/docs/http/http-spans.md), + `error.type` SHOULD be set to the status code number (represented as a string), an exception type (if thrown) or a component-specific error identifier. + + The `error.type` value SHOULD be predictable and SHOULD have low cardinality. + Instrumentations SHOULD document the list of errors they report. + + The cardinality of `error.type` within one instrumentation library SHOULD be low, but + telemetry consumers that aggregate data from multiple instrumentation libraries and applications + should be prepared for `error.type` to have high cardinality at query time, when no + additional filters are applied. + + If the request has completed successfully, instrumentations SHOULD NOT set `error.type`. + stability: stable +- key: activemq.destination.type + type: string + examples: + - queue + - topic + brief: The type of the ActiveMQ destination. + stability: development +- key: network.protocol.name + type: string + examples: + - http + - spdy + brief: '[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.' + note: The value SHOULD be normalized to lowercase. + stability: stable +- key: error.type + type: + members: + - id: other + value: _OTHER + brief: | + A fallback error value to be used when the instrumentation doesn't define a custom value. + stability: stable + examples: + - System.OperationCanceledException + brief: The full name of exception type. + stability: stable +- key: activemq.broker.name + type: string + examples: + - broker-1 + - broker-xyz + brief: The name of the ActiveMQ broker. + stability: development +- key: server.address + type: string + examples: + - example.com + - 10.1.2.80 + - /tmp/my.sock + brief: | + Name of the local HTTP server that received the request. + note: | + See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). + > **Warning** + > Since this attribute is based on HTTP headers, opting in to it may allow an attacker + > to trigger cardinality limits, degrading the usefulness of the metric. + stability: stable +- key: url.scheme + type: string + examples: + - http + - https + brief: | + The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. + stability: stable +- key: http.request.method + type: + members: + - id: connect + value: CONNECT + brief: CONNECT method. + stability: stable + - id: delete + value: DELETE + brief: DELETE method. + stability: stable + - id: get + value: GET + brief: GET method. + stability: stable + - id: head + value: HEAD + brief: HEAD method. + stability: stable + - id: options + value: OPTIONS + brief: OPTIONS method. + stability: stable + - id: patch + value: PATCH + brief: PATCH method. + stability: stable + - id: post + value: POST + brief: POST method. + stability: stable + - id: put + value: PUT + brief: PUT method. + stability: stable + - id: trace + value: TRACE + brief: TRACE method. + stability: stable + - id: query + value: QUERY + brief: QUERY method. + stability: development + - id: other + value: _OTHER + brief: Any HTTP method that the instrumentation has no prior knowledge of. + stability: stable + examples: + - GET + - POST + - HEAD + brief: HTTP request method. + note: | + HTTP request method value SHOULD be "known" to the instrumentation. + By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods), + the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html) + and the QUERY method defined in [httpbis-safe-method-w-body](https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1). + + If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute 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. + stability: stable +registry: + attributes: + - 12 + - 9 + - 2 + attribute_groups: [] + registry_url: ./model + spans: + - type: spring.webmvc.controller.span + kind: internal + name: + note: spring.webmvc.controller.span + attributes: + - base: 11 + requirement_level: + conditionally_required: if and only if an error has occurred. + - base: 2 + requirement_level: recommended + brief: Spring Web MVC controller span + stability: development + metrics: + - name: activemq.producer.count + instrument: updowncounter + unit: '{producer}' + attributes: + - base: 12 + requirement_level: recommended + - base: 9 + requirement_level: recommended + - base: 7 + requirement_level: + conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch. + brief: The number of producers attached to this destination + stability: development + - name: http.server.active_requests + instrument: updowncounter + unit: '{request}' + attributes: + - base: 15 + requirement_level: required + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 14 + requirement_level: required + brief: Number of active HTTP server requests. + stability: development + annotations: + code_generation: + metric_value_type: int + - name: http.server.request.body.size + instrument: histogram + unit: By + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Size of HTTP server request bodies. + note: | + The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + stability: development + annotations: + code_generation: + metric_value_type: int + - name: http.server.request.duration + instrument: histogram + unit: s + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Duration of HTTP server requests. + stability: stable + annotations: + code_generation: + metric_value_type: double + - name: http.server.response.body.size + instrument: histogram + unit: By + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Size of HTTP server response bodies. + note: | + The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + stability: development + annotations: + code_generation: + metric_value_type: int + events: [] + entities: [] +refinements: + spans: + - id: spring.webmvc.controller.span + type: spring.webmvc.controller.span + kind: internal + name: + note: spring.webmvc.controller.span + attributes: + - base: 11 + requirement_level: + conditionally_required: if and only if an error has occurred. + - base: 2 + requirement_level: recommended + brief: Spring Web MVC controller span + stability: development + metrics: + - id: activemq.producer.count + name: activemq.producer.count + instrument: updowncounter + unit: '{producer}' + attributes: + - base: 12 + requirement_level: recommended + - base: 9 + requirement_level: recommended + - base: 7 + requirement_level: + conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch. + brief: The number of producers attached to this destination + stability: development + - id: http.server.active_requests + name: http.server.active_requests + instrument: updowncounter + unit: '{request}' + attributes: + - base: 15 + requirement_level: required + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 14 + requirement_level: required + brief: Number of active HTTP server requests. + stability: development + annotations: + code_generation: + metric_value_type: int + - id: http.server.request.body.size + name: http.server.request.body.size + instrument: histogram + unit: By + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Size of HTTP server request bodies. + note: | + The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + stability: development + annotations: + code_generation: + metric_value_type: int + - id: http.server.request.duration + name: http.server.request.duration + instrument: histogram + unit: s + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Duration of HTTP server requests. + stability: stable + annotations: + code_generation: + metric_value_type: double + - id: http.server.response.body.size + name: http.server.response.body.size + instrument: histogram + unit: By + attributes: + - base: 8 + requirement_level: + conditionally_required: If request has ended with an error. + - base: 15 + requirement_level: required + - base: 0 + requirement_level: + conditionally_required: If and only if one was received/sent. + - base: 5 + requirement_level: + conditionally_required: If and only if it's available + - base: 10 + requirement_level: + conditionally_required: If not `http` and `network.protocol.version` is set. + - base: 1 + requirement_level: recommended + - base: 13 + requirement_level: opt_in + - base: 4 + requirement_level: opt_in + - base: 6 + requirement_level: required + - base: 3 + requirement_level: opt_in + brief: Size of HTTP server response bodies. + note: | + The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + stability: development + annotations: + code_generation: + metric_value_type: int + events: [] diff --git a/jmx-activemq-instrumentation-semconv/model/jmx-activemq-metrics.yaml b/jmx-activemq-instrumentation-semconv/model/jmx-activemq-metrics.yaml new file mode 100644 index 0000000..6f098f2 --- /dev/null +++ b/jmx-activemq-instrumentation-semconv/model/jmx-activemq-metrics.yaml @@ -0,0 +1,27 @@ +file_format: definition/2.0.0 +attributes: + - key: activemq.broker.name + type: string + brief: The name of the ActiveMQ broker. + stability: development + examples: ["broker-1", "broker-xyz"] + - key: activemq.destination.type + type: string + brief: The type of the ActiveMQ destination. + stability: development + examples: ["queue", "topic"] +metrics: + # based on https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/library/activemq.md + - name: activemq.producer.count + instrument: updowncounter + stability: development + brief: The number of producers attached to this destination + unit: "{producer}" + attributes: + - ref: messaging.destination.name + - ref: activemq.destination.type + - ref: activemq.broker.name +imports: + metrics: + # this is not realistic, just an example of how to import existing metric + - messaging.client.operation.duration \ No newline at end of file diff --git a/jmx-activemq-instrumentation-semconv/model/registry_manifest.yaml b/jmx-activemq-instrumentation-semconv/model/registry_manifest.yaml new file mode 100644 index 0000000..ad74a33 --- /dev/null +++ b/jmx-activemq-instrumentation-semconv/model/registry_manifest.yaml @@ -0,0 +1,9 @@ +name: activemq-jmx-instrumentation +description: This registry contains semantic conventions for ActiveMQ JMX instrumentation. +version: 1.0.0-dev +repository_url: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/library/activemq.md +stability: development +dependencies: + - name: otel + registry_path: https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.38.0.zip[model] + diff --git a/jmx-activemq-instrumentation-semconv/output/resolved_schema.yaml b/jmx-activemq-instrumentation-semconv/output/resolved_schema.yaml new file mode 100644 index 0000000..d4a0039 --- /dev/null +++ b/jmx-activemq-instrumentation-semconv/output/resolved_schema.yaml @@ -0,0 +1,347 @@ +file_format: resolved/2.0.0 +attribute_catalog: +- key: messaging.destination.partition.id + type: string + examples: '1' + brief: | + The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. + stability: development +- key: server.address + type: string + examples: + - example.com + - 10.1.2.80 + - /tmp/my.sock + brief: Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + note: | + Server domain name of the broker if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + stability: stable +- key: messaging.destination.name + type: string + examples: + - MyQueue + - MyTopic + brief: The message destination name + note: | + Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If + the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. + stability: development +- key: messaging.operation.name + type: string + examples: + - send + - receive + - ack + brief: | + The system-specific name of the messaging operation. + stability: development +- key: error.type + type: + members: + - id: other + value: _OTHER + brief: | + A fallback error value to be used when the instrumentation doesn't define a custom value. + stability: stable + examples: + - amqp:decode-error + - KAFKA_STORAGE_ERROR + - channel-error + brief: | + Describes a class of error the operation ended with. + note: | + The `error.type` SHOULD be predictable, and SHOULD have low cardinality. + + When `error.type` is set to a type (e.g., an exception type), its + canonical class name identifying the type within the artifact SHOULD be used. + + Instrumentations SHOULD document the list of errors they report. + + The cardinality of `error.type` within one instrumentation library SHOULD be low. + Telemetry consumers that aggregate data from multiple instrumentation libraries and applications + should be prepared for `error.type` to have high cardinality at query time when no + additional filters are applied. + + If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. + + If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), + it's RECOMMENDED to: + + - Use a domain-specific attribute + - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. + stability: stable +- key: messaging.system + type: + members: + - id: activemq + value: activemq + brief: Apache ActiveMQ + stability: development + - id: aws.sns + value: aws.sns + brief: Amazon Simple Notification Service (SNS) + stability: development + - id: aws_sqs + value: aws_sqs + brief: Amazon Simple Queue Service (SQS) + stability: development + - id: eventgrid + value: eventgrid + brief: Azure Event Grid + stability: development + - id: eventhubs + value: eventhubs + brief: Azure Event Hubs + stability: development + - id: servicebus + value: servicebus + brief: Azure Service Bus + stability: development + - id: gcp_pubsub + value: gcp_pubsub + brief: Google Cloud Pub/Sub + stability: development + - id: jms + value: jms + brief: Java Message Service + stability: development + - id: kafka + value: kafka + brief: Apache Kafka + stability: development + - id: rabbitmq + value: rabbitmq + brief: RabbitMQ + stability: development + - id: rocketmq + value: rocketmq + brief: Apache RocketMQ + stability: development + - id: pulsar + value: pulsar + brief: Apache Pulsar + stability: development + brief: The messaging system as identified by the client instrumentation. + note: | + The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge. + stability: development +- key: activemq.destination.type + type: string + examples: + - queue + - topic + brief: The type of the ActiveMQ destination. + stability: development +- key: messaging.consumer.group.name + type: string + examples: + - my-group + - indexer + brief: | + The name of the consumer group with which a consumer is associated. + note: | + Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. + stability: development +- key: messaging.destination.subscription.name + type: string + examples: + - subscription-a + brief: The name of the destination subscription from which a message is consumed. + note: | + Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. + stability: development +- key: messaging.operation.type + type: + members: + - id: create + value: create + brief: | + A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch sending scenarios. + stability: development + - id: send + value: send + brief: | + One or more messages are provided for sending to an intermediary. If a single message is sent, the context of the "Send" span can be used as the creation context and no "Create" span needs to be created. + stability: development + - id: receive + value: receive + brief: | + One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. + stability: development + - id: process + value: process + brief: | + One or more messages are processed by a consumer. + stability: development + - id: settle + value: settle + brief: | + One or more messages are settled. + stability: development + - id: deliver + value: deliver + brief: Deprecated. Use `process` instead. + stability: development + deprecated: + reason: renamed + renamed_to: process + note: Replaced by `process`. + - id: publish + value: publish + brief: Deprecated. Use `send` instead. + stability: development + deprecated: + reason: renamed + renamed_to: send + note: Replaced by `send`. + brief: | + A string identifying the type of the messaging operation. + note: If a custom value is used, it MUST be of low cardinality. + stability: development +- key: server.port + type: int + examples: + - 80 + - 8080 + - 443 + brief: Server port number. + note: | + When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. + stability: stable +- key: messaging.destination.template + type: string + examples: + - /customers/{customerId} + brief: Low cardinality representation of the messaging destination name + note: | + Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. + stability: development +- key: activemq.broker.name + type: string + examples: + - broker-1 + - broker-xyz + brief: The name of the ActiveMQ broker. + stability: development +registry: + attributes: + - 12 + - 6 + attribute_groups: [] + registry_url: ./model + spans: [] + metrics: + - name: activemq.producer.count + instrument: updowncounter + unit: '{producer}' + attributes: + - base: 12 + requirement_level: recommended + - base: 6 + requirement_level: recommended + - base: 2 + requirement_level: + conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch. + brief: The number of producers attached to this destination + stability: development + - name: messaging.client.operation.duration + instrument: histogram + unit: s + attributes: + - base: 4 + requirement_level: + conditionally_required: If and only if the messaging operation has failed. + - base: 7 + requirement_level: + conditionally_required: if applicable. + - base: 2 + requirement_level: + conditionally_required: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. + - base: 0 + requirement_level: recommended + - base: 8 + requirement_level: + conditionally_required: if applicable. + - base: 11 + requirement_level: + conditionally_required: if available. + - base: 3 + requirement_level: required + - base: 9 + requirement_level: + conditionally_required: If applicable. + - base: 5 + requirement_level: required + - base: 1 + requirement_level: + conditionally_required: If available. + - base: 10 + requirement_level: recommended + brief: Duration of messaging operation initiated by a producer or consumer client. + note: | + This metric SHOULD NOT be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. + stability: development + annotations: + code_generation: + metric_value_type: double + events: [] + entities: [] +refinements: + spans: [] + metrics: + - id: activemq.producer.count + name: activemq.producer.count + instrument: updowncounter + unit: '{producer}' + attributes: + - base: 12 + requirement_level: recommended + - base: 6 + requirement_level: recommended + - base: 2 + requirement_level: + conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch. + brief: The number of producers attached to this destination + stability: development + - id: messaging.client.operation.duration + name: messaging.client.operation.duration + instrument: histogram + unit: s + attributes: + - base: 4 + requirement_level: + conditionally_required: If and only if the messaging operation has failed. + - base: 7 + requirement_level: + conditionally_required: if applicable. + - base: 2 + requirement_level: + conditionally_required: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. + - base: 0 + requirement_level: recommended + - base: 8 + requirement_level: + conditionally_required: if applicable. + - base: 11 + requirement_level: + conditionally_required: if available. + - base: 3 + requirement_level: required + - base: 9 + requirement_level: + conditionally_required: If applicable. + - base: 5 + requirement_level: required + - base: 1 + requirement_level: + conditionally_required: If available. + - base: 10 + requirement_level: recommended + brief: Duration of messaging operation initiated by a producer or consumer client. + note: | + This metric SHOULD NOT be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. + stability: development + annotations: + code_generation: + metric_value_type: double + events: []