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

mock command #20

Open
emschwartz opened this issue Jun 7, 2023 · 2 comments
Open

mock command #20

emschwartz opened this issue Jun 7, 2023 · 2 comments

Comments

@emschwartz
Copy link

It would be nice if the CLI could serve an endpoint that would expose metrics that mock traffic on your service, using the actual function names from your code. It would probably want to use the same static analysis that we've discussed elsewhere to see what the function names are.

Ideally, it would also figure out the caller label, but that's harder.

Also, it might be nice if you had a visual dashboard with a bunch of knobs you could use to adjust the traffic and potentially errors for specific functions.

This, or something like it, would be one way of testing out your alerts or doing manual integration tests with them.

@hatchan
Copy link
Contributor

hatchan commented Jun 8, 2023

We could also combine this with grabbing characteristics from a already running Prometheus. Ie. the functions that are already in there could be queried to see how many times the fn gets called, which functions call it and which functions it calls. That data could then be saved into a file, which the mock function can then use.

Of course if you are just starting out with autometrics then you won't have any data.

@mies
Copy link
Member

mies commented Jun 8, 2023

We could perhaps supply some kind of seed scripts for slow or erroring traffic that could be applied to the functions and then write it to the Prometheus database for when you are staring out and have no data

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

No branches or pull requests

3 participants