using the client without a server for integration testing #885
-
Hi I need to integration test a system/application and while doing that collecting metrics about it (latency, throughput etc.). Now to make my live easier I don't want to write this report manually (if I don't have to), since I would only need to collect the metrics for a single test run and export it as file so gitlab can read it I thought maybe it's possible to use the client without connecting to a server. So the client collects my metrics and exports it to a file. Can I use the client without connecting to a server' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, yes this is supported. You can generate the output using |
Beta Was this translation helpful? Give feedback.
Hello, yes this is supported. You can generate the output using
openmetrics.exposition.generate_latest
and then persist that to a file if you want to specifically use the OpenMetrics format. There is alsowrite_to_textfile
which will write metrics to a file in an atomic manner suitable for use with the node_exporter textfile collector. Note that this is in the Prometheus text format, not OpenMetrics.