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

OTLP HTTP Exporter Should Not Use the GRPC Port #2330

Closed
NathanielRN opened this issue Jul 7, 2021 · 0 comments · Fixed by #2331
Closed

OTLP HTTP Exporter Should Not Use the GRPC Port #2330

NathanielRN opened this issue Jul 7, 2021 · 0 comments · Fixed by #2331
Labels
bug Something isn't working

Comments

@NathanielRN
Copy link
Contributor

Please answer these questions before submitting a bug report.

What version of OpenTelemetry are you using?

0.23.0

What version of Node are you using?

14

Please provide the code you used to setup the OpenTelemetry SDK

const tracerProvider = new NodeTracerProvider(config);
tracerProvider.addSpanProcessor(
  new BatchSpanProcessor(new CollectorTraceExporter())
);

What did you do?

The opentelemetry-collector has default OTLP receivers for gRPC run on port 4317 and HTTP run on 55681

https://github.com/open-telemetry/opentelemetry-collector/blob/f3784a92def81ae9b5c770c97ac2d5bed4f9b804/receiver/otlpreceiver/factory.go#L33-L34

The port for gRPC is outlined in the specs:

https://github.com/open-telemetry/opentelemetry-specification/blob/2a712f7626cb62b21ae210ef3175612e7744f285/specification/protocol/otlp.md#otlpgrpc-default-port

The JavaScript opentelemetry-exporter-collector-grpc package correctly exports gRPC to 4317:

However, the JavaScript opentelemetry-exporter-collector-proto clashes because it tries to export HTTP to the 4317 port reserved for gRPC:

const DEFAULT_COLLECTOR_URL = 'http://localhost:4317/v1/metrics';

What did you expect to see?

opentelemetry-exporter-collector-proto should probably use port 55681 to match opentelemetry-collector.

What did you see instead?

I observed that the SDK will error out if opentelemetry-exporter-collector-proto is configured to send HTTP to the gRPC port running 4317 because they are not compatible.

Additional context

Add any other context about the problem here.

@NathanielRN NathanielRN added the bug Something isn't working label Jul 7, 2021
michaelhyatt pushed a commit to michaelhyatt/serverless-aws-node-api-worker-otel that referenced this issue Sep 21, 2021
michaelhyatt added a commit to elastic/apm-server that referenced this issue Sep 21, 2021
Updated to refer to a newer version of ADOT JS Lambda layer v0.24

Removed the workaround required in v0.23 for open-telemetry/opentelemetry-js#2330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant