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 new baggage span processor package #2114

Merged
merged 28 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7d57c81
Add new baggage span processor package
MikeGoldsmith Apr 18, 2024
893f630
add new package to release manifest
MikeGoldsmith Apr 18, 2024
eaf075b
tweak version in release manifest
MikeGoldsmith Apr 18, 2024
3cd9506
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 18, 2024
b7b2294
update package directory structure
MikeGoldsmith Apr 18, 2024
d43f5c2
Merge branch 'mike/baggage-span-processor' of github.com:honeycombio/…
MikeGoldsmith Apr 18, 2024
c7abc66
update readme title
MikeGoldsmith Apr 18, 2024
fbf0a47
add link to baggage docs
MikeGoldsmith Apr 19, 2024
88b02d2
add example to readme
MikeGoldsmith Apr 19, 2024
b6ce13f
update baggage span processor to implement SpanProcessor interface
MikeGoldsmith Apr 19, 2024
c38a7bd
add entry to component_owners
MikeGoldsmith Apr 19, 2024
4c762a2
fix linting errors
MikeGoldsmith Apr 19, 2024
1d3a86d
Apply suggestions from code review
MikeGoldsmith Apr 22, 2024
7d50c88
Update readme with cleaner example
MikeGoldsmith Apr 22, 2024
aad1ebc
Remove OTel API from "dependencies"
MikeGoldsmith Apr 22, 2024
67252b4
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 22, 2024
d3a73f7
add src/index.js that exports processor
MikeGoldsmith Apr 22, 2024
010d435
add processor to release-please-config
MikeGoldsmith Apr 22, 2024
3552c9e
add tests for no-op funcs
MikeGoldsmith Apr 22, 2024
1120b25
make src/index a ts file
MikeGoldsmith Apr 22, 2024
bff0fc0
Merge branch 'main' into mike/baggage-span-processor
JamieDanielson Apr 23, 2024
c1db4a3
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 25, 2024
c59eaba
Merge branch 'main' of github.com:honeycombio/opentelemetry-js-contri…
MikeGoldsmith Apr 25, 2024
a19ef40
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 26, 2024
2d0c7d8
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 29, 2024
a2a7281
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith Apr 30, 2024
b0c35a6
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith May 2, 2024
ae60cae
Merge branch 'main' into mike/baggage-span-processor
MikeGoldsmith May 2, 2024
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
Prev Previous commit
Next Next commit
fix linting errors
  • Loading branch information
MikeGoldsmith committed Apr 19, 2024
commit 4c762a2d920d2aafd718ef8e8504c9070799a99a
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export class BaggageSpanProcessor implements SpanProcessor {
*/
onStart(span: Span, parentContext: Context): void {
(propagation.getBaggage(parentContext)?.getAllEntries() ?? []).forEach(
(entry) => {
entry => {
span.setAttribute(entry[0], entry[1].value);
},
}
);
}

Expand All @@ -69,7 +69,7 @@ export class BaggageSpanProcessor implements SpanProcessor {
* returns true.
* @param span the Span that just ended.
*/
onEnd(span: ReadableSpan): void {
onEnd(_: ReadableSpan): void {
// no-op
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
import { BasicTracerProvider, Span } from '@opentelemetry/sdk-trace-base';
import { expect } from 'expect';


describe('BaggageSpanProcessor', () => {
const baggageProcessor = new BaggageSpanProcessor();

Expand All @@ -48,7 +47,7 @@ describe('BaggageSpanProcessor', () => {
spanId: '7e0c63257de34c92',
traceFlags: TraceFlags.SAMPLED,
},
SpanKind.SERVER,
SpanKind.SERVER
);
});

Expand Down
Loading