Skip to content

new-counter-demo OTLP push accepts invalid endpoint URLs #175

Description

@blackdragoon26

What happened:

new-counter-demo only checks whether the OTLP endpointURL field is non-empty. Relative values and unsupported schemes are accepted, then converted into exporter options with an empty or invalid host. The configuration error is discovered later during provider initialization.

What I expected to happen:

The configuration parser should reject endpoint values that are not absolute HTTP or HTTPS URLs and report the problem at configuration time.

How to reproduce it (as minimally and precisely as possible):

  1. Configure the OTLP push method with endpointURL: localhost:4318.
  2. Initialize the OTLP provider.
  3. Observe that the invalid value passes NewConfig and fails later with exporter configuration behavior.

A focused regression test covers rejection of the invalid value and acceptance of a valid OTLP HTTP endpoint.

Anything else we need to know?:

The change only validates the existing URL-based configuration contract and does not change provider or export behavior.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions