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

Global scrape protocols not propagated to target allocator generated scrape configs #3160

Closed
sfc-gh-rscott opened this issue Jul 23, 2024 · 1 comment · Fixed by #3161
Closed
Assignees
Labels
area:collector Issues for deploying collector area:target-allocator Issues for target-allocator bug Something isn't working

Comments

@sfc-gh-rscott
Copy link

sfc-gh-rscott commented Jul 23, 2024

Component(s)

target allocator

Description

Similar to #3035. When specifying scrape protocols in the global prometheus config for a collector, those protocols are not propagated to the generated scrape configs.

Steps to Reproduce

Use a prometheus config with scrape protocols globally defined:

prometheus:
    config:
      global:
        scrape_interval: 30s
        scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText0.0.4']
    target_allocator:
      endpoint: [http://opentelemetry-k8s-agent-targetallocator:80](http://opentelemetry-k8s-agent-targetallocator/)
      interval: 30s
      collector_id: ${POD_NAME}
      http_sd_config:
        refresh_interval: 60s

Expected Result

Generated scrape configs have the PrometheusProto protocol included:

    "scrape_protocols": [
      "PrometheusProto",
      "OpenMetricsText1.0.0",
      "OpenMetricsText0.0.1",
      "PrometheusText0.0.4"
    ],

Actual Result

PrometheusProto is omitted:

    "scrape_protocols": [
      "OpenMetricsText1.0.0",
      "OpenMetricsText0.0.1",
      "PrometheusText0.0.4"
    ],

Kubernetes Version

1.28.3

Operator version

v0.103.0

Collector version

v0.103.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

Log output

No response

Additional context

No response

@sfc-gh-rscott sfc-gh-rscott added bug Something isn't working needs triage labels Jul 23, 2024
@jaronoff97 jaronoff97 added area:collector Issues for deploying collector area:target-allocator Issues for target-allocator and removed needs triage labels Jul 23, 2024
@jaronoff97 jaronoff97 self-assigned this Jul 23, 2024
@jaronoff97
Copy link
Contributor

Discussion:

  • The approach for adding global into the TA CRD is acceptable
  • We DO NOT want to accept any other custom Prometheus fields, and we don't think we will need to in the future (i.e. we are choosing to not accept scrape configs files)
    • We only want to maintain parity with the prometheus receiver
    • In the future, we will recommend using the prometheus CRs to do this
    • We do need to get Enabling scrapeConfig and Probe #3103, but that's a separate problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:collector Issues for deploying collector area:target-allocator Issues for target-allocator bug Something isn't working
Projects
None yet
2 participants