Skip to content

No performance data captured using GuzzleTracingMiddleware #1102

Description

@dsgepers

Using the code from the docs I have the problem that no performance data is captured from my guzzle requests. (using it to call external services)

use Sentry\Tracing\GuzzleTracingMiddleware;

$stack = HandlerStack::create();
$stack->push(GuzzleTracingMiddleware::trace());

$client = new Client([
    'handler' => $stack
]);
$result = $this->client->request('POST', "{$this->uri}/do/something/", [
    'auth' => [$this->username, $this->password],
    'json' => $payload,
]);

This Middleware never captures performance data for me. I was trying to trace why, but didn't get a conclusive answer, basically it's because in the GuzzleTracingMiddleware:34 it calls $span->finish, but $span is a \Sentry\Tracing\Span (where in the finish method no event is captures) instead of a \Sentry\Tracing\Transaction (where in the finish method an event is captured). But I'm not sure why this property is a Span instead of a Transaction.

My relevant package versions:

        "guzzlehttp/guzzle": "^7.0",
        "sentry/sdk": "^3.0"

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions