Skip to content

Commit

Permalink
fix: new version with TextMapPropagator interface (#196)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
  • Loading branch information
jufab and obecny authored Sep 7, 2020
1 parent 5c81884 commit 16d3515
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"access": "public"
},
"devDependencies": {
"@opentelemetry/context-base": "0.10.2",
"@types/mocha": "7.0.2",
"@types/node": "14.0.27",
"codecov": "3.7.2",
Expand All @@ -59,7 +58,7 @@
"typescript": "3.9.7"
},
"dependencies": {
"@opentelemetry/api": "^0.10.2",
"@opentelemetry/core": "^0.10.2"
"@opentelemetry/api": "^0.11.0",
"@opentelemetry/core": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import {
Context,
GetterFunction,
HttpTextPropagator,
TextMapPropagator,
SetterFunction,
} from '@opentelemetry/api';
import {
Expand Down Expand Up @@ -53,11 +53,11 @@ function isValidSpanId(spanId: string): boolean {

/**
* Propagator for the grpc-trace-bin header used by OpenCensus for
* gRPC. Acts as a bridge between the HttpTextPropagator interface and
* gRPC. Acts as a bridge between the TextMapPropagator interface and
* the binary encoding/decoding that happens in the supporting
* BinaryTraceContext class.
*/
export class GrpcCensusPropagator implements HttpTextPropagator {
export class GrpcCensusPropagator implements TextMapPropagator {
/**
* Injects trace propagation context into the carrier after encoding
* in binary format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/

import * as assert from 'assert';
import { SpanContext, TraceFlags } from '@opentelemetry/api';
import { Context } from '@opentelemetry/context-base';
import { SpanContext, TraceFlags, Context } from '@opentelemetry/api';
import {
getExtractedSpanContext,
setExtractedSpanContext,
Expand Down
4 changes: 2 additions & 2 deletions propagators/opentelemetry-propagator-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"webpack": "4.43.0"
},
"dependencies": {
"@opentelemetry/api": "^0.10.1",
"@opentelemetry/core": "^0.10.1"
"@opentelemetry/api": "^0.11.0",
"@opentelemetry/core": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import {
Context,
HttpTextPropagator,
TextMapPropagator,
SpanContext,
TraceFlags,
SetterFunction,
Expand Down Expand Up @@ -44,7 +44,7 @@ export const UBER_TRACE_ID_HEADER = 'uber-trace-id';
* One byte bitmap, as two hex digits.
* Inspired by jaeger-client-node project.
*/
export class JaegerHttpTracePropagator implements HttpTextPropagator {
export class JaegerHttpTracePropagator implements TextMapPropagator {
private readonly _jaegerTraceHeader: string;

/**
Expand Down

0 comments on commit 16d3515

Please sign in to comment.