PubSub+ Messaging APIs - Distributed Tracing OpenTelemetry Auto-Instrumentation Span Fields

As discussed in Context Propagation, message traces are made up of spans that are emitted at each point along the event mesh, consumed (and converted) by the Solace Open Telemetry Receiver, and sent to your chosen backend, which reassembles these spans and provides a visual view of the movement and processing of an event message. Each span that passes to the backend is made up of span fields and includes span attributes (key-value pairs).

These tables list the OpenTelemetry auto-instrumentation span attributes in the event message that are sent to your observability backend (from the OpenTelemetry Collector with a configured Solace Open Telemetry Receiver). Auto-Instrumentation uses agents or plugins to automatically capture telemetry data from an application without requiring code changes. It offers an easy way to gather standard telemetry but may lack customization for unique application behaviors. For a list of manual instrumentation span fields, see Distributed Tracing OpenTelemetry Span Fields.

For more information on traces, spans, span attributes (key-value pairs), and more, see OpenTelemetry Traces.

OpenTelemetry Specification Attributes

These are general attributes defined by OpenTelemetry that apply to spans across various types of systems, providing metadata like identification, timing, and context.

  Span Attribute Type   Description Example Value
TraceId 16 byte array The traceID associated with the span. 4bf92f3577b34da6a3ce929d0e0e472a
SpanId 8 byte array The spanID associated with the span. b3c2a1f3d1e0a3b4
TraceState set of key-value pairs The TraceState is a part of the span context; for more information, see OpenTelemetry - TraceState. vendor1=value1,vendor2=value2 ...
SpanKind enum Specifies the role of the span within a trace. Can be PRODUCER or CONSUMER. PRODUCER
StartTimeUnixNano integer The start timestamp of the span. 1693056000000000000
EndTimeUnixNano integer The end timestamp of the span. 1693056060000000000
Status enum The status of the OpenTelemetry span. Can be one of: OK, ERROR, or UNSET OK
ParentSpanId 8 byte array The spanID associated with the parent span. b3c2a1f3d1e0a3b4

Publish Span Attributes

Publish spans are generated when your publisher application sends a message. When you publish a message, the destination name, either a queue or topic, becomes part of the span name. For example, if a message is published to the topic my/topic/destination, then the span name becomes publish my/topic/destination. The span includes the following attributes:

Span Attribute Type Description Example Value
span.kind string Specifies the role of the span within a trace. Can be PRODUCER or CONSUMER. PRODUCER
messaging.solace.api.name string Specifies the PubSub+ API used. JCSMP
messaging.solace.api.version string Specifies the version of the PubSub+ API. 10.26.0
messaging.destination.name string The destination to which the producer publishes messages. my/topic/dest
messaging.solace.destination.type string The type of destination, for example a topic or a queue. topic
messaging.destination.temporary boolean Indicates if the publisher destination is temporary. Possible values:
  • true—The publisher destination is a temporary queue or temporary topic.
  • false—The publisher destination is a durable queue or a topic. When false, this attribute is not shown in the trace.
true
messaging.destination.anonymous boolean Indicates if the publisher destination is anonymous. Possible values:
  • true—The publisher destination is a temporary topic, or a temporary queue without a given name
  • false—The publisher destination is a topic, a durable queue, or a temporary queue with a given name. When false, this attribute is not shown in the trace.
true
messaging.solace.delivery.mode string Indicates the delivery mode of the message. Possible values are Persistent, Non-Persistent, or Direct. Persistent
messaging.operation.name string The system-specific name of the messaging operation. For publish spans, this value is publish. publish
messaging.operation.type string A string identifying the type of the messaging operation. For publish spans, this value is publish. publish
messaging.system string The messaging system as identified by the client instrumentation. SolacePubSub+
error.type string Indicates the type of error or exception that occurred. Possible values:
  • JCSMPException
  • InvalidOperationException
  • IllegalArgumentException—Conditionally set when there is an exception.
JCSMPException

Consume Span Attributes

Consume spans are generated when your receiver application receives a message. When you receive a message, the endpoint name, either a queue or topic endpoint, becomes part of the span name. For example, if a message is received on a queue called SolaceQueue then the span name becomes consume SolaceQueue. The span includes the following attributes:

Span Attribute Type Description Example Value
span.kind string Specifies the role of the span within a trace. Can be PRODUCER or CONSUMER. CONSUMER
messaging.solace.api.name string Specifies the PubSub+ API used. JCSMP
messaging.solace.api.version string Specifies the version of the PubSub+ API. 10.26.0
messaging.destination.name string The endpoint which the consumer is receiving messages from or the topic if the application uses direct messaging. SolaceQueue
messaging.solace.destination.type string The type of destination, for example a topic or a queue. queue
messaging.solace.message.topic string The topic that the message was published to when the consumer binds to a queue or topic endpoint. a/sample/topic
messaging.destination.temporary boolean Indicates if the consumer endpoint is temporary. Possible values:
  • true—The consumer endpoint is a non-durable topic endpoint or a temporary queue.
  • false—The consumer endpoint is a durable topic endpoint or a durable queue. When false, this attribute is not shown in the trace.
true
messaging.destination.anonymous boolean Indicates if the consumer endpoint is anonymous. Possible values:
  • true—The consumer endpoint is a non-durable topic endpoint without a given name or a temporary queue without a given name.
  • false—The consumer endpoint is a durable topic endpoint, a non-durable topic endpoint with given name, a durable queue or a temporary queue with a given name. When false, this attribute is not shown in the trace.
false
messaging.message.id string The application message ID of the event broker. This is a user-defined property that allows an application to assign a unique identifier to each message. 452a7c7c704887f1572b18fc2
messaging.solace.delivery.mode string Indicates the delivery mode of the message, can be Persistent, Non-Persistent, or Direct. Non-Persistent
messaging.operation.name string The system-specific name of the messaging operation. For consume spans, this value is consume. consume
messaging.operation.type string A string identifying the type of the messaging operation. For consume spans, this value is process for asynchronous, push-based delivery operations, or receive for synchronous, pull-based retrieval operations. receive
messaging.system string The main messaging system of the event mesh. SolacePubSub+
error.type string Indicates the type of error or exception that occurred. Possible values:
  • JCSMPException
  • InvalidOperationException
  • IllegalArgumentException—Conditionally set when there is an exception.
JCSMPException