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

[datadog receiver] Exit function on failed payload decode #24658

Merged

Conversation

MovieStoreGuy
Copy link
Contributor

Description:

Exit on error to avoid NPE

Link to tracking Issue:

Fixes #24562

Testing:

I would like to fix up how the component does tests in future PR.

Documentation:

N/A

Copy link
Member

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good catch!

@@ -91,6 +91,7 @@ func (ddr *datadogReceiver) handleTraces(w http.ResponseWriter, req *http.Reques
if err != nil {
http.Error(w, "Unable to unmarshal reqs", http.StatusInternalServerError)
ddr.params.Logger.Error("Unable to unmarshal reqs")
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's feasible to add a test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry it too me a bit to figure out how best to test it.

@MovieStoreGuy MovieStoreGuy changed the title Exit function on failed payload decode [datadog receiver] Exit function on failed payload decode Jul 29, 2023
@MovieStoreGuy MovieStoreGuy merged commit 595123e into open-telemetry:main Jul 31, 2023
89 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/datadog] otlp runtime logs reported error
5 participants