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

Sentry Enhanced Tracing Laravel Package

amarc-sudo/sentry-enhanced-tracing

View on GitHub
Deep Wiki
Context7
1.2.0

Added

  • Symfony 8 support: dependency constraints widened to ^6.4|^7.0|^8.0; validated against Symfony 8.1, lexik 3.2, sentry-symfony 5.10 and API Platform 4.x, down to Symfony 6.4 / sentry-symfony 5.0 (--prefer-lowest).
  • PHPUnit in CI: composer test script, phpunit.xml.dist, and a test step in both workflows (tests existed but were never run).
  • Explicit symfony/config, symfony/event-dispatcher and symfony/yaml runtime dependencies (previously relied on transitively).

Changed

  • Minimum PHP raised to 8.2 to match the readonly class already used by the listeners (the >=8.1 constraint could not actually run the code).
  • CI matrix updated to PHP 8.2/8.3/8.4 (8.1 can no longer parse the code); other jobs moved off PHP 8.1.
  • Event listeners are now registered solely via services.yaml, removing the redundant #[AsEventListener] attributes (see fixes below).
  • Queue destination resolution now prefers the real transport name over the message class, matching the OpenTelemetry messaging.destination.name convention and the publish-side logic.
  • Relaxed the Psalm configuration to a pragmatic level so composer psalm runs green (it previously could not pass and never ran clean).

Fixed

  • Double-firing listeners on Symfony 7/8 and a fatal error on Symfony 6.4: the tracing listeners declared both #[AsEventListener] attributes and services.yaml tags. On Symfony 7+ this registered every listener twice (duplicated spans); on Symfony 6.4 the non-repeatable AsEventListener attribute caused a fatal error.
  • Messenger referenced non-existent Symfony classes: removed Symfony\Component\Messenger\Stamp\UuidStamp and Symfony\Component\Messenger\Event\DispatchEvent, which do not exist in Symfony Messenger. The phantom DispatchEvent subscription never fired, so user propagation to workers was silently broken; trace/user stamping now runs on the real SendMessageToTransportsEvent.
  • Broken transport detection: the publish span read transports via a non-existent getTransportNames() (always empty); it now uses SendMessageToTransportsEvent::getSenders().
  • Type fixes surfaced by static analysis on the latest SDKs: nullable baggage passed to Sentry\continueTrace(), a redundant non-null check on getThrowable(), and an int/float operand in the receive-latency calculation.
  • Broken QA config: phpstan.neon referenced non-existent tests/bootstrap.php and tests/console-loader.php, which crashed PHPStan.
1.1.0

Added

  • Symfony Messenger queue monitoring: automatic queue.publish span on dispatch and queue.process transaction on workers.
  • SentryTraceStamp / SentryUserStamp: traceparent+baggage and user context propagation across Messenger hops.
  • Metadata enrichment: message id, destination, body size, retry count, receive latency mapped to Sentry queue fields.
  • Auto-registration: listeners wired by default; user propagation toggle via sentry_enhanced_tracing.messenger.propagate_user.
  • Documentation & example: Messenger queue section in docs and examples/messenger-queue-monitoring.php.

Changed

  • composer.json: declare symfony/messenger as a runtime dependency.

Tests

  • Added unit tests for Messenger metadata extractor and trace stamp.
1.0.1

Added

  • TraceSentryController Attribute: New PHP 8+ attribute for explicit controller tracing
  • Controller-specific tracing: Precise measurement of controller execution time
  • API Platform controller support: Automatic detection and tracing of __invoke() controllers
  • Attribute-based configuration: Custom operation names, descriptions, and tags per controller
  • Precise timing measurement: Excludes event listeners, measures only controller business logic
  • Active span management: Automatic child span capture for database queries, cache operations, etc.
  • Exception handling: Robust cleanup and error tracking for traced controllers
  • Controller metadata: Rich span data including controller name, type, and execution status

Features

  • SentryApiPlatformControllerTracer: New event listener for controller-specific tracing
  • TraceSentryController attribute: Configurable per-controller or per-method tracing
  • Extreme priority listeners: Uses -99999/100000 priorities for precise timing
  • Automatic child span capture: Database queries, cache operations become controller children
  • Controller execution isolation: Measures only business logic, excludes framework overhead
  • Custom operation naming: Configurable span names and descriptions
  • Flexible tagging system: Add custom metadata to controller spans
  • Multi-event cleanup: Handles view, response, and exception events for span completion

Examples

  • traced-controller-usage.php: Comprehensive examples of attribute usage patterns
  • Multiple controller patterns: Support for both invokable and action method controllers
  • Attribute configuration: Examples of custom operation names, descriptions, and tags

Technical Implementation

  • Reflection-based attribute detection: Supports both class and method-level attributes
  • Sentry Hub integration: Proper active span management for child capture
  • Performance optimization: Extreme event priorities for precise measurement
  • Memory-efficient: Minimal overhead with proper resource cleanup
  • Exception-safe: Robust error handling with proper span finalization

Documentation

  • Usage examples: Complete controller tracing patterns
  • Configuration reference: All attribute options and parameters
  • Performance impact: Detailed explanation of timing precision
  • Best practices: Guidelines for optimal controller tracing
1.0.0

Added

  • 🎉 Initial stable release of Sentry Enhanced Tracing Bundle
  • SentryListenerPhasesTracer: Core listener phase tracking with automatic child span capture
  • SentryUserContextListener: Enhanced user context and request metadata capture with JWT integration
  • ChangeSentryListenerPriorityPass: Optimized Sentry listener priority management
  • EnhancedUserInterface: Rich user data interface for better Sentry context
  • JWT Authentication Integration: Automatic user capture after JWT authentication
  • Automatic child span capture: Database queries, cache operations, template rendering
  • Performance categorization: Fast/normal/slow/very_slow classification
  • Rich breadcrumbs: Detailed execution metrics and performance data
  • Zero-configuration setup: Works out of the box with minimal setup
  • Symfony 6.x and 7.x support: Compatible with latest Symfony versions
  • PHP 8.1+ support: Modern PHP version requirements

Features

  • Hierarchical span organization in Sentry dashboard
  • Automatic DBAL query tracing under event phases
  • Cache operation monitoring (Redis, APCu, etc.)
  • Template rendering performance tracking
  • HTTP client request monitoring
  • Memory usage and execution time metrics
  • Exception context enrichment
  • JWT authentication hooks with lexik_jwt_authentication.on_jwt_authenticated
  • Enhanced user data capture (firstname, lastname, email, UUID)
  • Security-aware PII handling
  • Configurable performance thresholds
  • High-priority listener execution (99999-99995)

Developer Experience

  • Code Quality Tools: PHPStan (level 8), Psalm (level 1), PHPCS with PSR-12
  • Automated Quality Assurance: Composer scripts for phpstan, phpcs, psalm, and qa
  • Strict Type Checking: Full PHP 8.1+ type coverage
  • Professional Documentation: Comprehensive examples and configuration guides
  • CI/CD Integration: GitHub Actions workflows for automated testing
  • Multiple PHP versions support: Tested on PHP 8.1, 8.2, 8.3

Dependencies

  • LexikJWTAuthenticationBundle: Required for JWT authentication integration
  • Symfony Security Bundle: For user context management
  • Sentry Symfony Bundle: Core Sentry integration
  • Modern PHP ecosystem: Compatible with latest Symfony and PHP versions

Documentation

  • Comprehensive README with usage examples
  • JWT Integration Guide with LexikJWTAuthenticationBundle
  • Enhanced User Interface implementation examples
  • Configuration reference with all available options
  • CI/CD documentation for GitHub Actions
  • Installation and setup guides
  • Performance optimization recommendations

Technical Architecture

  • PSR-4 autoloading with proper namespacing
  • Symfony Bundle architecture with dependency injection
  • Event listener attributes for modern Symfony integration
  • Compiler pass optimization for performance
  • Service configuration with proper priorities
  • Interface-based design for extensibility
  • MIT License for open-source compatibility

Quality Assurance

  • PHPStan Level 8: Strictest static analysis
  • Psalm Level 1: Advanced type checking
  • PHPCS PSR-12: Coding standards compliance
  • Slevomat Coding Standard: Additional quality rules
  • Automated testing: GitHub Actions CI pipeline
  • Security scanning: Dependency vulnerability checks
0.1.0

Added

  • Initial development version
  • Basic proof of concept
  • Core listener implementation
  • Sentry integration testing

Legend
  • Added: New features
  • Changed: Changes in existing functionality
  • Deprecated: Soon-to-be removed features
  • Removed: Removed features
  • Fixed: Bug fixes
  • Security: Security improvements
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
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
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