Replies: 1 comment
-
The metrics implementation is still in its infancy. The const counter = meter.createCounter('counter');
const boundCounter = meter.createCounter('bound_counter').bind(labels);
for (let i = 0; i < 100; i++) {
// this will bind each time
counter.add(1, labels);
// this is already bound
boundCounter.add(1);
}
// counter has been bound 100 times and incremented 100 times
// boundCounter has been bound 1 time and incremented 100 times |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we're using Open Telemetry JS to log various metrics to Prometheus. Whilst doing so we've seen a few different bits of documentation and API code that allows for this to be done in a few ways. My question is, what is the most performant way to do so.
or
https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-exporter-prometheus/README.md#usage
Beta Was this translation helpful? Give feedback.
All reactions