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

[receiver/sapm] - follow receiver contract #35300

Merged

Conversation

VihasMakwana
Copy link
Contributor

@VihasMakwana VihasMakwana commented Sep 19, 2024

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

@VihasMakwana
Copy link
Contributor Author

@atoulme this is good to go now! PTAL

@VihasMakwana VihasMakwana changed the title [receiver/sapm] - follow receiver contract [chore][receiver/sapm] - follow receiver contract Oct 1, 2024
@VihasMakwana VihasMakwana force-pushed the sapm-receiver-contract branch 2 times, most recently from f6ed499 to 7ab132c Compare October 1, 2024 09:02
@VihasMakwana VihasMakwana force-pushed the sapm-receiver-contract branch from 7ab132c to dca4429 Compare October 1, 2024 09:02
@VihasMakwana VihasMakwana changed the title [chore][receiver/sapm] - follow receiver contract [receiver/sapm] - follow receiver contract Oct 1, 2024
"go.opentelemetry.io/collector/consumer/consumererror"
)

func HTTPError(w http.ResponseWriter, err error) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@VihasMakwana
Copy link
Contributor Author

@atoulme merge conflicts are now resolved. I guess we can merge this.

@mwear mwear added the ready to merge Code review completed; ready to merge by maintainers label Oct 4, 2024
@andrzej-stencel andrzej-stencel merged commit 5edf2fe into open-telemetry:main Oct 7, 2024
162 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 7, 2024
ghost pushed a commit to sematext/opentelemetry-collector-contrib that referenced this pull request Oct 9, 2024
**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
MovieStoreGuy pushed a commit that referenced this pull request Oct 24, 2024
#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal/core ready to merge Code review completed; ready to merge by maintainers receiver/sapm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants