receiver/prometheus/internal: direct metricfamily Prometheus->OTLP + equivalent tests#3145
Conversation
bogdandrutu
left a comment
There was a problem hiding this comment.
@rakyll @Aneurysm9 @dashpole as Prometheus experts please review.
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
a2c6148 to
f0db09e
Compare
|
@bogdandrutu @dashpole please take a look again, unit tests added, but please remember that because Github can't stack PRs this change is waiting on PR #3139. |
ca20c70 to
4fea08a
Compare
…etheus->OTLP Pdata
Starts the progressive effort to convert directly from
Prometheus->OTLPPdata
directly instead of
Prometheus->OpenCensusProto->OTLPPdata
by adding a converter for node+resource -> pdata.Resource.
Updates #3137
Addresses feedback pointed out by Bogdan, Tigran, Jaana by using Resource.Attributes().Sort() instead and also avoid using go-cmp/cmp and instead opt to using require.Equal.
…equivalent tests Updates #3137
4fea08a to
6f38bbc
Compare
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
|
@bogdandrutu, Anurag and David approved the PR, I addressed all the requested changes 7+ days ago; kindly waiting for your review/merge otherwise the PR has now been marked as stale. |
|
Please fix lint errors |
|
@odeke-em ping on the lint errors |
b144672 to
dc06ebc
Compare
dc06ebc to
a32a210
Compare
|
golangci-lint errors are unclear/phantom and pedantic -- max of 3 import groups which seems arbitrary and no way a Go convention, and it wasn't clear. However, I've addressed them. Thanks for the patience! |
|
@odeke-em thanks a lot for working on this! Can you please update the PR description / commit message to reflect how much of the refactoring this does and what remains to be done. |
tigrannajaryan
left a comment
There was a problem hiding this comment.
Will merge once the PR descr/commit message are updated.
|
@tigrannajaryan I've updated the PR description. The PR is composed of multiple commits so updating the commit message would require me squashing them directly into one then force pushing which would lose context. I believe perhaps that when you go to squash+merge, you'll be able to copy+paste the updated description. Thank you for the review! |
|
Thanks @odeke-em |
|
Awesome, thank you @tigrannajaryan! |
Adds direct metricfamily Prometheus->OTLP conversion as well as equivalence tests.
After this change, there will be 2 other changes coming up and then finally we'll be able
to remove the dependency of OpenCensus in the Prometheus receiver.
Updates #3137
Follow-up of PR #3139 unfortunately given that Github doesn't support chaining PRs.