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

[exporter/loadbalancing] otlp port must specified in loadbalancing config to pass validation #31426

Closed
atmask opened this issue Feb 27, 2024 · 2 comments
Labels
bug Something isn't working exporter/loadbalancing

Comments

@atmask
Copy link
Contributor

atmask commented Feb 27, 2024

Component(s)

exporter/loadbalancing

What happened?

Description

As a result of the otel-collector issue 9505, there is a new condition in the validation of otlpexporter's config struct. This validation is meant to cause invalid config to fail fast rather than failing while running.

The loadbalancing config has a dependency on the otlpexporter config struct. The change to the otlpexporter config's validation impacts this package. Changes to this package are required to unblock PR 9632 on the otel-collector.

Steps to Reproduce

Run go test on loadbalancing exporter while using replace to point "go.opentelemetry.io/collector/exporter/otlpexporter" module to the version of otlpexporter at e6f58dc4e

Expected Result

All tests pass

Actual Result

Tests fail to unmarshal and validate configs where no otlp port is specified in the endpoint

Collector version

e6f58dc4e04e51afe587d66835bc70445e82bcee

Environment information

N/A

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@atmask atmask added bug Something isn't working needs triage New item requiring triage labels Feb 27, 2024
Copy link
Contributor

Pinging code owners:

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

@andrzej-stencel
Copy link
Member

Fixed in #31425

@andrzej-stencel andrzej-stencel removed the needs triage New item requiring triage label Feb 27, 2024
TylerHelmuth pushed a commit that referenced this issue Feb 28, 2024
… unit test (#31425)

**Description:** 
As described in the otel-collector [issue
9505](open-telemetry/opentelemetry-collector#9505),
the otlpexporter does not function correctly if no port is defined. To
resolve this, the otlp config validation has been updated to fail fast
when the endpoint within an otlp config does not have a port specified.

The loadbalancingexporter config has the otlp exporter config as a
dependency, however, the loadbalancing exporter does not define a port
on the otlpexporter config in two places:
- default config from factory
- testdata contents

This is currently a blocker to the contrib tests for the
[PR](open-telemetry/opentelemetry-collector#9632)
to resolve issue 9505

Relates to:
open-telemetry/opentelemetry-collector#9523

#31371

#31381


**Link to tracking Issue:** 
otel-collector-contrib: [issue
31426](#31426)
Arises from otel-collector [issue
9505](open-telemetry/opentelemetry-collector#9505)

**Testing:** Used `replace` to test loadbalancingexporter changes pass
tests successfully when using the otlpexporter changes from
[PR](open-telemetry/opentelemetry-collector#9632)
@atmask atmask closed this as completed Feb 28, 2024
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this issue Mar 13, 2024
… unit test (open-telemetry#31425)

**Description:** 
As described in the otel-collector [issue
9505](open-telemetry/opentelemetry-collector#9505),
the otlpexporter does not function correctly if no port is defined. To
resolve this, the otlp config validation has been updated to fail fast
when the endpoint within an otlp config does not have a port specified.

The loadbalancingexporter config has the otlp exporter config as a
dependency, however, the loadbalancing exporter does not define a port
on the otlpexporter config in two places:
- default config from factory
- testdata contents

This is currently a blocker to the contrib tests for the
[PR](open-telemetry/opentelemetry-collector#9632)
to resolve issue 9505

Relates to:
open-telemetry/opentelemetry-collector#9523

open-telemetry#31371

open-telemetry#31381


**Link to tracking Issue:** 
otel-collector-contrib: [issue
31426](open-telemetry#31426)
Arises from otel-collector [issue
9505](open-telemetry/opentelemetry-collector#9505)

**Testing:** Used `replace` to test loadbalancingexporter changes pass
tests successfully when using the otlpexporter changes from
[PR](open-telemetry/opentelemetry-collector#9632)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/loadbalancing
Projects
None yet
Development

No branches or pull requests

2 participants