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

Add Prometheus Remote Write Exporter supporting Cortex - Metrics exporter #1525

Closed
wants to merge 19 commits into from

Conversation

huyan0
Copy link
Member

@huyan0 huyan0 commented Aug 11, 2020

This PR is part of a series of PRs implementing a Prometheus remote write exporter supporting Cortex. See related PR #1524

Description: This PR adds the metric exporter for Prometheus remote write integrated backends, such as Cortex. The exporter drops non-cumulative monotonic, histogram, and summary OTLP metrics.

Please note this metrics exporter does not support Prometheus default labels such as job or instance labels. An issue addressing Prometheus default labels will be filed later. Another related feature is to derive labels from a Resource. This functionality already exists in the Go SDK and will be implemented in another PR. This feature could allow users to specify which attributes they want to add as labels.

Link to tracking Issue: #1150
Related issues are:
Metrics aggregation proposal: #1422
Prometheus exporter not functional: #1255
Related spec discussion: #731

Testing:
Currently unit tests have 96% code coverage. There are tests using HTTP Servers as mock backends. We will be adding end-to-end tests and pipeline testing with Cortex. Tests with a collector sending to a Cortex instance running locally has also been done.

We request the community to provide suggestions and links for existing testing environments you may be aware of. Some questions we have include how to setup a complete pipeline with a Cortex gateway.
cc: @annanay25 @gouthamve Would be great to get expert feedback from you :-)

Documentation:

cc: @huyan0 @danielbang907 @alolita @markcartertm @sonofachamp @morigs

Request for review: @jmacd @bogdandrutu @annanay25 @gouthamve @open-telemetry/collector-approvers @open-telemetry/collector-maintainers

@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #1525 into master will increase coverage by 0.09%.
The diff coverage is 96.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1525      +/-   ##
==========================================
+ Coverage   91.42%   91.52%   +0.09%     
==========================================
  Files         248      251       +3     
  Lines       17219    17524     +305     
==========================================
+ Hits        15743    16039     +296     
- Misses       1064     1069       +5     
- Partials      412      416       +4     
Impacted Files Coverage Δ
exporter/prometheusremotewriteexporter/exporter.go 94.57% <94.57%> (ø)
exporter/prometheusremotewriteexporter/factory.go 95.45% <95.45%> (ø)
exporter/prometheusremotewriteexporter/helper.go 100.00% <100.00%> (ø)
service/defaultcomponents/defaults.go 85.18% <100.00%> (+0.27%) ⬆️
translator/internaldata/resource_to_oc.go 87.50% <0.00%> (+2.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e68440e...5c9ef0a. Read the comment docs.

@huyan0 huyan0 marked this pull request as ready for review August 12, 2020 01:22
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.

1 participant