Skip to content

Captured message stack traces are not being sent by default (payload serialized decision) #1127

Description

@rootpd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions