Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dynatrace] Log NaNs at DEBUG instead of WARNING #3557

Merged

Conversation

pirgeo
Copy link
Contributor

@pirgeo pirgeo commented Dec 6, 2022

When the object behind the weak reference of a Gauge meter is garbage collected, it will fall back to reporting NaN. The Dynatrace exporter would generate a warning log for each NaN generated that way. This bugfix changes the code to only log the first NaN at warning level (including some hints for the user) and all subsequent NaNs at debug level to prevent spamming the logs with lots of warnings.

Is it possible to get this into 1.9.x versions, and if so, is there anything in particular that I need to do to this PR?

@pirgeo pirgeo changed the base branch from main to 1.9.x December 15, 2022 08:50
@pirgeo
Copy link
Contributor Author

pirgeo commented Dec 15, 2022

Rebased on https://github.com/micrometer-metrics/micrometer/tree/1.9.x and pointed the PR to that branch.

@pirgeo
Copy link
Contributor Author

pirgeo commented Jan 9, 2023

@jonatan-ivanov Is there anything that needs to be done to move this PR forward?

@shakuzen shakuzen added bug A general bug registry: dynatrace A Dynatrace Registry related issue labels Jan 10, 2023
@shakuzen shakuzen modified the milestones: 1.9.x, 1.9.7 Jan 10, 2023
@shakuzen shakuzen merged commit b6dc948 into micrometer-metrics:1.9.x Jan 10, 2023
@pirgeo pirgeo deleted the log-nan-debug branch January 10, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug registry: dynatrace A Dynatrace Registry related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flooded with "Could not serialize meter XXX: Value was NaN" with Dynatrace plugin
3 participants