Inspector
BlogTry for free
  • Concepts
    • Introduction
    • Metrics
    • Notification Channels
      • Email
      • Slack
      • Telegram
      • Microsoft Teams
      • Google Chat
      • Webhook
      • Discord
      • Pushover
      • PagerDuty
      • Twilio - SMS
    • Filtering Syntax
    • Alerts
    • Grouping Patterns
    • Custom Segments
    • Billing
    • AI Bug Fixer
  • Security and access
    • Access control
    • Two-factor authentication
    • Connected Devices
  • SDK
    • PHP
      • Installation & Set Up
      • Custom Segments
      • Exceptions Monitoring
      • Configuration
    • Laravel / Lumen
      • Upgrade Guide
      • Installation & Set-up
      • Http Requests Monitoring
      • Configuration
      • Exception Monitoring
      • Laravel Vapor
      • Laravel Octane
      • Laravel Nova Tool
      • Group by service name
    • Symfony
      • Installation
      • Configuration
      • Exception Monitoring
    • CodeIgniter
      • Installation
      • Configuration
      • Exception Monitoring
    • Drupal
    • Spring Boot
    • Slim
    • NodeJS
      • Configurations
      • Custom Segments
      • Exception monitoring
      • Autowiring
    • ExpressJs
    • Fastify
    • Python
    • Django
      • Installation & Set Up
      • Custom Segments
      • Error Monitoring
  • REST API
    • Authentication
    • Apps
    • Platforms
    • Transactions
    • Segments
    • Analytics
Powered by GitBook
On this page
  • Master Switch
  • Track Unhandled Exceptions
  • Database Query Monitoring
  • Symfony Messenger Monitoring
  • Ignore Transactions
  • Ignore URLs
  • Ignore Commands
  • Ignore Messenger Messages
  • Transport
  1. SDK
  2. Symfony

Configuration

Customize the monitoring strategy in your Symfony application.

Here is the list of bundle options you can use to customize how Inspector collects data within your application.

Master Switch

Turn on/off monitoring in your application:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    # True by default
    enabled: false

Track Unhandled Exceptions

Turn on/off the unhandled exceptions reporting:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    # True by default
    unhandled_exceptions: false

Database Query Monitoring

Turn on/off monitoring of database statements:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    # True by default
    query: false
    query_bindings: false

query_bindings option allows you to collect the content of the parameters binded to a query.

Symfony Messenger Monitoring

Turn on/off the monitoring of asynchronous jobs scheduled by the Symfony Messenger component:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    # True by default
    messenger: false

Ignore Transactions

There may be parts of the application that you are not interested in monitoring. Maybe they were created for internal use, or for application maintenance, and have no impact on the user experience in production.

Inspector provides you several options to keep off the noise, and only monitor what matters.

Ignore URLs

You can turn off monitoring based on url. Paste the "ignore_urls" option below into the config/packages/inspector.yaml file to add your custom entries:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    ignore_urls:
        - '/admin*' # Also with wildcard

As you can see above, we exclude several http endpoints by default. You can continue adding yours as needed.

Ignore Commands

You can ignore commands adding the command defaultName to the ignore_commands collection in the config/packages/inspector.yaml file.

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    ignore_commands:
        - 'app:create-user'
        - 'app:internal*' # Also with wildcard

Ignore Messenger Messages

You can ignore messages processed in background by adding the message's class to the ignore_messages collection in the config/packages/inspector.yaml file.

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    ignore_messages:
        - 'App\Messenger\Messages\SmsNotification'
        - 'App\Messenger\Messages\EmailInternal*' # Also with wildcard

Transport

Inspector supports two type of strategies to send data from your application to the remote Inspection APIs: sync and async.

The async strategy is default one, and it basically process data sending in a process completely independent by your application lifecycle so your application will have zero impact in terms of performance.

The async transport requires two PHP native functions enabled: proc_open, and proc_close.

Sometimes in local environemts you don't have these functions enabled, so you can switch to the sync transport with a simple configuration property:

inspector:
    ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
    
    transport: 'sync'
PreviousInstallationNextException Monitoring

Last updated 12 days ago