Skip to content

Conversation

@amanbrar1999
Copy link
Contributor

@amanbrar1999 amanbrar1999 commented Oct 31, 2020

Description:
This PR adds the concept of Prometheus "external labels" to the Prometheus Remote Write Exporter. These labels must be kept isolated from OTLP metric data point labels because they do not undergo the same type of sanitization. The difference is external labels are allowed to start with "__". This satisfies the use case of Cortex HA deduplication and hence resolves the linked issue.

Link to tracking Issue: #1892

Testing:
Unit test cases have been added wherever changes were made and manual testing was done to verify Cortex HA deduplication and that nothing changed in metric graphs other than labels.

Documentation:
The example configuration in testdata/config.yaml demonstrates how to use the external label config'
README has been updated to include external label config

-- cc @alolita

@amanbrar1999 amanbrar1999 requested a review from a team October 31, 2020 01:25
@codecov
Copy link

codecov bot commented Oct 31, 2020

Codecov Report

Merging #2044 into master will decrease coverage by 0.01%.
The diff coverage is 95.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2044      +/-   ##
==========================================
- Coverage   91.94%   91.92%   -0.02%     
==========================================
  Files         279      279              
  Lines       16706    16724      +18     
==========================================
+ Hits        15360    15374      +14     
- Misses        926      928       +2     
- Partials      420      422       +2     
Impacted Files Coverage Δ
exporter/prometheusremotewriteexporter/factory.go 96.22% <87.50%> (-3.78%) ⬇️
exporter/prometheusremotewriteexporter/exporter.go 91.74% <100.00%> (+0.07%) ⬆️
exporter/prometheusremotewriteexporter/helper.go 98.94% <100.00%> (+0.01%) ⬆️
translator/internaldata/resource_to_oc.go 91.78% <0.00%> (-2.74%) ⬇️

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 7ddd242...581cd04. Read the comment docs.

@bogdandrutu bogdandrutu merged commit 366e918 into open-telemetry:master Nov 3, 2020
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
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