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

Add stdout or file out with the latest telemetry metrics #12449

Closed
4 tasks
robert-zaremba opened this issue Jul 5, 2022 · 6 comments
Closed
4 tasks

Add stdout or file out with the latest telemetry metrics #12449

robert-zaremba opened this issue Jul 5, 2022 · 6 comments
Labels
C: telemetry Issues and features pertaining to SDK telemetry.

Comments

@robert-zaremba
Copy link
Collaborator

Summary

Follow up to: #12447

Today, we can inspect telemetry only through Prometheus or REST API server.

Problem Definition

For debugging, or internal purposes it would be helpful to be able to:

  • start in memory telemetry sink without enabling API server
  • be able to inspect telemetry

Proposal

Add additional metric display methods.
Extend app config (app.toml):

[telemetry]
# print interval metrics to stdout if set to true
stdout = false 

# save interval metric to file if not empty. will overwrite the file during each interval write
fileOutput = "filename"

The stdout mode will mix the metrics output in the log output (using INFO) with non-pretty printed JSON formatted text.

The fileOutput will save metrics to file with pretty printed JSON format.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@robert-zaremba robert-zaremba added the C: telemetry Issues and features pertaining to SDK telemetry. label Jul 5, 2022
@alexanderbez
Copy link
Contributor

Is there a reason you can't just hit the endpoint?

@robert-zaremba
Copy link
Collaborator Author

Is there a reason you can't just hit the endpoint?

If API server is not active then you can't do it. Workaround would be to enable api server and not export the ports in the firewall

@alexanderbez
Copy link
Contributor

Yes, I see that as a perfectly fine solution. As long as this file approach isn't too much technical overhead, then it's fine IMO

@robert-zaremba
Copy link
Collaborator Author

It's not an overhead. It's just dumping data to a file. That's fast and happens in parallel in a go routine. Moreover by default it will be disabled.

@tac0turtle
Copy link
Member

i dont fully see the need for this, what is the overhead that turning on the server is causing?

@tac0turtle
Copy link
Member

closing this as we should opt to use the default instead of implement custom items. This is inline with reducing maintenance burden of the current repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: telemetry Issues and features pertaining to SDK telemetry.
Projects
None yet
Development

No branches or pull requests

3 participants