-
Notifications
You must be signed in to change notification settings - Fork 825
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-trace-otlp-proto cannot communicate with collector version > 0.42 #2945
Comments
Hi! This will also be fixed by #2929. 🙂 |
@pichlermarc tyvm :) |
Reviewing the files in the provided zip, it looks like the issue may be with the endpoint being used. The If your path is changed to |
I figured it would be something like that. |
Ohh, that makes sense. I foolishly assumed that it was a proto issue too. |
Why does it work with 50 then? did they bring back the old path? |
I did not try it with this particular setup but with a basic custom example that also uses |
I tested this locally to confirm this is the issue. Simplified output confirmed below: Works: Collector 0.42.0 with Starting otelcol... {"Version": "0.42.0", "NumCPU": 8}
...
otel-collector | Resource SchemaURL:
otel-collector | Resource labels:
otel-collector | -> service.name: STRING(send to v1/trace)
otel-collector | -> telemetry.sdk.language: STRING(nodejs) Does Not Work: Collector 0.43.0 with Starting otelcol... {"Version": "0.43.0", "NumCPU": 8}
... Works: Collector 0.42.0 with Starting otelcol... {"Version": "0.42.0", "NumCPU": 8}
...
otel-collector | Resource SchemaURL:
otel-collector | Resource labels:
otel-collector | -> service.name: STRING(send to v1/traces)
otel-collector | -> telemetry.sdk.language: STRING(nodejs) Works: Collector 0.43.0 with Starting otelcol... {"Version": "0.43.0", "NumCPU": 8}
...
otel-collector | Resource SchemaURL:
otel-collector | Resource labels:
otel-collector | -> service.name: STRING(send to v1/traces)
otel-collector | -> telemetry.sdk.language: STRING(nodejs) I'm not sure where it was confirmed that version 50 might work; it did not work for me. |
Another important note: Collector Version 0.46.0 officially removed the deprecated port 55681 with PR 4916. So the |
Thank you! can confirm that using the new url and port I don't see this issue anymore. |
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
Using version 0.28 of exporter-trace-otlp-proto
What version of Node are you using?
Using version 16.0.0
Please provide the code you used to setup the OpenTelemetry SDK
tracing file
`
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
const { SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base");
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-proto');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { Resource } = require('@opentelemetry/resources');
const provider = new NodeTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: process.env.SERVICE,
}),
});
const collectorOptions = {
url: process.env.OTC_HOST
};
registerInstrumentations({
instrumentations: [new HttpInstrumentation()],
});
provider.register();
const exporter = new OTLPTraceExporter(collectorOptions);
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
`
Server File
`
const express = require('express'),
http = require('http'),
pino = require('pino'),
expressPino = require('express-pino-logger'),
bodyParser = require('body-parser');
const logger = pino({
level: process.env.LOG_LEVEL || 'info'
});
const expressLogger = expressPino({ logger });
const PORT = process.env.PORT || 6000;
const app = express();
app.use(expressLogger);
app.use(bodyParser.json());
app.get('/config', (req, res) => {
res.statusCode = 200;
res.json({status: 'OK' });
});
app.listen(PORT, () => {
logger.info('Server is running on port %d', PORT);
});
`
What did you do?
Running simple app instrumented for http talking to collector. Upto collector version 0.42 I see collector receive traces correctly, for versions > 0.42 no output in collector logs
If possible, provide a recipe for reproducing the error.
Attaching dockerized setup
basic.zip
What did you expect to see?
Traces in collector logs
What did you see instead?
Traces in collector logs for collector version <=0.42
No Traces in collector logs for collector version > 0.42
Additional context
Add any other context about the problem here.
I have seen a few tickers refer to issue communicating with the collector for metrics exporter. Example https://github.com/open-telemetry/opentelemetry-js/issues/2675 and https://github.com/open-telemetry/opentelemetry-js/issues/2886
However I don't see an issue for the traces exporter.
The text was updated successfully, but these errors were encountered: