Skip to content

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

Closed
@crobert-1

Description

@crobert-1

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions