Similar to how dotnet dump collect names dumps with a timestamp.
I believe this was a conscious decision so that you could know the name of the trace file _a priori_ and to get a specific name, you must use the -o|--output option.
Why are collecting dumps different? What I dislike about it us that it forces me to come up with a unique name and full output path just to rename the files. Also my trace files end up being overwritten, which is unfortunate.
I also prefer the naming with timestamp.
But if we keep with the trace.nettrace name, I think we should change it to never overwrite another trace, appending a number in the end.
I believe this was a conscious decision so that you could know the name of the trace file a priori and to get a specific name, you must use the -o|--output option.
I would think if you needed to know the name of the file in advance you could use -o. It is easier to pass trace.nettrace than it is to pass a file and with the current date and process name.
What I dislike about it us that it forces me to come up with a unique name and full output path just to rename the files. Also my trace files end up being overwritten, which is unfortunate.
I can probably provide some info on this since I'm the one that introduced this behavior.
When we initially implemented/designed dotnet-trace, we were largely focused on getting the experience consistent between the different tracing tools we support/implemented (PerfView and PerfCollect), for users who already knew how to use PerfView. The default behavior on PerfView is that it writes a file named PerfViewData.etl.zip and overwrites the existing file. The output file's name is a required argument for PerfCollect, but it also overwrites the existing file if you give it the same name as an existing file.
That being said, if this default behavior is something that weirds out users who's never used PerfView or PerfCollect before because other tracing tools (or diagnostics tools in this repo) do something else, we can change this behavior to be named after the process and current date.
For the time being, if you want a timestamp to be in your "default", just always invoke with
-o ./myapp-$(date +%s)
if you're in bash or
-o ./myapp-(Get-Date -UFormat %s)
for powershell.
That doesn't solve the process name problem.