opentracing / opentracing-php

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

Delete $logRecords argument from Span::finish() #54

Closed ellisv closed 6 years ago

ellisv commented 6 years ago

Also see #53

This $logRecords is not documented by any PHP docs but I imply that implementation suppose to call log() before flushing.

Having that means

Instead promote usage of

$span->log([...]);
$span->finish();
jcchavezs commented 6 years ago

Ping @beberlei @tedsuo @yurishkuro

yurishkuro commented 6 years ago

+1

logs-on-finish were originally added to Go API to handle offline processing cases. Specifically, the logRecord contains the timestamp, while the standard log() methods don't allow timestamp (since Go doesn't support method overloading). In languages that allow overloading or optional arguments, I don't see a reason for having bulk logs-on-finish.

jcchavezs commented 6 years ago

+1 Ping @beberlei