Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Opentelemetry Auto Class Symfony Laravel Package

eerzho/opentelemetry-auto-class-symfony

View on GitHub
Deep Wiki
Context7

opentelemetry-auto-class-symfony

Version Downloads PHP License

Trace what your Symfony methods received, returned, and threw — without writing a single span.

The Symfony integration for opentelemetry-auto-class — your classes are discovered and registered automatically.

This is a read-only sub-split. Please open issues and pull requests in the monorepo.

Installation

composer require eerzho/opentelemetry-auto-class-symfony

Register the bundle:

// config/bundles.php
return [
    // ...
    Eerzho\Instrumentation\Class\Symfony\AutoClassBundle::class => ['all' => true],
];

Requirements:

Usage

Add #[Trace] to any class registered as a service:

namespace App\Service;

use Eerzho\Instrumentation\Class\Attribute\Trace;
use Eerzho\Instrumentation\Class\Attribute\TraceMethod;
use Eerzho\Instrumentation\Class\Attribute\TraceProperties;

#[Trace]                                   // mark the class for tracing
class OrderService
{
    // span "App\Service\OrderService::pay"
    #[TraceMethod(exclude: ['card'])]   // hide "card" from the span
    public function pay(int $orderId, string $card, Address $address): void {}

    public function healthCheck(): bool {}   // no #[TraceMethod] -> not traced
}

#[TraceProperties(exclude: ['zip'])]       // expand every prop but zip
class Address
{
    public function __construct(public string $city, public string $zip) {}
}

All three attributes and their options are fully documented in the core.

How it works

  1. During container compilation, scans all service definitions for the #[Trace] attribute
  2. Builds a method map and stores it as a container parameter
  3. On kernel boot, registers ext-opentelemetry hooks for matched methods

Only classes registered as services are discovered — a #[Trace] class that is never wired into the container is not instrumented.

Disabling instrumentation

OTEL_PHP_DISABLED_INSTRUMENTATIONS=class
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor