diff --git a/packages/opentelemetry-types/src/trace/span_context.ts b/packages/opentelemetry-types/src/trace/span_context.ts index 474b9a9513..e136f74b01 100644 --- a/packages/opentelemetry-types/src/trace/span_context.ts +++ b/packages/opentelemetry-types/src/trace/span_context.ts @@ -23,8 +23,29 @@ export interface SpanContext { traceId: string; /** The ID of the Span. */ spanId: string; - /** Trace options to propagate. */ + /** + * Trace options to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. + * SAMPLED_VALUE = 0x1 and NOT_SAMPLED_VALUE = 0x0; + */ traceOptions?: number; - /** Tracing-system-specific info to propagate. */ + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ traceState?: string; } diff --git a/packages/opentelemetry-types/src/trace/status.ts b/packages/opentelemetry-types/src/trace/status.ts index e34dbf4cc9..be84093ce1 100644 --- a/packages/opentelemetry-types/src/trace/status.ts +++ b/packages/opentelemetry-types/src/trace/status.ts @@ -25,7 +25,11 @@ export interface Status { message?: string; } -/** An enumeration of canonical status codes. */ +/** + * An enumeration of canonical status codes. + * + * TODO (revision): https://github.com/open-telemetry/opentelemetry-specification/issues/59 + */ export enum CanonicalCode { /** * Not an error; returned on success