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

feat: implement prom remote storage api #578

Merged
merged 7 commits into from
Jan 30, 2023

Conversation

jiacai2050
Copy link
Contributor

Which issue does this PR close?

Closes #577

Rationale for this change

What changes are included in this PR?

Add remote storage API support in HTTP module.

Are there any user-facing changes?

Yes, add two HTTP API, prometheus users can use them by add following config to their prometheus.yml

remote_write:
  - url: "http://127.0.0.1:5000/prom/v1/write"

remote_read:
  - url: "http://127.0.0.1:5000/prom/v1/read"

How does this change test

Manually

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2023

Codecov Report

Merging #578 (251f77f) into main (1fa8629) will increase coverage by 3.36%.
The diff coverage is 46.53%.

@@            Coverage Diff             @@
##             main     #578      +/-   ##
==========================================
+ Coverage   62.59%   65.96%   +3.36%     
==========================================
  Files         326      285      -41     
  Lines       50232    44308    -5924     
==========================================
- Hits        31442    29226    -2216     
+ Misses      18790    15082    -3708     
Impacted Files Coverage Δ
server/src/grpc/mod.rs 0.00% <ø> (ø)
server/src/grpc/storage_service/mod.rs 41.42% <0.00%> (ø)
server/src/grpc/storage_service/write.rs 38.99% <0.00%> (-3.67%) ⬇️
server/src/handlers/sql.rs 0.00% <0.00%> (ø)
server/src/http.rs 0.00% <0.00%> (ø)
server/src/mysql/worker.rs 0.00% <0.00%> (ø)
server/src/server.rs 0.00% <0.00%> (ø)
server/src/handlers/prom.rs 68.11% <68.11%> (ø)
analytic_engine/src/sst/file.rs 76.17% <0.00%> (-1.09%) ⬇️
components/skiplist/src/list.rs 98.87% <0.00%> (-0.46%) ⬇️
... and 47 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jiacai2050 jiacai2050 marked this pull request as ready for review January 21, 2023 14:55
server/src/handlers/prom.rs Outdated Show resolved Hide resolved
server/src/handlers/prom.rs Outdated Show resolved Hide resolved
server/src/handlers/prom.rs Outdated Show resolved Hide resolved
server/src/handlers/prom.rs Outdated Show resolved Hide resolved
server/src/handlers/prom.rs Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 merged commit 43a70fb into apache:main Jan 30, 2023
@jiacai2050 jiacai2050 deleted the feat-prom-remote branch January 30, 2023 08:58
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: implement prom remote storage api

* translate req to sql

* remote read pass

* remote write pass

* add more docs

* sort labels before write

* add testcase for remote prom handler
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.

Implement prometheus remote storage API
3 participants