shouldSample method

  1. @override
SamplingResult shouldSample(
  1. Context context,
  2. TraceId traceId,
  3. String spanName,
  4. SpanKind spanKind,
  5. List<Attribute> spanAttributes,
  6. List<SpanLink> spanLinks,
)
override

Implementation

@override
sdk.SamplingResult shouldSample(
    api.Context context,
    api.TraceId traceId,
    String spanName,
    api.SpanKind spanKind,
    List<api.Attribute> spanAttributes,
    List<api.SpanLink> spanLinks) {
  return sdk.SamplingResult(sdk.Decision.recordAndSample, spanAttributes,
      api.spanContextFromContext(context).traceState);
}