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

bug(datadog_agent source): HTTP connectivity check request is not correctly handled #18868

Closed
tobz opened this issue Oct 17, 2023 · 0 comments · Fixed by #19093
Closed

bug(datadog_agent source): HTTP connectivity check request is not correctly handled #18868

tobz opened this issue Oct 17, 2023 · 0 comments · Fixed by #19093
Labels
source: datadog_agent Anything `datadog_agent` source related type: bug A code related bug.

Comments

@tobz
Copy link
Contributor

tobz commented Oct 17, 2023

When the Datadog Agent first starts up, the logs component will send an empty JSON object as the payload. This is for the purpose of going through the motions of what would otherwise be a normal "submit logs" request... without actually submitting any logs.

The datadog_agent source expects that all requests are simply an array of log events, and if the payload can't be deserialized as an array of log events, it returns back a cryptic serde-specific error to the caller.

We should simply add a fast path check in decode_log_body to see if the payload matches {}, and if so, return an empty array of log events, similar to what happens on lines 70-77 in logs.rs.

@tobz tobz added type: bug A code related bug. source: datadog_agent Anything `datadog_agent` source related labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: datadog_agent Anything `datadog_agent` source related type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant