question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

metric.remove potentially broken

See original GitHub issue

First of all: Nice work! prom-client is my go-to prometheus exporter lib for node-based services! ❤

I think the metric.remove method added in #242 needs to be reworked because there is no safe way to hand over multiple label/value pairs. Or maybe I’m missing something.

Given a gauge metric, that I used to track this value:

metric.set({
	first: "foo",
	second: "bar",
}, 1337)

I call metric.remove("foo", "bar") and I have to rely on js object-key ordering, which works in V8, but is not guaranteed in the language spec.

What I’d like to call is:

metric.remove({
	first: "foo",
	second: "bar",
});

Edit: Formatting

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
erdiicommented, Sep 17, 2019

uh uh… i was not assigned and totally forgot about this one. will tackle it in the next weeks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using metrics to remove bottlenecks and support your team
Teams that use metrics to pinpoint and remove bottlenecks and slowdowns are ultimately more efficient, more productive, and happier.
Read more >
In Prometheus, is there a way to detect if a particular metric ...
In Prometheus, is there a way to detect if a particular metric stops being emitted broken down by host using just one query?...
Read more >
Improve Performance by removing 20 metric tons of broken ...
Step 7. Click the "Replace in Files" Button, and wait for NP++ to finish up. That's it! Disclaimer: This will delete all glass...
Read more >
Schema checks - Apollo GraphQL Docs
Potentially breaking changes. Removals. These changes remove a schema element. If a removed element is actively being used by an operation, that operation...
Read more >
Instrumentation - Prometheus.io
Every library, subsystem and service should have at least a few metrics to ... For monitoring purposes, services can generally be broken down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found