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: add metrics host functions #112

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

tqwewe
Copy link
Member

@tqwewe tqwewe commented Mar 28, 2023

This PR implements guest functionality for metrics including tracing, counters, and histograms.
It is dependent on lunatic-solutions/lunatic#202.

  • Add documentation for macros in metrics module.

Macros are added for logging, including span!, info!, warn!, error!, trace!.
These macros are modified directly from the rust tracing crate, and the syntax is essentially identical.

Additionally, there are new types for creating metrics including:

  • Meter
  • Counter
  • Histogram

The best place to see usage of all of it is in examples/metrics.rs.

Running lunatic with --jaeger <url> will attempt to push tracing to a jaeger endpoint.
Running lunatic with --prometheus <url> will make the runtime serve metrics available at http://localhost:9927/metrics

@tqwewe tqwewe marked this pull request as ready for review April 6, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant