Manual calls of Monti.trackError doesn't include previous actions
vrizo opened this issue · comments
Hello!
Thank you for this beautiful package! We use your project in Chatra, and we love it. We want to use Monti APM to debug some weird bugs. The only issue is that I don't see the preceding actions in the Monti APM Dashboard:
Compare it with the production environment when Monti catches real errors:
I added the call like this:
Monti.trackError(new Error('Test error 2'));
Also, I tried to wrap it like this:
const event = Monti.startEvent('sibInterop', {
details: true
});
… // lots of HTTP requests
Monti.trackError(new Error('Test error 2'));
…
Monti.endEvent(event, {
additionalDetails: true
});
And I set eventStackTrace
to true
in our settings.json
. But nothing helps. I see only a single error message instead of a full stack trace.
Is it possible to fix it? Can you please recommend something?
Our versions:
meteor@1.10.0
montiapm:agent@2.45.1
montiapm:meteorx@2.2.0
Hey @vrizo where are you running that code, is it inside a method? How are you making the http calls? Which package?
The trackError
by itself will not capture the data I am afraid. Here is my attempt, it did track database operations:
Are the options you mentioned the only ones you are using? Can you provide an anonymized version of the options for us?
When using Monti.trackError
, it creates a new trace with just the start and error events:
Lines 354 to 362 in 26dfdd9
@vrizo I published a beta today which fixes this. You can try it by running
meteor add montiapm:agent@2.47.0-beta.1
Thank you, guys! Sorry for the late answer, I didn't get any notifications from Github
We've released version 2.47.0.
Thanks you, guys, @zodern @leonardoventurini! The updated version (2.47.0) works perfectly now