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

chore(todo): add missing span sampling test #1151

Merged
Merged
Changes from 1 commit
Commits
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
12 changes: 10 additions & 2 deletions packages/opentelemetry-node/test/NodeTracerProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,16 @@ describe('NodeTracerProvider', () => {
assert.strictEqual(span.isRecording(), false);
});

// @todo: implement
it('should start a Span with always sampling');
it('should start a Span with always sampling', () => {
dyladan marked this conversation as resolved.
Show resolved Hide resolved
dyladan marked this conversation as resolved.
Show resolved Hide resolved
provider = new NodeTracerProvider({
sampler: ALWAYS_SAMPLER,
logger: new NoopLogger(),
});
const span = provider.getTracer('default').startSpan('my-span');
assert.ok(span instanceof Span);
assert.strictEqual(span.context().traceFlags, TraceFlags.SAMPLED);
assert.strictEqual(span.isRecording(), true);
});

it('should set default attributes on span', () => {
const defaultAttributes = {
Expand Down