opentracing / opentracing-php

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

Adds default value for spanOptions when creating a span. #27

Closed jcchavezs closed 6 years ago

jcchavezs commented 6 years ago

While working in the OT <> Zipkin bridge I found very inconvenient the fact that I should always need to pass a value for $spanOptions even if there is no values on it.

Another important concern here is the default start timestamp in the SpanOptions. As a vendor agnostic spec we can not set a default timestamp as of the unit depends on the vendor: ex. Zipkin uses microtime by default whereas datadog uses nanotime and other vendors could use a different one so I added documentation to the startSpan method.

Ping @yurishkuro @felixfbecker @beberlei