open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.75k stars 889 forks source link

What's INTERNAL span kind and when it should be used #4179

Open lmolkova opened 3 months ago

lmolkova commented 3 months ago

See https://github.com/open-telemetry/opentelemetry-specification/pull/4178 for the context.

Internal kind is defined as

https://github.com/open-telemetry/opentelemetry-specification/blob/5381b55dd8e6adcbf99e153533e5ad8ea3dd6b38/specification/trace/api.md?plain=1#L801-L803

Presumably it means that span cannot have remote parents and remote children.

Based on discissions referenced in #4178, #110, #526:

I.e. there is no reliably way to know whether something will have remote children (or any descendants). It depends on application, enabled instrumentations, potentially interchangeable protocols.

INTERNAL vs SERVER is also controversial. Imagine a cron-job (e.g. FaaS time trigger) - it never has a parent, should it be Internal?

The existing status-quo:

lmolkova commented 3 months ago

Proposal:

keep the status quo - clarify INTERNAL description:

Alternatives:

austinlparker commented 3 months ago

INTERNAL vs SERVER is also controversial. Imagine a cron-job (e.g. FaaS time trigger) - it never has a parent, should it be Internal?

Well, depends on where you're modeling from. The trigger would be the client, and the function would be the server.