Skip to content

freshcells/instrumentation-bundle

 
 

Repository files navigation

Instrumentation for Symfony

Features

Tracing

  • Using the official OpenTelemetry SDK
  • Minimal auto-instrumentation for requests, console commands, consumers and doctrine
  • Trace context propagation from incoming requests to consumers and outgoing http calls
  • Configurable blacklisting of requests by path to avoid useless traces, eg. /metrics or /_healthz
  • Automatic log inclusion with configurable log level and channels

Metrics

  • Using the Prometheus Client
  • Minimal auto-instrumentation for common request, consumer and message metrics (see list of provided default metrics).
  • Autoconfigurable metric providers, see below.

Logging

  • Adds trace context to logs for correlation, with customizable keys.

Baggage

  • Using the official OpenTelemetry SDK
  • Baggage propagation from incoming requests to consumers and outgoing http calls

Health

  • A simple endpoint to expose application health (default: /_healthz)
  • Autoconfigurable healthcheck interface to add healtchecks to be made for global application health

Installation and configuration

composer require worldia/instrumentation-bundle

Add to bundles.php:

return [
    // Other bundles
    Instrumentation\InstrumentationBundle::class => ['all' => true],
];

Minimal configuration
See the complete configuration reference here or run bin/console config:dump-reference instrumentation.

instrumentation:
  resource:
    service.name: my-app
  tracing:
    dsn: 'jaeger+http://jaeger:9411/api/v2/spans'

Usage

About

Instrumentation for Symfony

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.5%
  • Twig 0.5%