Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new ECS file namespace #732

Merged
merged 11 commits into from
Mar 28, 2024
22 changes: 22 additions & 0 deletions .chloggen/file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: file

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add new file namespace

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [732]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Currently, the following namespaces exist:
* [Disk](disk.md)
* [Error](error.md)
* [Exception](exception.md)
* [File](file.md)
* [Host](host.md)
* [HTTP](http.md)
* [K8s](k8s.md)
Expand Down
18 changes: 18 additions & 0 deletions docs/attributes-registry/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# File

## 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` |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
| `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. | |

**[1]:** When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
<!-- endsemconv -->
33 changes: 33 additions & 0 deletions model/registry/file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
groups:
- id: registry.file
prefix: file
type: attribute_group
brief: "Describes file attributes."
attributes:
- id: directory
type: string
brief: >
Directory where the file is located. It should include the drive letter, when appropriate.
examples: ['/home/user', 'C:\Program Files\MyApp']
- id: extension
type: string
brief: >
File extension, excluding the leading dot.
examples: ['png', 'gz']
note: >
When the file name has multiple extensions (example.tar.gz), only the last one should
be captured ("gz", not "tar.gz").
- id: name
type: string
brief: >
Name of the file including the extension, without the directory.
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.
examples: ['/home/alice/example.png', 'C:\Program Files\MyApp\myapp.exe']
- id: size
type: int
brief: >
File size in bytes.
Loading