Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

debug MetricWrapperBase.remove function#386

Closed
leileiwan wants to merge 6 commits intoprometheus:masterprometheus/client_python:masterfrom
leileiwan:masterleileiwan/client_python:masterCopy head branch name to clipboard
Closed

debug MetricWrapperBase.remove function#386
leileiwan wants to merge 6 commits intoprometheus:masterprometheus/client_python:masterfrom
leileiwan:masterleileiwan/client_python:masterCopy head branch name to clipboard

Conversation

@leileiwan
Copy link

Hello,I am using client_python for developing our exporter,thanks for so convenient tool.

In our project, we don't want some of our metrics to be captured, so we should use MetricWrapperBase's remove function.But when self._metrics is empty or "labelvalues" not in self._metrics, our exporter will stop because of "key error". As a user of the tool,I want some more information not just key error.what's worse,I don't want my exporter to be stoped. It would be better if just some warnings, because we have to be sure that some values of labels are not captured, but we cannot be sure that whether the value-tuples are in self._metrics or not.

@brian-brazil
Copy link
Contributor

This sort of printlining does not belong in a library like this. I'd suggest not putting in data you don't want to be there in the first place.

@leileiwan leileiwan closed this May 16, 2019
@leileiwan
Copy link
Author

yes,you are right.

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

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.