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

Propagate global scrape protocols by allowing for global config setting #3161

Merged

Conversation

jaronoff97
Copy link
Contributor

Description: Adjusts the TA CRD to allow for setting the global config

Link to tracking Issue(s):

Testing: unit and e2e

Documentation:

@jaronoff97 jaronoff97 requested a review from a team July 24, 2024 01:46
@jaronoff97
Copy link
Contributor Author

jaronoff97 commented Jul 24, 2024

I confirmed that running this new operator version resulted in this response from the scrape_configs endpoint (after setting this in the global config)

    receivers:
      jaeger:
          protocols:
            grpc:

      # Collect own metrics
      prometheus:
        config:
          global:
            scrape_interval: 30s
            scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText0.0.4']
          scrape_configs:
            - job_name: 'otel-collector'
              scrape_interval: 10s
              static_configs:
                - targets: [ '0.0.0.0:8888' ]

    processors:

    exporters:
      debug:
    service:
      pipelines:
        traces:
          receivers: [jaeger]
          exporters: [debug]
{
  "otel-collector": {
    "enable_compression": true,
    "enable_http2": true,
    "follow_redirects": true,
    "honor_timestamps": true,
    "job_name": "otel-collector",
    "metrics_path": "/metrics",
    "scheme": "http",
    "scrape_interval": "10s",
    "scrape_protocols": [
      "PrometheusProto",
      "OpenMetricsText1.0.0",
      "OpenMetricsText0.0.1",
      "PrometheusText0.0.4"
    ],
    "scrape_timeout": "10s",
    "static_configs": [
      {
        "targets": [
          "0.0.0.0:8888"
        ]
      }
    ],
    "track_timestamps_staleness": false
  }
}

@jaronoff97 jaronoff97 added the discuss-at-sig This issue or PR should be discussed at the next SIG meeting label Jul 29, 2024
@jaronoff97 jaronoff97 added area:collector Issues for deploying collector area:target-allocator Issues for target-allocator and removed discuss-at-sig This issue or PR should be discussed at the next SIG meeting labels Aug 15, 2024
@jaronoff97 jaronoff97 requested a review from swiatekm August 15, 2024 16:34
Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

LGTM, one nitpick about the attribute docstring.

apis/v1alpha1/targetallocator_types.go Outdated Show resolved Hide resolved
@pavolloffay pavolloffay merged commit 03b4bd5 into open-telemetry:main Aug 20, 2024
33 checks passed
@jaronoff97 jaronoff97 deleted the propagate-global-scrape-protocols branch August 20, 2024 17:34
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global scrape protocols not propagated to target allocator generated scrape configs
3 participants