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.
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.