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

feat: add jaeger http trace format (#696) #701

Merged
merged 30 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d4de43e
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
ae93d80
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
4b2a9d3
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
1a206cb
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
b7a345f
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
ee56b19
feat: add jaeger http trace format (#696)
vladislav-kiva Jan 16, 2020
0fa26ef
fix: we should set sampled\unsampled via flag
vladislav-kiva Jan 16, 2020
b0958ee
fix: we should set sampled\unsampled via flag
vladislav-kiva Jan 16, 2020
aee5f41
fix: flags should be converted to hex, not decimal
vladislav-kiva Jan 16, 2020
e946b6a
Merge branch 'master' into jaeger-format
DotSpy Jan 16, 2020
c41944c
feat: create new package for propagation jaeger
DotSpy Jan 16, 2020
6d8ebda
fix: remove unused dependencies, correct readme header, moved out jae…
DotSpy Jan 16, 2020
ba8547c
fix: added jaeger keyword
DotSpy Jan 16, 2020
126f81c
fix: remove comma
DotSpy Jan 16, 2020
49428b4
docs: replace NodeTracer with NodeTracerRegistry
DotSpy Jan 16, 2020
b94f716
fix: added missing jaeger keyword to exporter-jaeger
DotSpy Jan 16, 2020
9981ad1
Merge branch 'master' into jaeger-format
DotSpy Jan 16, 2020
6ab6a87
fix: remove test for browser
DotSpy Jan 16, 2020
21c2fed
fix: remove yarn for browser
DotSpy Jan 16, 2020
d2cd262
Merge branch 'master' into jaeger-format
DotSpy Jan 16, 2020
982e008
fix: use same naming style as other packages
DotSpy Jan 16, 2020
0d41630
feat: added index.ts and version.ts, revert test for browser
DotSpy Jan 16, 2020
89be82a
fix: tests added index-webpack.ts
vladislav-kiva Jan 17, 2020
5c3db80
test: add test with span generated by jaeger client
vladislav-kiva Jan 17, 2020
7330161
fix: apply review changes
DotSpy Jan 17, 2020
8533133
fix: move out from sub dirs
DotSpy Jan 17, 2020
8b072b3
Merge branch 'master' into jaeger-format
DotSpy Jan 17, 2020
bda9831
docs: use common language for docs
DotSpy Jan 17, 2020
e0e7b85
fix: test script fix
DotSpy Jan 17, 2020
b5c900d
Merge branch 'master' into jaeger-format
DotSpy Jan 17, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class JaegerHttpTraceFormat implements HttpTextFormat {
format: string,
carrier: { [key: string]: unknown }
) {
const hexTraceId = removeLeadingZeros(spanContext.traceId);
const hexSpanId = removeLeadingZeros(spanContext.spanId);
const flags = TraceFlags.SAMPLED;
DotSpy marked this conversation as resolved.
Show resolved Hide resolved

carrier[UBER_TRACE_ID_HEADER] = `${hexTraceId}:${hexSpanId}:0:${flags}`;
carrier[
UBER_TRACE_ID_HEADER
] = `${spanContext.traceId}:${spanContext.spanId}:0:${flags}`;
}

extract(
Expand All @@ -59,14 +59,6 @@ export class JaegerHttpTraceFormat implements HttpTextFormat {
}
}

/**
* @param {string} input - the input for which leading zeros should be removed.
* @return {string} - returns the input string without leading zeros.
**/
function removeLeadingZeros(input: string): string {
return input.replace(/^0+/, '');
}

/**
* @param {string} serializedString - a serialized span context.
* @return {SpanContext} - returns a span context represented by the serializedString.
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export * from './version';
export * from './context/propagation/B3Format';
export * from './context/propagation/BinaryTraceContext';
export * from './context/propagation/HttpTraceContext';
export * from './context/propagation/JaegerHttpTraceFormat';
DotSpy marked this conversation as resolved.
Show resolved Hide resolved
export * from './platform';
export * from './trace/globaltracer-utils';
export * from './trace/instrumentation/BasePlugin';
Expand Down