What are span kinds and why do they matter?
IntermediateConceptTracing & OpenTelemetry
Answer
Span kind tells the backend what role a span plays in a call:
- SERVER: handles an inbound synchronous request.
- CLIENT: makes an outbound synchronous request.
- PRODUCER: sends a message to a queue (may finish before the consumer starts).
- CONSUMER: processes a message.
- INTERNAL: work that does not cross a process boundary.
Backends use kind to build service graphs and RED metrics: a CLIENT span in orders paired with a SERVER span in payments becomes an edge orders → payments. Wrong kinds (everything INTERNAL) give you a trace waterfall but an empty service map and missing span metrics.
More on Tracing & OpenTelemetry
What is distributed tracing, and what are a trace, a span and a span context?BeginnerWhat fields does an OpenTelemetry span carry?BeginnerWhat does the W3C `traceparent` header look like?IntermediateWhat is baggage, and how is it different from span attributes?IntermediateWhat is OpenTelemetry and what are its main parts?BeginnerWhy does OpenTelemetry separate the API from the SDK?Advanced