Closed ghost closed 4 years ago
Hey so it looks like the inital code is actually not quite what you want:
[Array(50)].map(() => dbClient.query('SELECT RANDOM() * 10'))
needs the spread operator to work like range
/xrange
would -- you need [...Array(50)]
. What was actually happening was exactly ONE request was happening.But there was also a subtle bug in the agent code -- the instrumentation was not creating enough new async namespaces -- it took a while but it's finally fixed, testing it in the dashboard now.
With the following code:
The render span is being reported before the end of the
client.query
span(s):Payload:
This shouldn't happen, as
Promise.all
should guarantee that the.then
run after all theclient.query
promises finish.