constants.go 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Copyright (c) 2016 Uber Technologies, Inc.
  2. // Permission is hereby granted, free of charge, to any person obtaining a copy
  3. // of this software and associated documentation files (the "Software"), to deal
  4. // in the Software without restriction, including without limitation the rights
  5. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6. // copies of the Software, and to permit persons to whom the Software is
  7. // furnished to do so, subject to the following conditions:
  8. //
  9. // The above copyright notice and this permission notice shall be included in
  10. // all copies or substantial portions of the Software.
  11. //
  12. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. // THE SOFTWARE.
  19. package jaeger
  20. const (
  21. // JaegerClientVersion is the version of the client library reported as Span tag.
  22. JaegerClientVersion = "Go-2.9.1dev"
  23. // JaegerClientVersionTagKey is the name of the tag used to report client version.
  24. JaegerClientVersionTagKey = "jaeger.version"
  25. // JaegerDebugHeader is the name of HTTP header or a TextMap carrier key which,
  26. // if found in the carrier, forces the trace to be sampled as "debug" trace.
  27. // The value of the header is recorded as the tag on the root span, so that the
  28. // trace can be found in the UI using this value as a correlation ID.
  29. JaegerDebugHeader = "jaeger-debug-id"
  30. // JaegerBaggageHeader is the name of the HTTP header that is used to submit baggage.
  31. // It differs from TraceBaggageHeaderPrefix in that it can be used only in cases where
  32. // a root span does not exist.
  33. JaegerBaggageHeader = "jaeger-baggage"
  34. // TracerHostnameTagKey used to report host name of the process.
  35. TracerHostnameTagKey = "hostname"
  36. // TracerIPTagKey used to report ip of the process.
  37. TracerIPTagKey = "ip"
  38. // SamplerTypeTagKey reports which sampler was used on the root span.
  39. SamplerTypeTagKey = "sampler.type"
  40. // SamplerParamTagKey reports the parameter of the sampler, like sampling probability.
  41. SamplerParamTagKey = "sampler.param"
  42. // TraceContextHeaderName is the http header name used to propagate tracing context.
  43. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  44. TraceContextHeaderName = "uber-trace-id"
  45. // TracerStateHeaderName is deprecated.
  46. // Deprecated: use TraceContextHeaderName
  47. TracerStateHeaderName = TraceContextHeaderName
  48. // TraceBaggageHeaderPrefix is the prefix for http headers used to propagate baggage.
  49. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  50. TraceBaggageHeaderPrefix = "uberctx-"
  51. // SamplerTypeConst is the type of sampler that always makes the same decision.
  52. SamplerTypeConst = "const"
  53. // SamplerTypeRemote is the type of sampler that polls Jaeger agent for sampling strategy.
  54. SamplerTypeRemote = "remote"
  55. // SamplerTypeProbabilistic is the type of sampler that samples traces
  56. // with a certain fixed probability.
  57. SamplerTypeProbabilistic = "probabilistic"
  58. // SamplerTypeRateLimiting is the type of sampler that samples
  59. // only up to a fixed number of traces per second.
  60. SamplerTypeRateLimiting = "ratelimiting"
  61. // SamplerTypeLowerBound is the type of sampler that samples
  62. // only up to a fixed number of traces per second.
  63. SamplerTypeLowerBound = "lowerbound"
  64. )