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

[extension/observer] Expose host and port separately in endpoint env #33571

Closed
crobert-1 opened this issue Jun 14, 2024 · 1 comment · Fixed by #33572
Closed

[extension/observer] Expose host and port separately in endpoint env #33571

crobert-1 opened this issue Jun 14, 2024 · 1 comment · Fixed by #33572
Labels
enhancement New feature or request extension/observer needs triage New item requiring triage

Comments

@crobert-1
Copy link
Member

Component(s)

extension/observer

Describe the issue you're reporting

Enhancement request
Expose host and port in the endpoint's Env(), instead of relying on endpoint alone.

Context/Why
The endpoint's Env is used to allow the receiver creator to dynamically set configuration options for a receiver being created.

I'm filing this as a result of a receiver requiring the host (or IP address) to be configured independently from a port. From documentation, the exposed endpoint will sometimes also include the port. See #33560 for the specific receiver details.

Alternative approaches

  1. Leave endpoint exposed as-is, and require receivers to be compatible with this. This forces receivers into a specific configuration and would require potentially breaking changes to make it work. I believe this would be too impactful on receivers to enforce.
  2. Pass in golang's regexp as an argument to Env. The receiver creator is using the expr-lang pkg to parse and evaluate arguments, which can accept golang types as environment variables. Passing in regexp would allow users to operate on Env contents using regular expressions, and parsing out the host and port manually in configuration. This would be a complicated UX, and also would more fully tie the receiver creator to expr-lang.
@crobert-1 crobert-1 added enhancement New feature or request needs triage New item requiring triage labels Jun 14, 2024
Copy link
Contributor

Pinging code owners:

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

dmitryax pushed a commit that referenced this issue Jun 27, 2024
…nv (#33572)

**Description:** 
The observer extension currently only exposes `endpoint` in its endpoint
environment that is made available to the receiver creator for
dynamically configuring receivers. Some receivers require `host` and
`port` to be configured separately, so `endpoint` containing both is
incompatible with those receivers. Exposing these independently allows
the receiver creator to be compatible with those receivers.

**Link to tracking Issue:**
Resolves #33571
tomasmota pushed a commit to SpringerPE/opentelemetry-collector-contrib that referenced this issue Jul 1, 2024
…nv (open-telemetry#33572)

**Description:** 
The observer extension currently only exposes `endpoint` in its endpoint
environment that is made available to the receiver creator for
dynamically configuring receivers. Some receivers require `host` and
`port` to be configured separately, so `endpoint` containing both is
incompatible with those receivers. Exposing these independently allows
the receiver creator to be compatible with those receivers.

**Link to tracking Issue:**
Resolves open-telemetry#33571
lalith47 pushed a commit to lalith47/opentelemetry-collector-contrib that referenced this issue Jul 1, 2024
…nv (open-telemetry#33572)

**Description:** 
The observer extension currently only exposes `endpoint` in its endpoint
environment that is made available to the receiver creator for
dynamically configuring receivers. Some receivers require `host` and
`port` to be configured separately, so `endpoint` containing both is
incompatible with those receivers. Exposing these independently allows
the receiver creator to be compatible with those receivers.

**Link to tracking Issue:**
Resolves open-telemetry#33571
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jul 11, 2024
…nv (open-telemetry#33572)

**Description:** 
The observer extension currently only exposes `endpoint` in its endpoint
environment that is made available to the receiver creator for
dynamically configuring receivers. Some receivers require `host` and
`port` to be configured separately, so `endpoint` containing both is
incompatible with those receivers. Exposing these independently allows
the receiver creator to be compatible with those receivers.

**Link to tracking Issue:**
Resolves open-telemetry#33571
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extension/observer needs triage New item requiring triage
Projects
None yet
1 participant