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

[exporter | receiver/googlecloudpubsub] Initial implementation #8391

Merged
merged 9 commits into from
Mar 15, 2022

Conversation

alexvanboxel
Copy link
Contributor

Description:
Add the implementation for Google Pubsub exporter and receiver for OTLP messages. The export is able to send OTEP messages to a Google Pubsub topic. The receiver and exporter are pushed in one PR as they work in pairs. A typical scenario is having an ingestion cluster (gRPC) pushing messages to Pubsub and then having receivers read again from Pubsub, having Pubsub as a buffer. That's why it doesn't make sense to have them reviewed separately.

This PR replaces the following PR:
#3879
#7172

The implementation has drifted and also includes several enhancements, it doesn't make sense to put it over the other PR.

The implementation is currently in use on production at Collibra.

Link to tracking Issue:
#1802

Testing:
exporter 93.1% test coverage
receiver 83.4% test coverage

Documentation:
Up-to-date README

@alexvanboxel
Copy link
Contributor Author

Sorry, had no time (it's my thing to do on the weekend) to update the previous PR so it was autoclosed. @fbogsany @dashpole @MovieStoreGuy

Same PR, but main merged in. And the last is fixes on remarks on the previous PR.

Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

Non-blocking feedback (except changelog). Lets merge this

CHANGELOG.md Outdated Show resolved Hide resolved
}

func (config *WatermarkConfig) validate() error {
if config.AllowedDrift == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

config defaults should be set in createDefaultConfig(), rather than validate.

switch config.Compression {
case "gzip":
return gZip, nil
case "":
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it might be nice to have an explicit "uncompressed" value, and default to that in createDefaultConfig(). That way you can separate defaulting vs parsing of config.

return earliest, nil
case "current":
return current, nil
case "":
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: (similar to above) can we default to "current" in createDefaultConfig(), so we don't need to handle this as a separate case or do defaulting here?

Collector automation moved this from In progress to Reviewer approved Mar 14, 2022
@alexvanboxel
Copy link
Contributor Author

@dashpole I have added you're commit + rebase (to avoid merge conflict). I will add your improvements on the defaults to the list of things todo. Could you ping someone to merge (I don't have the authority to merge). Thanks.

@jpkrohling jpkrohling changed the title Feature/pubsub full [exporter | receiver/googlecloudpubsub] Initial implementation Mar 15, 2022
@jpkrohling jpkrohling merged commit 9750d2b into open-telemetry:main Mar 15, 2022
@alexvanboxel alexvanboxel deleted the feature/pubsub-full branch March 18, 2022 07:29
foxlegend pushed a commit to foxlegend/opentelemetry-collector-contrib that referenced this pull request Apr 8, 2022
…telemetry#8391)

* Add Google Pubsub as an OTLP exporter/receiver

* Fix Pull Request comment on the GoogleCloudPububExporter

* Fix Pull Request comment on the GoogleCloudPububReceiver

* GoogleCloudPubsub linting

* Changed the behaviour of allow_drift and make config fields private

* Added documentation on the compression config

* Update CHANGELOG.md

Co-authored-by: David Ashpole <[email protected]>

Co-authored-by: David Ashpole <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Reviewer approved
Development

Successfully merging this pull request may close these issues.

None yet

3 participants