telemetry_attributes.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright The OpenTelemetry 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 enum import Enum
  15. from typing import Final
  16. TELEMETRY_SDK_LANGUAGE: Final = "telemetry.sdk.language"
  17. """
  18. The language of the telemetry SDK.
  19. """
  20. TELEMETRY_SDK_NAME: Final = "telemetry.sdk.name"
  21. """
  22. The name of the telemetry SDK as defined above.
  23. Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
  24. If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
  25. `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
  26. or another suitable identifier depending on the language.
  27. The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
  28. All custom identifiers SHOULD be stable across different versions of an implementation.
  29. """
  30. TELEMETRY_SDK_VERSION: Final = "telemetry.sdk.version"
  31. """
  32. The version string of the telemetry SDK.
  33. """
  34. class TelemetrySdkLanguageValues(Enum):
  35. CPP = "cpp"
  36. """cpp."""
  37. DOTNET = "dotnet"
  38. """dotnet."""
  39. ERLANG = "erlang"
  40. """erlang."""
  41. GO = "go"
  42. """go."""
  43. JAVA = "java"
  44. """java."""
  45. NODEJS = "nodejs"
  46. """nodejs."""
  47. PHP = "php"
  48. """php."""
  49. PYTHON = "python"
  50. """python."""
  51. RUBY = "ruby"
  52. """ruby."""
  53. RUST = "rust"
  54. """rust."""
  55. SWIFT = "swift"
  56. """swift."""
  57. WEBJS = "webjs"
  58. """webjs."""