Trace origin indicates what created a trace or a span. Not all traces and spans contain enough information to tell whether the user or what precisely in the SDK created it. Origin solves this problem. Origin can be sent with the trace context or spans. The SDKs should set this value automatically. It is not expected to be set manually by users.
The origin is of type
string and consists of four parts:
Only the first is mandatory. The parts build upon each other, meaning it is forbidden
to skip one part. For example, you may send parts one and two but aren't allowed to send parts one and three without part two.
- Required. Can be either
manualindicates that the user created the trace or span,
autoindicates that the SDK or some integration created it.
- Optional. Is the category of the trace or span, and it must be a category of span operations. For example,
- Optional. Is the name of the integration of the SDK that created the trace or span.
- Optional. Is the part of the integration of the SDK that created the trace or span.
All parts can only contain:
- Alphanumeric characters:
Origins of type
manual can also have categories and integration names. For example, for the time to display feature, the user manually calls an API of the SDK,
creating a span. In this case, the SDK can tell what created the span, but the user did it manually. On the other hand, the SDK also
automatically creates a span. In this case we end up with the following origins:
- Span Interface
- Trace Context
- Related RFC;