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

http output: Log a sample of the response body even for non-retryable error codes #16596

Open
seizethedave opened this issue Mar 7, 2025 · 0 comments · May be fixed by #16597
Open

http output: Log a sample of the response body even for non-retryable error codes #16596

seizethedave opened this issue Mar 7, 2025 · 0 comments · May be fixed by #16597
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@seizethedave
Copy link

seizethedave commented Mar 7, 2025

Use Case

Telegraf's HTTP output plugin logs only the status code if an error is detected as a non-retryable error. It would be great to include some of the body, for even non-retryable errors.

Expected behavior

It would be useful if the output included a limited sample of the body like the non-retryable case does.

(Because, in the example of a 400, there are numerous reasons this may happen and the body is useful information.)

Actual behavior

Today's log looks like this:

[outputs.http] Received non-retryable status 400. Metrics are lost.

Additional info

No response

@seizethedave seizethedave added the feature request Requests for new plugin and for new features to existing plugins label Mar 7, 2025
@seizethedave seizethedave changed the title http output: Include a sample of the response body even for non-retryable error codes http output: Log a sample of the response body even for non-retryable error codes Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant