Skip to content

Commit

Permalink
chore: sampler gets a full context (open-telemetry#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Feb 18, 2021
1 parent 0e4e4f6 commit 1036e53
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions api/src/trace/Sampler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

import { SpanContext } from './span_context';
import { SpanKind } from './span_kind';
import { Context } from '@opentelemetry/context-base';
import { Attributes } from './attributes';
import { Link } from './link';
import { SamplingResult } from './SamplingResult';
import { SpanKind } from './span_kind';

/**
* This interface represent a sampler. Sampling is a mechanism to control the
Expand All @@ -29,8 +29,7 @@ export interface Sampler {
/**
* Checks whether span needs to be created and tracked.
*
* @param parentContext Parent span context. Typically taken from the wire.
* Can be null.
* @param context Parent Context which may contain a span.
* @param traceId of the span to be created. It can be different from the
* traceId in the {@link SpanContext}. Typically in situations when the
* span to be created starts a new trace.
Expand All @@ -42,7 +41,7 @@ export interface Sampler {
* @returns a {@link SamplingResult}.
*/
shouldSample(
parentContext: SpanContext | undefined,
context: Context,
traceId: string,
spanName: string,
spanKind: SpanKind,
Expand Down

0 comments on commit 1036e53

Please sign in to comment.