kubeedge / kubeedge/examples

new-counter-demo OTLP push accepts invalid endpoint URLs

Open
#175 1 comment 0 reactions 1 assignee View on GitHub

@blackdragoon26 is already working on this.

Since Aug 14, 2026.

Dominant language
Go
Stars
269
Forks
174
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.