dotnet-monitor
dotnet-monitor copied to clipboard
Customize artifact names
Consider allowing configuration around artifact file names. For example:
- Name with placeholders for pid, process name, hostname, timestamp
- Ambient information such as environment variables that indicate pods/container info
Related to https://github.com/dotnet/dotnet-monitor/pull/2290
Welcome to dotnet-monitor!
Thanks for creating your first issue; let us know what you think of dotnet-monitor by filling out our survey.
Tentative design for this will be to create additional configuration with a default pattern that can be applied to each artifact type. This would include our typical substitution tokens, such as $(Process.Pid) ${Process.Name)
. We would likely expand this to include information such as $(Timestamp)
and ideally $(Environment.EnvValue)
.
Note that this would apply to all artifacts of that type, not a specific egress configuration. The pattern would also not apply to direct Api based downloads.
I think this would be a great change! Especially so it could align with the createdump
tool that's included in the runtime. We could use the same identifiers in the pattern: https://learn.microsoft.com/en-us/dotnet/core/diagnostics/collect-dumps-crash#file-path-templates
Specifier | Value |
---|---|
%% | A single % character |
%p | PID of dumped process |
%e | The process executable filename |
%h | Host name return by gethostname() |
%t | Time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC) |