Skip to content

Commit

Permalink
add new ECS file namespace (#732)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Wert <[email protected]>
  • Loading branch information
trisch-me and AlexanderWert authored Mar 28, 2024
1 parent 0e2eca5 commit 5a94098
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
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 .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ body:
- area:exception
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:host
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- area:exception
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:host
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ body:
- area:exception
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:host
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Currently, the following namespaces exist:
* [Exception](exception.md)
* [FaaS](faas.md)
* [Feature Flag](feature-flag.md)
* [File](file.md)
* [Google Cloud Run](gcp-cloud-run.md)
* [Google Compute Engine](gcp-gce.md)
* [Host](host.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` |
| `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.

0 comments on commit 5a94098

Please sign in to comment.