-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[chore] [reveiver/prometheusreceiver] Add unit tests around protobuf negotiation #29153
Merged
codeboten
merged 11 commits into
open-telemetry:main
from
krajorama:promreceiver-unit-test-protobuf
Nov 15, 2023
Merged
[chore] [reveiver/prometheusreceiver] Add unit tests around protobuf negotiation #29153
codeboten
merged 11 commits into
open-telemetry:main
from
krajorama:promreceiver-unit-test-protobuf
Nov 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want to get access to EnableProtobufNegotiation Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
krajorama
changed the title
[reveiver/prometheusreceiver] Add unit tests around protobuf negotiation
[chore] [reveiver/prometheusreceiver] Add unit tests around protobuf negotiation
Nov 13, 2023
Move prom metric family to protobuf encoding to its own function. Reuse assertMetricPresent Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Also assert on explicit bounds. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Code should be clear enough now. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
jesusvazquez
approved these changes
Nov 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me 👍
I'm not 100% familiar with how the rest of the test files are structured in this repo but the modifications on testComponent
and compareHistogram
you added look legit to me.
dashpole
approved these changes
Nov 14, 2023
dashpole
added
the
ready to merge
Code review completed; ready to merge by maintainers
label
Nov 15, 2023
codeboten
approved these changes
Nov 15, 2023
RoryCrispin
pushed a commit
to ClickHouse/opentelemetry-collector-contrib
that referenced
this pull request
Nov 24, 2023
…negotiation (open-telemetry#29153) The code needs some basic tests that can be later expanded with tests for native histograms use cases. Changes: Refactored `testComponent` function to be easier to customize the configuration of the scrape. Expanded `compareHistogram` to assert on the explicit boundaries as well. Added function `prometheusMetricFamilyToProtoBuf` to helpers to be able to turn serialize a Prometheus metric family into Protobuf. Added simple test of Protobuf based scrape of counters, gauges, summaries and histograms. open-telemetry#26555 Followup to open-telemetry#27030 Related to open-telemetry#28663 **Testing:** Adding simple e2e test for scraping over Protobuf. **Documentation:** Not applicable. --------- Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Co-authored-by: David Ashpole <dashpole@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
chore
ready to merge
Code review completed; ready to merge by maintainers
receiver/prometheus
Prometheus receiver
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The code needs some basic tests that can be later expanded with tests for native histograms use cases.
Changes:
Refactored
testComponent
function to be easier to customize the configuration of the scrape.Expanded
compareHistogram
to assert on the explicit boundaries as well.Added function
prometheusMetricFamilyToProtoBuf
to helpers to be able to turn serialize a Prometheus metric familyinto Protobuf.
Added simple test of Protobuf based scrape of counters, gauges, summaries and histograms.
Link to tracking Issue:
#26555
Followup to #27030
Related to #28663
Testing:
Adding simple e2e test for scraping over Protobuf.
Documentation:
Not applicable.