SamplingResult.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * https://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
  18. * A sampling decision that determines how a {@link Span} will be recorded
  19. * and collected.
  20. */
  21. export var SamplingDecision;
  22. (function (SamplingDecision) {
  23. /**
  24. * `Span.isRecording() === false`, span will not be recorded and all events
  25. * and attributes will be dropped.
  26. */
  27. SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
  28. /**
  29. * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
  30. * MUST NOT be set.
  31. */
  32. SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
  33. /**
  34. * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
  35. * MUST be set.
  36. */
  37. SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
  38. })(SamplingDecision || (SamplingDecision = {}));
  39. //# sourceMappingURL=SamplingResult.js.map