opentracing / opentracing-php

OpenTracing API for PHP
Apache License 2.0
508 stars 56 forks source link

Getting rid of $logRecords argument from Span::finish() #53

Closed ellisv closed 6 years ago

ellisv commented 6 years ago

Background

Current interface looks as such

public function finish($finishTime = null, array $logRecords = []);

PHP docs does not say anything about this optional $logRecords parameter but I assume it logs events before finishing the span.

Problem

Proposal

Getting rid of $logRecords argument for Span::finish(). I think it is better to do it explicitly like

$span->log([...])
$span->finish();