Skip to content

Commit

Permalink
Update TraceState with examples and add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurkale22 committed Jun 14, 2019
1 parent db13c94 commit 52e53ab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
25 changes: 23 additions & 2 deletions packages/opentelemetry-types/src/trace/span_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 5 additions & 1 deletion packages/opentelemetry-types/src/trace/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52e53ab

Please sign in to comment.