Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource On SpanData + Specify SpanData format #69

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion specification/resources-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ When used with distributed tracing resource can be associated with the
[SpanData](tracing-api.md#spandata). When associated with `Tracer`, all `Span`s
produced by this `Tracer` will automatically be associated with this `Resource`.
When associated with the `SpanData` explicitly for out-of-band spans -
`Resource` that is set on `Tracer` MUST be ignored.
`Resource` that is set on `Tracer` MUST be ignored. Note, that association
SergeyKanzhelev marked this conversation as resolved.
Show resolved Hide resolved
of `Tracer` with the `Resource` will be done in SDK, not as API call.

**TODO**: explain how resource is associated with metrics.

Expand Down
31 changes: 30 additions & 1 deletion specification/tracing-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,33 @@ record already completed span - [`SpanData`](#spandata) API HAVE TO be used.

## SpanData

TODO: SpanData operations https://github.com/open-telemetry/opentelemetry-specification/issues/35
TODO: SpanData operations
https://github.com/open-telemetry/opentelemetry-specification/issues/35

## Constructing SpanData

`SpanData` is an immutable object that can be constructed using the following
arguments:

- `SpanContext` identifying this `SpanData`.
- Parent's `SpanId`.
- `Resource` this SpanData is recorded for. If not specified - `Tracer`'s
`Resource` will be used instead when the `RecordSpanData` called on the
`Tracer`.
- Name of this `SpanData`.
- `Kind` of this `SpanData`.
- Start and End timestamps
- Set of attributed with the string key and the value, which must be either a
SergeyKanzhelev marked this conversation as resolved.
Show resolved Hide resolved
string, a boolean value, or a numeric type.
- Set of `Events`.
- Set of `Links`.
- `Status` of `SpanData` execution.

All collections passes as an argument MUST be copied so the change of the
SergeyKanzhelev marked this conversation as resolved.
Show resolved Hide resolved
collection will not mutate the `SpanData`.

## GetResource
SergeyKanzhelev marked this conversation as resolved.
Show resolved Hide resolved

Returns the `Resource` associated with this `SpanData`. When `null` is returned
the assumption is that `Resource` will be taken from the `Tracer` that is used
to record this `SpanData`.