priority.go 1.1 KB

123456789101112131415161718192021222324252627
  1. // Unless explicitly stated otherwise all files in this repository are licensed
  2. // under the Apache License Version 2.0.
  3. // This product includes software developed at Datadog (https://www.datadoghq.com/).
  4. // Copyright 2016 Datadog, Inc.
  5. package ext
  6. // Priority is a hint given to the backend so that it knows which traces to reject or kept.
  7. // In a distributed context, it should be set before any context propagation (fork, RPC calls) to be effective.
  8. const (
  9. // PriorityUserReject informs the backend that a trace should be rejected and not stored.
  10. // This should be used by user code or configuration overriding default priority
  11. PriorityUserReject = -1
  12. // PriorityAutoReject informs the backend that a trace should be rejected and not stored.
  13. // This is used by the builtin sampler.
  14. PriorityAutoReject = 0
  15. // PriorityAutoKeep informs the backend that a trace should be kept and not stored.
  16. // This is used by the builtin sampler.
  17. PriorityAutoKeep = 1
  18. // PriorityUserKeep informs the backend that a trace should be kept and not stored.
  19. // This should be used by user code or configuration overriding default priority
  20. PriorityUserKeep = 2
  21. )