github keepsuit/laravel-opentelemetry 1.0.0
v1.0.0

latest releases: 1.13.0, 1.12.0, 1.11.0...
13 months ago

Breaking changes

This release contains a lot of breaking changes

  • Compare your published config and update it accordingly.
  • ENV variables prefix is changed from OT to OTEL and some env variables are changed.
  • Tracer has been completely refactored, manual traces must been updated with the new methods.

Tracer::start, Tracer::measure and Tracer::measureAsync has been removed and replaced with:

Tracer::newSpan('name')->start(); // same as old start
Tracer::newSpan('name')->measure(callback); // same as old measure
Tracer::newSpan('name')->setSpanKind(SpanKind::KIND_PRODUCER)->measure(callback); // same as old measureAsync

Tracer::recordExceptionToSpan has been removed and exception should be recorded directly to span: $span->recordException($exception)

Tracer::setRootSpan($span) has been removed, it was only used to share traceId with log context. This has been replaced with Tracer::updateLogContext()

Logging

This release introduce a custom log channel for laravel otlp that allows to collect laravel logs with OpenTelemetry.
This is the injected otlp channel:

// config/logging.php
'channels' => [
    // injected channel config, you can override it adding an `otlp` channel in your config
    'otlp' => [
        'driver' => 'monolog',
        'handler' => \Keepsuit\LaravelOpenTelemetry\Support\OpenTelemetryMonologHandler::class,
        'level' => 'debug',
    ]
]

What's Changed

Full Changelog: 0.4.0...1.0.0

Don't miss a new laravel-opentelemetry release

NewReleases is sending notifications on new releases.