-
Notifications
You must be signed in to change notification settings - Fork 1k
Log CloudWatch metric data when publishing fails #1396
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
Comments
@danieljamesscott Thanks for the suggestion! Sounds reasonable to me. FYI we already have error request logging for Elasticsearch. See https://github.com/micrometer-metrics/micrometer/blob/master/implementations/micrometer-registry-elastic/src/main/java/io/micrometer/elastic/ElasticMeterRegistry.java#L171 |
So would you want to only log it on debug? I would think that it would be OK to log it in the error log line? |
@danieljamesscott I think it should be debug for consistency. If you think error fits better, you'd better open a separate issue for it as the change should be done across all meter registries consistently. |
My PR logs request/response data when there is an error sending to the registries |
@danieljamesscott Thanks for creating the PR but I expected to create a separate issue for discussion if you want to change the existing log level. I don't have a strong opinion on it but looking at #1289 (comment), @shakuzen seems to have an opinion on this, so I thought it'd be better to discuss it in a dedicated issue before acting on it. |
Yep, understood. But logging on debug is useless for me because it's inconsistently reproducible - I can't run with debug logging enabled all the time. I'm using an extended |
You should be able to configure your logging system to log DEBUG level for a specific logger (often corresponding to a single class), rather than all logging. Would that work for your purposes? Configuring the logging system as needed seems preferable to a custom MeterRegistry implementation. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open. |
I created #4773 to try to resolve this. |
When a failure occurs while sending to cloudwatch, I can see the exception in the logs:
https://github.com/micrometer-metrics/micrometer/blob/master/implementations/micrometer-registry-cloudwatch/src/main/java/io/micrometer/cloudwatch/CloudWatchMeterRegistry.java#L116
It would be useful to log the
metricData
, or possiblyputMetricDataRequest
. Would you accept a PR which does this?The text was updated successfully, but these errors were encountered: