dotnet-monitor icon indicating copy to clipboard operation
dotnet-monitor copied to clipboard

Customize artifact names

Open wiktork opened this issue 1 year ago • 3 comments

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

wiktork avatar Mar 10 '23 02:03 wiktork

Welcome to dotnet-monitor!

Thanks for creating your first issue; let us know what you think of dotnet-monitor by filling out our survey.

github-actions[bot] avatar Mar 10 '23 02:03 github-actions[bot]

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.

wiktork avatar Mar 10 '23 20:03 wiktork

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)

wsugarman avatar Oct 20 '23 15:10 wsugarman