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 Receiver test for label_value_length_limit configuration #6430

Merged

Conversation

mustafain117
Copy link
Contributor

Description:
Adds TestLabelValueLimitConfig to test label_value_length_limit configuration for Prometheus receiver

TestLabelValueLimitConfig:
Sets the label_value_length_limit for Prometheus receiver
Tests the following two scenarios:

  • Positive test case: Prometheus receiver scrapes metrics which have label values within the label_value_length_limit
    • Assert scrape is successful
  • Negative test case: Prometheus receiver scrapes metrics which have at least one label value exceeding label_value_length_limit
    • Assert scrape is unsuccessful

This PR also adds Histogram and Summary metric types to target1 which is shared by the test for label_name_length_limit and label_value_length_limit.

Link to tracking Issue:
PR 3/3, Closes #5997

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

LGTM, can you rebase?

@codeboten codeboten merged commit ce786d4 into open-telemetry:main Nov 29, 2021
jamesmoessis pushed a commit to atlassian-forks/opentelemetry-collector-contrib that referenced this pull request Dec 8, 2021
…on (open-telemetry#6430)

* Add Prometheus Receiver test for label_value_length_limit config

* rename target1 to targetLabelLimits1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants