@highlight-run/node times out exporting data
Describe the bug
error: "highlight-node failed to flush: Error [OTLPExporterError]: Request Timeout"
I'm experiencing this right now.. details:
- "@highlight-run/node": "^3.5.1",
- node version v19.2.0
Note I'm using KOA instead of Express, so I need to manually consume the errors in my error handler. I've confirmed that I'm splitting the header properly to get both session and request id, but it just hangs in the background and eventually times out and dies.
H.init({projectID: '<id>'})
....
// const parsedHeaders = H.parseHeaders(ctx.request.headers); // doesn't work with KOA headers
const highlightHeader = ctx.request.headers?.['x-highlight-request']
if (highlightHeader) {
const [secureSessionId, requestId] = highlightHeader.split('/')
if (secureSessionId && requestId) {
logger.info('Sending error to highlight', secureSessionId, requestId)
H.consumeError(err, secureSessionId, requestId)
}
}
Hi @desduggan and others that encounter this issue, could you try run the following locally and provide the output?
curl -o /dev/null -d '{}' -H "Content-Type: application/json" -s -w 'Total: %{time_total}s\n' https://otel.highlight.io/v1/traces
Hi @desduggan and others that encounter this issue, could you try run the following locally and provide the output?
curl -o /dev/null -d '{}' -H "Content-Type: application/json" -s -w 'Total: %{time_total}s\n' https://otel.highlight.io/v1/traces
Sure thing -- ran a few times:
Total: 1.373704s
Total: 0.482320s
Total: 0.469921s
Total: 0.474840s
@desduggan the fix to this is now released as @highlight-run/node v3.5.2 - let us know when you give it a try!
Thanks @Vadman97 !
Tried forcing error consumption this with "@highlight-run/node": "^3.5.2", and I didn't get the timeout, but I didn't see any additional logs / errors, and nothing showed up in the Highlight errors log, so it looks like errors aren't making it through yet.