logs.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright The OpenTracing Authors
  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. from __future__ import absolute_import
  15. # The following log fields are described in greater detail at the
  16. # following url:
  17. # https://github.com/opentracing/specification/blob/master/semantic_conventions.md
  18. # ---------------------------------------------------------------------------
  19. # The type or "kind" of an error (only for event="error" logs). E.g.,
  20. # "Exception", "OSError"
  21. # ---------------------------------------------------------------------------
  22. ERROR_KIND = 'error.kind'
  23. # ---------------------------------------------------------------------------
  24. # The actual Exception/Error object instance itself. E.g., A python
  25. # exceptions.NameError instance
  26. # ---------------------------------------------------------------------------
  27. ERROR_OBJECT = 'error.object'
  28. # ---------------------------------------------------------------------------
  29. # A stable identifier for some notable moment in the lifetime of a Span.
  30. # For instance, a mutex lock acquisition or release or the sorts of lifetime
  31. # events in a browser page load described in the Performance.timing
  32. # specification. E.g., from Zipkin, "cs", "sr", "ss", or "cr". Or, more
  33. # generally, "initialized" or "timed out". For errors, "error"
  34. # ---------------------------------------------------------------------------
  35. EVENT = 'event'
  36. # ---------------------------------------------------------------------------
  37. # A concise, human-readable, one-line message explaining the event. E.g.,
  38. # "Could not connect to backend", "Cache invalidation succeeded"
  39. # ---------------------------------------------------------------------------
  40. MESSAGE = 'message'
  41. # ---------------------------------------------------------------------------
  42. # A stack trace in platform-conventional format; may or may not pertain to
  43. # an error.
  44. # ---------------------------------------------------------------------------
  45. STACK = 'stack'