public function send(string $priority, string $message, array $context = [])
    {
        if (! $this->contextContainsException($context)) {
            $data = [
                'extra' => $this->sanitizer->sanitize($context),
                'level' => $priority,
            ];

            $this->client->captureMessage(
                $message,
                [],
                $data,
                $this->stackTrace->cleanBacktrace(debug_backtrace())
            );

            return;
        }

        /** @var \Exception $exception */
        $exception = $context['exception'];
        unset($context['exception']);

        $exceptionsStack = $this->stackTrace->getExceptions($exception);

        // Adding a first fake exception to log the message
        $stack = $this->stackTrace->cleanBacktrace(debug_backtrace());
        $exceptionsStack[] = [
            'value' => $message,
            'type' => get_class($exception),
            'stacktrace' => [
                'frames' => $this->stackTrace->getStackTraceFrames($stack),
            ],
        ];

        $data = [
            'extra' => $this->sanitizer->sanitize($context),
            'level' => $priority,
            'exception' => [
                'values' => $exceptionsStack,
            ],
        ];

        $this->client->captureMessage($message, [], $data);
    }