code_attributes.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace code
  16. {
  17. /**
  18. Deprecated, use @code code.column.number @endcode
  19. @deprecated
  20. {"note": "Replaced by @code code.column.number @endcode.", "reason": "renamed", "renamed_to":
  21. "code.column.number"}
  22. */
  23. OPENTELEMETRY_DEPRECATED static constexpr const char *kCodeColumn = "code.column";
  24. /**
  25. The column number in @code code.file.path @endcode best representing the operation. It SHOULD
  26. point within the code unit named in @code code.function.name @endcode. This attribute MUST NOT be
  27. used on the Profile signal since the data is already captured in 'message Line'. This constraint
  28. is imposed to prevent redundancy and maintain data integrity.
  29. */
  30. static constexpr const char *kCodeColumnNumber = "code.column.number";
  31. /**
  32. The source code file name that identifies the code unit as uniquely as possible (preferably an
  33. absolute file path). This attribute MUST NOT be used on the Profile signal since the data is
  34. already captured in 'message Function'. This constraint is imposed to prevent redundancy and
  35. maintain data integrity.
  36. */
  37. static constexpr const char *kCodeFilePath = "code.file.path";
  38. /**
  39. Deprecated, use @code code.file.path @endcode instead
  40. @deprecated
  41. {"note": "Replaced by @code code.file.path @endcode.", "reason": "renamed", "renamed_to":
  42. "code.file.path"}
  43. */
  44. OPENTELEMETRY_DEPRECATED static constexpr const char *kCodeFilepath = "code.filepath";
  45. /**
  46. Deprecated, use @code code.function.name @endcode instead
  47. @deprecated
  48. {"note": "Value should be included in @code code.function.name @endcode which is expected to be a
  49. fully-qualified name.\n", "reason": "uncategorized"}
  50. */
  51. OPENTELEMETRY_DEPRECATED static constexpr const char *kCodeFunction = "code.function";
  52. /**
  53. The method or function fully-qualified name without arguments. The value should fit the natural
  54. representation of the language runtime, which is also likely the same used within @code
  55. code.stacktrace @endcode attribute value. This attribute MUST NOT be used on the Profile signal
  56. since the data is already captured in 'message Function'. This constraint is imposed to prevent
  57. redundancy and maintain data integrity. <p> Values and format depends on each language runtime,
  58. thus it is impossible to provide an exhaustive list of examples. The values are usually the same
  59. (or prefixes of) the ones found in native stack trace representation stored in
  60. @code code.stacktrace @endcode without information on arguments.
  61. <p>
  62. Examples:
  63. <ul>
  64. <li>Java method: @code com.example.MyHttpService.serveRequest @endcode</li>
  65. <li>Java anonymous class method: @code com.mycompany.Main$1.myMethod @endcode</li>
  66. <li>Java lambda method: @code com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod
  67. @endcode</li> <li>PHP function: @code GuzzleHttp\Client::transfer @endcode</li> <li>Go function:
  68. @code github.com/my/repo/pkg.foo.func5 @endcode</li> <li>Elixir: @code OpenTelemetry.Ctx.new
  69. @endcode</li> <li>Erlang: @code opentelemetry_ctx:new @endcode</li> <li>Rust: @code
  70. playground::my_module::my_cool_func @endcode</li> <li>C function: @code fopen @endcode</li>
  71. </ul>
  72. */
  73. static constexpr const char *kCodeFunctionName = "code.function.name";
  74. /**
  75. The line number in @code code.file.path @endcode best representing the operation. It SHOULD point
  76. within the code unit named in @code code.function.name @endcode. This attribute MUST NOT be used
  77. on the Profile signal since the data is already captured in 'message Line'. This constraint is
  78. imposed to prevent redundancy and maintain data integrity.
  79. */
  80. static constexpr const char *kCodeLineNumber = "code.line.number";
  81. /**
  82. Deprecated, use @code code.line.number @endcode instead
  83. @deprecated
  84. {"note": "Replaced by @code code.line.number @endcode.", "reason": "renamed", "renamed_to":
  85. "code.line.number"}
  86. */
  87. OPENTELEMETRY_DEPRECATED static constexpr const char *kCodeLineno = "code.lineno";
  88. /**
  89. Deprecated, namespace is now included into @code code.function.name @endcode
  90. @deprecated
  91. {"note": "Value should be included in @code code.function.name @endcode which is expected to be a
  92. fully-qualified name.\n", "reason": "uncategorized"}
  93. */
  94. OPENTELEMETRY_DEPRECATED static constexpr const char *kCodeNamespace = "code.namespace";
  95. /**
  96. A stacktrace as a string in the natural representation for the language runtime. The
  97. representation is identical to <a
  98. href="/docs/exceptions/exceptions-spans.md#stacktrace-representation">@code exception.stacktrace
  99. @endcode</a>. This attribute MUST NOT be used on the Profile signal since the data is already
  100. captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data
  101. integrity.
  102. */
  103. static constexpr const char *kCodeStacktrace = "code.stacktrace";
  104. } // namespace code
  105. } // namespace semconv
  106. OPENTELEMETRY_END_NAMESPACE