-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/sapm] - follow receiver contract #35300
[receiver/sapm] - follow receiver contract #35300
Conversation
@atoulme this is good to go now! PTAL |
f6ed499
to
7ab132c
Compare
7ab132c
to
dca4429
Compare
"go.opentelemetry.io/collector/consumer/consumererror" | ||
) | ||
|
||
func HTTPError(w http.ResponseWriter, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you really going to reuse that code outside of sapmreceiver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. look at this PR #35327.
It's for loki receiver.
@atoulme merge conflicts are now resolved. I guess we can merge this. |
**Description:** This is my first PR to ensure that all network receivers adhere to [the contract](https://github.com/open-telemetry/opentelemetry-collector/blob/df3c9e38a80ccc3b14705462be2e2e51c628a3b3/receiver/doc.go#L10) and maintain the correct order of operations. I also plan to submit additional PRs for other receivers in the future. Follow receiver contract for `sapmreceiver`. This also includes an internal `errorutil` package which will be used by other network receivers as well. **Link to tracking Issue:** open-telemetry#5909 **Testing:** Added
#35300 introduced a common methodology intended to be used by network receivers to follow [the contract](https://github.com/open-telemetry/opentelemetry-collector/blob/df3c9e38a80ccc3b14705462be2e2e51c628a3b3/receiver/doc.go#L10) and maintain the correct order of operations. This PR re-uses that for datadog.
Description:
This is my first PR to ensure that all network receivers adhere to the contract and maintain the correct order of operations. I also plan to submit additional PRs for other receivers in the future.
Follow receiver contract for
sapmreceiver
.This also includes an internal
errorutil
package which will be used by other network receivers as well.Link to tracking Issue: #5909
Testing: Added