constants.go 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright (c) 2017 Uber Technologies, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package jaeger
  15. const (
  16. // JaegerClientVersion is the version of the client library reported as Span tag.
  17. JaegerClientVersion = "Go-2.11.2"
  18. // JaegerClientVersionTagKey is the name of the tag used to report client version.
  19. JaegerClientVersionTagKey = "jaeger.version"
  20. // JaegerDebugHeader is the name of HTTP header or a TextMap carrier key which,
  21. // if found in the carrier, forces the trace to be sampled as "debug" trace.
  22. // The value of the header is recorded as the tag on the root span, so that the
  23. // trace can be found in the UI using this value as a correlation ID.
  24. JaegerDebugHeader = "jaeger-debug-id"
  25. // JaegerBaggageHeader is the name of the HTTP header that is used to submit baggage.
  26. // It differs from TraceBaggageHeaderPrefix in that it can be used only in cases where
  27. // a root span does not exist.
  28. JaegerBaggageHeader = "jaeger-baggage"
  29. // TracerHostnameTagKey used to report host name of the process.
  30. TracerHostnameTagKey = "hostname"
  31. // TracerIPTagKey used to report ip of the process.
  32. TracerIPTagKey = "ip"
  33. // SamplerTypeTagKey reports which sampler was used on the root span.
  34. SamplerTypeTagKey = "sampler.type"
  35. // SamplerParamTagKey reports the parameter of the sampler, like sampling probability.
  36. SamplerParamTagKey = "sampler.param"
  37. // TraceContextHeaderName is the http header name used to propagate tracing context.
  38. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  39. TraceContextHeaderName = "uber-trace-id"
  40. // TracerStateHeaderName is deprecated.
  41. // Deprecated: use TraceContextHeaderName
  42. TracerStateHeaderName = TraceContextHeaderName
  43. // TraceBaggageHeaderPrefix is the prefix for http headers used to propagate baggage.
  44. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  45. TraceBaggageHeaderPrefix = "uberctx-"
  46. // SamplerTypeConst is the type of sampler that always makes the same decision.
  47. SamplerTypeConst = "const"
  48. // SamplerTypeRemote is the type of sampler that polls Jaeger agent for sampling strategy.
  49. SamplerTypeRemote = "remote"
  50. // SamplerTypeProbabilistic is the type of sampler that samples traces
  51. // with a certain fixed probability.
  52. SamplerTypeProbabilistic = "probabilistic"
  53. // SamplerTypeRateLimiting is the type of sampler that samples
  54. // only up to a fixed number of traces per second.
  55. SamplerTypeRateLimiting = "ratelimiting"
  56. // SamplerTypeLowerBound is the type of sampler that samples
  57. // at least a fixed number of traces per second.
  58. SamplerTypeLowerBound = "lowerbound"
  59. )