constants.go 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.15.1dev"
  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. // TracerUUIDTagKey used to report UUID of the client process.
  34. TracerUUIDTagKey = "client-uuid"
  35. // SamplerTypeTagKey reports which sampler was used on the root span.
  36. SamplerTypeTagKey = "sampler.type"
  37. // SamplerParamTagKey reports the parameter of the sampler, like sampling probability.
  38. SamplerParamTagKey = "sampler.param"
  39. // TraceContextHeaderName is the http header name used to propagate tracing context.
  40. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  41. TraceContextHeaderName = "uber-trace-id"
  42. // TracerStateHeaderName is deprecated.
  43. // Deprecated: use TraceContextHeaderName
  44. TracerStateHeaderName = TraceContextHeaderName
  45. // TraceBaggageHeaderPrefix is the prefix for http headers used to propagate baggage.
  46. // This must be in lower-case to avoid mismatches when decoding incoming headers.
  47. TraceBaggageHeaderPrefix = "uberctx-"
  48. // SamplerTypeConst is the type of sampler that always makes the same decision.
  49. SamplerTypeConst = "const"
  50. // SamplerTypeRemote is the type of sampler that polls Jaeger agent for sampling strategy.
  51. SamplerTypeRemote = "remote"
  52. // SamplerTypeProbabilistic is the type of sampler that samples traces
  53. // with a certain fixed probability.
  54. SamplerTypeProbabilistic = "probabilistic"
  55. // SamplerTypeRateLimiting is the type of sampler that samples
  56. // only up to a fixed number of traces per second.
  57. SamplerTypeRateLimiting = "ratelimiting"
  58. // SamplerTypeLowerBound is the type of sampler that samples
  59. // at least a fixed number of traces per second.
  60. SamplerTypeLowerBound = "lowerbound"
  61. // DefaultUDPSpanServerHost is the default host to send the spans to, via UDP
  62. DefaultUDPSpanServerHost = "localhost"
  63. // DefaultUDPSpanServerPort is the default port to send the spans to, via UDP
  64. DefaultUDPSpanServerPort = 6831
  65. // DefaultMaxTagValueLength is the default max length of byte array or string allowed in the tag value.
  66. DefaultMaxTagValueLength = 256
  67. )