file_attributes.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 file
  16. {
  17. /**
  18. Time when the file was last accessed, in ISO 8601 format.
  19. <p>
  20. This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.
  21. */
  22. static constexpr const char *kFileAccessed = "file.accessed";
  23. /**
  24. Array of file attributes.
  25. <p>
  26. Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected
  27. for this attribute: @code archive @endcode, @code compressed @endcode, @code directory @endcode,
  28. @code encrypted @endcode, @code execute @endcode, @code hidden @endcode, @code immutable @endcode,
  29. @code journaled @endcode, @code read @endcode, @code readonly @endcode, @code symbolic link
  30. @endcode, @code system @endcode, @code temporary @endcode, @code write @endcode.
  31. */
  32. static constexpr const char *kFileAttributes = "file.attributes";
  33. /**
  34. Time when the file attributes or metadata was last changed, in ISO 8601 format.
  35. <p>
  36. @code file.changed @endcode captures the time when any of the file's properties or attributes
  37. (including the content) are changed, while @code file.modified @endcode captures the timestamp
  38. when the file content is modified.
  39. */
  40. static constexpr const char *kFileChanged = "file.changed";
  41. /**
  42. Time when the file was created, in ISO 8601 format.
  43. <p>
  44. This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.
  45. */
  46. static constexpr const char *kFileCreated = "file.created";
  47. /**
  48. Directory where the file is located. It should include the drive letter, when appropriate.
  49. */
  50. static constexpr const char *kFileDirectory = "file.directory";
  51. /**
  52. File extension, excluding the leading dot.
  53. <p>
  54. When the file name has multiple extensions (example.tar.gz), only the last one should be captured
  55. ("gz", not "tar.gz").
  56. */
  57. static constexpr const char *kFileExtension = "file.extension";
  58. /**
  59. Name of the fork. A fork is additional data associated with a filesystem object.
  60. <p>
  61. On Linux, a resource fork is used to store additional data with a filesystem object. A file always
  62. has at least one fork for the data portion, and additional forks may exist. On NTFS, this is
  63. analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called
  64. $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet.
  65. An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name
  66. is the value that should populate @code fork_name @endcode. @code filename.extension @endcode
  67. should populate @code file.name @endcode, and @code extension @endcode should populate @code
  68. file.extension @endcode. The full path, @code file.path @endcode, will include the fork name.
  69. */
  70. static constexpr const char *kFileForkName = "file.fork_name";
  71. /**
  72. Primary Group ID (GID) of the file.
  73. */
  74. static constexpr const char *kFileGroupId = "file.group.id";
  75. /**
  76. Primary group name of the file.
  77. */
  78. static constexpr const char *kFileGroupName = "file.group.name";
  79. /**
  80. Inode representing the file in the filesystem.
  81. */
  82. static constexpr const char *kFileInode = "file.inode";
  83. /**
  84. Mode of the file in octal representation.
  85. */
  86. static constexpr const char *kFileMode = "file.mode";
  87. /**
  88. Time when the file content was last modified, in ISO 8601 format.
  89. */
  90. static constexpr const char *kFileModified = "file.modified";
  91. /**
  92. Name of the file including the extension, without the directory.
  93. */
  94. static constexpr const char *kFileName = "file.name";
  95. /**
  96. The user ID (UID) or security identifier (SID) of the file owner.
  97. */
  98. static constexpr const char *kFileOwnerId = "file.owner.id";
  99. /**
  100. Username of the file owner.
  101. */
  102. static constexpr const char *kFileOwnerName = "file.owner.name";
  103. /**
  104. Full path to the file, including the file name. It should include the drive letter, when
  105. appropriate.
  106. */
  107. static constexpr const char *kFilePath = "file.path";
  108. /**
  109. File size in bytes.
  110. */
  111. static constexpr const char *kFileSize = "file.size";
  112. /**
  113. Path to the target of a symbolic link.
  114. <p>
  115. This attribute is only applicable to symbolic links.
  116. */
  117. static constexpr const char *kFileSymbolicLinkTargetPath = "file.symbolic_link.target_path";
  118. } // namespace file
  119. } // namespace semconv
  120. OPENTELEMETRY_END_NAMESPACE