Skip to content

Commit

Permalink
Add TraceOptions and TraceState empty class
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurkale22 committed Jun 18, 2019
1 parent d969247 commit 01d1340
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/opentelemetry-types/src/trace/span_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

import { TraceState } from './tracestate';
import { TraceOptions } from './traceoptions';

/**
* A SpanContext represents the portion of a Span which must be serialized and
* propagated along side of a distributed context.
Expand All @@ -39,7 +42,7 @@ export interface SpanContext {
* sampled or not.
* SAMPLED_VALUE = 0x1 and NOT_SAMPLED_VALUE = 0x0;
*/
traceOptions?: number;
traceOptions?: TraceOptions;
/**
* Tracing-system-specific info to propagate.
*
Expand All @@ -56,5 +59,5 @@ export interface SpanContext {
* Multiple tracing systems (with different formatting):
* tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
*/
traceState?: string;
traceState?: TraceState;
}
19 changes: 19 additions & 0 deletions packages/opentelemetry-types/src/trace/traceoptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2019, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export class TraceOptions {
// TODO
}
19 changes: 19 additions & 0 deletions packages/opentelemetry-types/src/trace/tracestate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2019, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export class TraceState {
// TODO
}

0 comments on commit 01d1340

Please sign in to comment.