highlight icon indicating copy to clipboard operation
highlight copied to clipboard

@highlight-run/node times out exporting data

Open vadim-korolik opened this issue 3 years ago • 5 comments

Describe the bug

error: "highlight-node failed to flush:  Error [OTLPExporterError]: Request Timeout" 
Screenshot 2023-10-27 at 2 04 23 PM

vadim-korolik avatar Oct 27 '23 17:10 vadim-korolik

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)
      }  
    }

desduggan avatar Oct 27 '23 17:10 desduggan

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

vadim-korolik avatar Oct 27 '23 19:10 vadim-korolik

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 avatar Oct 27 '23 19:10 desduggan

@desduggan the fix to this is now released as @highlight-run/node v3.5.2 - let us know when you give it a try!

vadim-korolik avatar Nov 02 '23 07:11 vadim-korolik

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.

desduggan avatar Nov 02 '23 16:11 desduggan