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

feat: Setup initial metrics infrastructure #289

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

CosmicHorrorDev
Copy link
Collaborator

@CosmicHorrorDev CosmicHorrorDev commented Mar 26, 2024

This adds something that I've been wanting implemented for a while. Metrics recording and emission 🎉

There's a new section in the config file that sets the metrics recorder

[debug]
metrics = "log"
# -- or --
metrics = "tcp"

It's unset by default which uses the noop recorder (aka as cheap as it can get)

Log Recorder

(this one took a bit of work since it implements a recorder from "scratch")

When it's set to "log" the metrics start getting recorded as tracing events with some metadata attached on the span. This makes it possible to filter things pretty dynamically, and is accessible as a user doesn't need to download anything else to see the values

image

TCP Recorder

When it's set to "tcp" the metrics get emitted following the default metrics-exporter-tcp configuration. This means that anything that knows how to consume that can handle displaying the data live. Currently the only main program I know of is the metrics-observer binary crate, but it's unfortunately a bit limited

metrics_observer.mp4

@CosmicHorrorDev CosmicHorrorDev added the C-enhancement Category: New feature or request label Mar 26, 2024
@CosmicHorrorDev
Copy link
Collaborator Author

I think it'd be worth investigating different recorders to see if we can find more featureful ones, and document any relevant findings (including the new cfg and config stuff from this PR)

@CosmicHorrorDev CosmicHorrorDev merged commit d0b6b1f into Inlyne-Project:main Mar 26, 2024
9 checks passed
@CosmicHorrorDev CosmicHorrorDev deleted the setup-metrics branch April 6, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant