autometrics-dev / am

Autometrics Companion CLI app
Apache License 2.0
16 stars 2 forks source link

`mock` command #20

Open emschwartz opened 1 year ago

emschwartz commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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