Skip to content

Commit

Permalink
experimental on file attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Mar 28, 2024
1 parent 0ccec41 commit 71ad879
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/attributes-registry/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## File Attributes

<!-- semconv registry.file(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `file.directory` | string | Directory where the file is located. It should include the drive letter, when appropriate. | `/home/user`; `C:\Program Files\MyApp` |
| `file.extension` | string | File extension, excluding the leading dot. [1] | `png`; `gz` |
| `file.name` | string | Name of the file including the extension, without the directory. | `example.png` |
| `file.path` | string | Full path to the file, including the file name. It should include the drive letter, when appropriate. | `/home/alice/example.png`; `C:\Program Files\MyApp\myapp.exe` |
| `file.size` | int | File size in bytes. | |
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `file.directory` | string | Directory where the file is located. It should include the drive letter, when appropriate. | `/home/user`; `C:\Program Files\MyApp` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.extension` | string | File extension, excluding the leading dot. [1] | `png`; `gz` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.name` | string | Name of the file including the extension, without the directory. | `example.png` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.path` | string | Full path to the file, including the file name. It should include the drive letter, when appropriate. | `/home/alice/example.png`; `C:\Program Files\MyApp\myapp.exe` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `file.size` | int | File size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
<!-- endsemconv -->
5 changes: 5 additions & 0 deletions model/registry/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ groups:
type: string
brief: >
Directory where the file is located. It should include the drive letter, when appropriate.
stability: experimental
examples: ['/home/user', 'C:\Program Files\MyApp']
- id: extension
type: string
brief: >
File extension, excluding the leading dot.
stability: experimental
examples: ['png', 'gz']
note: >
When the file name has multiple extensions (example.tar.gz), only the last one should
Expand All @@ -21,13 +23,16 @@ groups:
type: string
brief: >
Name of the file including the extension, without the directory.
stability: experimental
examples: ['example.png']
- id: path
type: string
brief: >
Full path to the file, including the file name. It should include the drive letter, when appropriate.
stability: experimental
examples: ['/home/alice/example.png', 'C:\Program Files\MyApp\myapp.exe']
- id: size
type: int
brief: >
File size in bytes.
stability: experimental

0 comments on commit 71ad879

Please sign in to comment.