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

Enhance httpcheckreceiver to Support Nested "endpoints" Under targets #37121

Open
VenuEmmadi opened this issue Jan 9, 2025 · 2 comments
Open
Labels
enhancement New feature or request needs triage New item requiring triage receiver/httpcheck HTTP Check receiver

Comments

@VenuEmmadi
Copy link

VenuEmmadi commented Jan 9, 2025

Component(s)

receiver/httpcheck

Is your feature request related to a problem? Please describe.

We propose an enhancement to the httpcheckreceiver configuration to allow endpoints to be nested under targets. This change introduces flexibility for users by enabling the definition of multiple endpoints per target while maintaining support for a single endpoint.

Describe the solution you'd like

Proposed Changes

  1. Support endpoints (list of URLs) and endpoint (single URL):
  • Introduced logic to handle both keys under targets.
  • endpoints allows defining multiple URLs for a single target.
  • endpoint allows specifying a single URL for a target.
  1. Conflict Resolution:
  • If both endpoint and endpoints are defined for a target, it is treated as invalid, and validation fails.
  1. Default Method Handling:
  • If method is not explicitly defined, a default HTTP method (e.g., GET) is applied during normalization.

Describe alternatives you've considered

Code should support below "endpoints" list and method is common for all.

receivers:
httpcheck:
collection_interval: 30s
targets:
- method: "GET"
endpoints:
- "https://httpbin.org/status/201"
- "https://httpbin.org/status/404"
- method: "POST"
endpoint: "https://httpbin.org/status/500"
processors:
batch:
send_batch_max_size: 1000
send_batch_size: 100
timeout: 10s
exporters:
debug:
verbosity: detailed
service:
pipelines:
metrics:
receivers: [httpcheck]
processors: [batch]
exporters: [debug]
image

Additional context

I would like to take this task.

@VenuEmmadi VenuEmmadi added enhancement New feature or request needs triage New item requiring triage labels Jan 9, 2025
@github-actions github-actions bot added the receiver/httpcheck HTTP Check receiver label Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@VenuEmmadi
Copy link
Author

Hi @codeboten
I would like to work on this enhancement, please assign it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage receiver/httpcheck HTTP Check receiver
Projects
None yet
Development

No branches or pull requests

1 participant