Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: adding timestamp in the output of dlv trace #3356

Closed
spacewander opened this issue May 5, 2023 · 2 comments · Fixed by #3358
Closed

Feature request: adding timestamp in the output of dlv trace #3356

spacewander opened this issue May 5, 2023 · 2 comments · Fixed by #3358

Comments

@spacewander
Copy link
Contributor

Please answer the following before submitting your issue:

  1. What version of Delve are you using (dlv version)? 1.20.2
  2. What version of Go are you using? (go version)? go version go1.20.3 darwin/arm64
  3. What operating system and processor architecture are you using? ARM64
  4. What did you do? Use go trace
  5. What did you expect to see? output with timestamp
  6. What did you see instead?

It would be great to add timestamp in the trace output so that the users can sync the function call with the application log or other external source.

For example, the current output is:

> goroutine(1967): ...

We can add a timestamp at the beginning of each line like:

2023-05-05 12:00:00.123 > goroutine(1967): ...

Some trace tools like strace have several options to enable timestamp, which is quite helpful.

@spacewander
Copy link
Contributor Author

I could submit a PR for it if this feature is accepted.

@aarzilli
Copy link
Member

aarzilli commented May 5, 2023

I think it's fine to do but it should be behind a flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants