faro-web-sdk
faro-web-sdk copied to clipboard
Getting transport-otlp-http errors
Description
Hi 👋 We're using faro libraries to send logs and traces to our collectors.
We're seeing some errors in the console (check them below) and partialSuccess on network requests.
These are the packages we use:
"@grafana/faro-react": "^1.8.0",
"@grafana/faro-transport-otlp-http": "^1.8.0",
"@grafana/faro-web-sdk": "^1.8.0",
"@grafana/faro-web-tracing": "^1.8.0",
And this is our configuration
initializeFaro({
app: {
name: 'our-app/browser',
version: '2023.test',
},
transports: [
new OtlpHttpTransport({
logsURL: 'collectorURL/logs',
tracesURL: 'collectorURLtraces',
}),
],
instrumentations: [
// Load the default Web instrumentations
...getWebInstrumentations(),
// Tracing Instrumentation is needed if you want to use the React Profiler
new TracingInstrumentation({
instrumentationOptions: {
propagateTraceHeaderCorsUrls: [/.*/],
},
}),
new ReactIntegration({
// Only needed if you want to use the React Router instrumentation
router: createReactRouterV6Options({
createRoutesFromChildren,
matchRoutes,
Routes,
useLocation,
useNavigationType,
}),
}),
],
});
These are the errors we see in the console
Steps to reproduce
- Add previously mentioned faro libraries to React project
- Use the configuration pasted above
- Open application in Chrome and try to send logs & traces
- Tada!
Expected behavior
All traces and metrics should be captured and response should be FullSuccess
Actual behavior
Some logs and metrics are captured but some are lost. And we keep getting those errors in the console.
Environment
- all packages are
1.8.0 @grafana/faro-react, @grafana/faro-transport-otlp-http, @grafana/faro-web-sdk, @grafana/faro-web-tracing;- Chrome