opentracing-php icon indicating copy to clipboard operation
opentracing-php copied to clipboard

Fluent interface for Span

Open memboc opened this issue 4 years ago • 0 comments

Proposal

Would be great to make fluent interface for Span. It's very popular practice

now:

        $scope->getSpan()->setTag(Tags::ERROR, true);
        $scope->getSpan()->setTag(Tags::STATUS_CODE, $httpCode);
        $scope->getSpan()->log(['message' => $response]);

fluent interface:

        $scope->getSpan()
            ->setTag(Tags::ERROR, true)
            ->setTag(Tags::STATUS_CODE, $httpCode)
            ->log(['message' => $response]);

memboc avatar Aug 19 '20 05:08 memboc