Skip to content

Log payload for failed metric posts #1289

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

Closed
wants to merge 1 commit into from

Conversation

grabnerandi
Copy link

We have seen "failed to send metrics to dynatrace" errors with not enough indication on the actual root cause. Logging the actual requestPayload will give us more troubleshooting insights in case this problem happens again

We have seen "failed to send metrics to dynatrace" errors with not enough indication on the actual root cause. Logging the actual requestPayload will give us more troubleshooting insights in case this problem happens again
@shakuzen
Copy link
Member

shakuzen commented Apr 3, 2019

I think logging the whole request payload at ERROR log level for an API call failure is too verbose. Perhaps you are running into #1343. I have opened #1357 instead, which I'll get included in the soon to be released 1.1.4.

@danieljamesscott
Copy link

Out of interest. Why is logging the request payload too verbose? Surely there should not be that many request failures in normal operation. Also, the failure may be due to invalid request data so being able to see what was attempted is useful.

@shakuzen
Copy link
Member

Out of interest. Why is logging the request payload too verbose?

The request payload is expected to be quite large in many cases, and it's not even necessarily helpful. For example, if the target host is down, knowing the request payload is not helpful, and the exception message given should indicate the problem (e.g. host is unreachable). It's fine to make it possible to get the request payload on error when you cannot figure out the problem from the exception message and the request payload would be useful - that's why we opted to log it at DEBUG level. It doesn't flood logs with huge payloads by default (assuming INFO level logging is default), but logging can be configured for those that want to see the payload.

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.

3 participants