View Source OpenTelemetry.SemConv.Incubating.FileAttributes (OpenTelemetry.SemConv v1.27.0)
OpenTelemetry Semantic Conventions for File attributes.
Summary
Functions
Directory where the file is located. It should include the drive letter, when appropriate.
File extension, excluding the leading dot.
Name of the file including the extension, without the directory.
Full path to the file, including the file name. It should include the drive letter, when appropriate.
File size in bytes.
Functions
@spec file_directory() :: :"file.directory"
Directory where the file is located. It should include the drive letter, when appropriate.
Value type
Value must be of type atom() | String.t()
.
Examples
["/home/user", "C:\Program Files\MyApp"]
iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_directory()
:"file.directory"
?FILE_DIRECTORY.
'file.directory'
@spec file_extension() :: :"file.extension"
File extension, excluding the leading dot.
Value type
Value must be of type atom() | String.t()
.
Notes
When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
Examples
["png", "gz"]
iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_extension()
:"file.extension"
?FILE_EXTENSION.
'file.extension'
@spec file_name() :: :"file.name"
Name of the file including the extension, without the directory.
Value type
Value must be of type atom() | String.t()
.
Examples
["example.png"]
iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_name()
:"file.name"
?FILE_NAME.
'file.name'
@spec file_path() :: :"file.path"
Full path to the file, including the file name. It should include the drive letter, when appropriate.
Value type
Value must be of type atom() | String.t()
.
Examples
["/home/alice/example.png", "C:\Program Files\MyApp\myapp.exe"]
iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_path()
:"file.path"
?FILE_PATH.
'file.path'
@spec file_size() :: :"file.size"
File size in bytes.
Value type
Value must be of type integer()
.
iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_size()
:"file.size"
?FILE_SIZE.
'file.size'