Skip to content

Clarify usage of producer span kind #4758

@thompson-tomo

Description

@thompson-tomo

What are you trying to achieve?

Trying to identify span kind which should be used for a span which adds a task to be performed at a later time within the same application.

Additional context.

When I look at https://opentelemetry.io/docs/specs/otel/trace/api/#spankind

When I read

SpanKind describes two independent properties that benefit tracing systems during analysis:

  • Whether a span represents an outgoing call to a remote service (CLIENT and PRODUCER spans) or a processing of an incoming request initiated externally (SERVER and CONSUMER spans).
  • Whether a Span represents a request/response operation (CLIENT and SERVER spans) or a deferred execution (PRODUCER and CONSUMER spans).

That gives me the impression that it is internal especially given no remote/external service.

However when I read

PRODUCER indicates that the span describes the initiation or scheduling of a local or remote operation. This initiating span often ends before the correlated CONSUMER span, possibly even before the CONSUMER span starts.

The mentioning of local can be a source of confusion as it could be local within the same process.

Then reading on I see

INTERNAL Default value. Indicates that the span represents an internal operation within an application, as opposed to an operations with remote parents or children.

Which matches the initial understanding.

As such a suggestion would be to make local more explicit by adding in brackets "seperate process". Or something similar.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:traceRelated to the specification/trace directorytriage:accepted:readyReady to be implemented. Small enough or uncontroversial enough to be implemented without sponsor

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions