Reference documentation and code samples for the Cloud Trace V2 API module Google::Cloud::Trace::V2::Span::SpanKind.
Type of span. Can be used to specify additional relationships between spans
in addition to a parent/child relationship.
Constants
SPAN_KIND_UNSPECIFIED
value: 0 Unspecified. Do NOT use as default.
Implementations MAY assume SpanKind.INTERNAL to be default.
INTERNAL
value: 1 Indicates that the span is used internally. Default value.
SERVER
value: 2 Indicates that the span covers server-side handling of an RPC or other
remote network request.
CLIENT
value: 3 Indicates that the span covers the client-side wrapper around an RPC or
other remote request.
PRODUCER
value: 4 Indicates that the span describes producer sending a message to a broker.
Unlike client and server, there is no direct critical path latency
relationship between producer and consumer spans (e.g. publishing a
message to a pubsub service).
CONSUMER
value: 5 Indicates that the span describes consumer receiving a message from a
broker. Unlike client and server, there is no direct critical path
latency relationship between producer and consumer spans (e.g. receiving
a message from a pubsub service subscription).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Trace V2 API - Module Google::Cloud::Trace::V2::Span::SpanKind (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-trace-v2/latest/Google-Cloud-Trace-V2-Span-SpanKind)\n- [1.2.1](/ruby/docs/reference/google-cloud-trace-v2/1.2.1/Google-Cloud-Trace-V2-Span-SpanKind)\n- [1.1.0](/ruby/docs/reference/google-cloud-trace-v2/1.1.0/Google-Cloud-Trace-V2-Span-SpanKind)\n- [1.0.1](/ruby/docs/reference/google-cloud-trace-v2/1.0.1/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.9.0](/ruby/docs/reference/google-cloud-trace-v2/0.9.0/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.8.2](/ruby/docs/reference/google-cloud-trace-v2/0.8.2/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.7.0](/ruby/docs/reference/google-cloud-trace-v2/0.7.0/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.6.1](/ruby/docs/reference/google-cloud-trace-v2/0.6.1/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.5.0](/ruby/docs/reference/google-cloud-trace-v2/0.5.0/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.4.1](/ruby/docs/reference/google-cloud-trace-v2/0.4.1/Google-Cloud-Trace-V2-Span-SpanKind)\n- [0.3.5](/ruby/docs/reference/google-cloud-trace-v2/0.3.5/Google-Cloud-Trace-V2-Span-SpanKind) \nReference documentation and code samples for the Cloud Trace V2 API module Google::Cloud::Trace::V2::Span::SpanKind.\n\nType of span. Can be used to specify additional relationships between spans\nin addition to a parent/child relationship.\n\nConstants\n---------\n\n### SPAN_KIND_UNSPECIFIED\n\n**value:** 0 \nUnspecified. Do NOT use as default.\nImplementations MAY assume SpanKind.INTERNAL to be default.\n\n### INTERNAL\n\n**value:** 1 \nIndicates that the span is used internally. Default value.\n\n### SERVER\n\n**value:** 2 \nIndicates that the span covers server-side handling of an RPC or other\nremote network request.\n\n### CLIENT\n\n**value:** 3 \nIndicates that the span covers the client-side wrapper around an RPC or\nother remote request.\n\n### PRODUCER\n\n**value:** 4 \nIndicates that the span describes producer sending a message to a broker.\nUnlike client and server, there is no direct critical path latency\nrelationship between producer and consumer spans (e.g. publishing a\nmessage to a pubsub service).\n\n### CONSUMER\n\n**value:** 5 \nIndicates that the span describes consumer receiving a message from a\nbroker. Unlike client and server, there is no direct critical path\nlatency relationship between producer and consumer spans (e.g. receiving\na message from a pubsub service subscription)."]]