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

api: Create a new Go module for API; with remote write client and handler. #1656

Closed
wants to merge 1 commit into from

Conversation

bwplotka
Copy link
Member

@bwplotka bwplotka commented Oct 18, 2024

I wanted to proposeremotewrite module for generic PRW client and handler code. During PromCon audienced asked exactly about this.

Lot's of assumptions here:

  • We want separate module (we don't have processes on how to version it and release).
  • We want to expose generated protos, without gogo.
  • Do we need v1 PRW?

TODO:

  • Check if we want to reuse this "weird" httpClient, is it useful?
  • Add examples, documentation
  • Try using it in Prometheus before merging.

@ArthurSens
Copy link
Member

Interesting idea :)

I like that we're doing this in a separate module, but we could do this move in stages maybe? What do you think of moving our HTTP API (the one that calls Prometheus API for instant_query, query_range, etc) and see how versioning and releases would work with that move?

The rationale I'm having here is that worrying with new functionality AND how to handle versioning in the same PR is probably to much...?

@bwplotka
Copy link
Member Author

Yea, I am curious how to do this the best here, given we already have v1 package in the same repo and module.

My main intention is NOT to solve #1649 (comment) in this PR, but rather experiment on reusable remotewrite package/module, ppl can use now on different projects (Otel, Prometheus, avalanche, some other side projects). 🙈

How to get that to this point the fastest? I can't put it in the main module given proto and vtproto deps... Moving API to different module is not pressing now and I even proposed a separate Go module remotewrite vs other HTTP API, given protobuf deps, but maybe it's too small module to manage, given the feedback.

That's why a draft. I might just use this as a source of truth and reference this branch for now 🙃

@bwplotka
Copy link
Member Author

I think I might then put it in the current module. If I scope out vtprotobuf helpers (but still allow it for advanced users) and vendor backoff we might be able to NOT increase deps here with this 🤔

@bwplotka
Copy link
Member Author

But then it's not clear where to put it. api.go was built in very non-flexible way. We do say it's experimental versioning, but as we discussed, this impacts users nevertheless.

Then for remote write we also want to offer receiving handler, which does not fit within v1 api really 🤔

cc @jmichalek132 as it might help you in the implementation of client in Otel?

…dler.

Lot's of assumptions here:
* We want separate module (we don't have processes on how to version it and release).
* We want to expose generated protos, without gogo.

Signed-off-by: bwplotka <[email protected]>
@bwplotka
Copy link
Member Author

Closing this, in favor of #1658

@bwplotka bwplotka closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants