fix(core): append correct OTLP paths for HTTP exporters (#16836)

This commit is contained in:
Sébastien Prud'homme
2026-03-06 20:58:00 +01:00
committed by GitHub
parent 1a7d4184cd
commit 7d31d5f4ec
2 changed files with 13 additions and 7 deletions
+4 -4
View File
@@ -113,13 +113,13 @@ describe('Telemetry SDK', () => {
await initializeTelemetry(mockConfig);
expect(OTLPTraceExporterHttp).toHaveBeenCalledWith({
url: 'http://localhost:4318/',
url: 'http://localhost:4318/v1/traces',
});
expect(OTLPLogExporterHttp).toHaveBeenCalledWith({
url: 'http://localhost:4318/',
url: 'http://localhost:4318/v1/logs',
});
expect(OTLPMetricExporterHttp).toHaveBeenCalledWith({
url: 'http://localhost:4318/',
url: 'http://localhost:4318/v1/metrics',
});
expect(NodeSDK.prototype.start).toHaveBeenCalled();
});
@@ -141,7 +141,7 @@ describe('Telemetry SDK', () => {
);
await initializeTelemetry(mockConfig);
expect(OTLPTraceExporterHttp).toHaveBeenCalledWith(
expect.objectContaining({ url: 'https://my-collector.com/' }),
expect.objectContaining({ url: 'https://my-collector.com/v1/traces' }),
);
});