Hi all,
I am trying to attach stack traces to the captured messages (not exceptions).
- I initialize
Client with attach_stacktrace set to true.
- I call
captureMessage('foo)
- Indeed, the tracked event has the stack trace correctly set when I try to debug it.
- The
payloadSerializer doesn't include it in the final payload, because there are no exceptions (I'm tracking the message).
|
$exceptions = $event->getExceptions(); |
|
|
|
for ($i = \count($exceptions) - 1; $i >= 0; --$i) { |
|
$result['exception']['values'][] = $this->serializeException($exceptions[$i]); |
|
} |
I stumbled upon #859, but it looks like it doesn't really handle this very issue.
I also tried to use my own payloadSerializer, but setting it up would require copying lot of private methods outside of Client initialization and it didn't feel right. Even more when you mentioned that it should be automatically attached (#859 (comment)).
Am I missing something here?
Thanks for any help.
Hi all,
I am trying to attach stack traces to the captured messages (not exceptions).
Clientwithattach_stacktraceset totrue.captureMessage('foo)payloadSerializerdoesn't include it in the final payload, because there are no exceptions (I'm tracking the message).sentry-php/src/Serializer/PayloadSerializer.php
Lines 145 to 149 in b1c8679
I stumbled upon #859, but it looks like it doesn't really handle this very issue.
I also tried to use my own
payloadSerializer,but setting it up would require copying lot of private methods outside ofClientinitialization and it didn't feel right. Even more when you mentioned that it should be automatically attached (#859 (comment)).Am I missing something here?
Thanks for any help.