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
  • Requirements
  • Installation
  • Reload application dependencies:
  • Configure the ingestion key
  • Outgoing HTTP calls
  • Test & Deploy
  • Important notes
  1. SDK

Spring Boot

Code Execution Monitoring for Spring Boot applications

Requirements

  • Spring Boot 3.x

Installation

Add the package to your application's dependencies list in the pom.xml file:

<dependency>
    <groupId>dev.inspector</groupId>
    <artifactId>spring</artifactId>
    <version>[1.0.3,2.0.0)</version>
</dependency>

Reload application dependencies:

mvn clean install

Configure the ingestion key

Add the following configuration to the application.properties file:

inspector.ingestion-key=81e6d4df93xxxxxxxxxxxxxxxxxxxxxxxxxx

Outgoing HTTP calls

Currently we only support outgoing http monitoring for RestTemplate http client.

To enable http monitoring for RestTemplate you have to manually add RestTemplateMonitoringInterceptor as an interceptor when creating your RestTemplate bean. Check the example in the snippet below:

       @Autowired
       private RestTemplateMonitoringInterceptor restTemplateInterceptor;

       @Bean
       public RestTemplate restTemplate(RestTemplateBuilder builder) {
           return builder
               .interceptors(restTemplateInterceptor)
               .build();
       }

Test & Deploy

By default Inspector monitors:

  • Incoming HTTP requests

  • Scheduled Tasks

  • Database Queries

  • Outgoing HTTP calls

Once verified that everything works and your application is connected, you can deploy the integration into the production environment.

Important notes

Applications without Spring Data layer

At the moment the package auto-configure monitoring for JDBC calls. This means that interactions with relational databases are monitored, whether they are done via Spring Data or via low level JDBC API.

If you're using this library and not using Spring Data in your project please add the following line in your application.properties to disable Spring Boot's auto-configuration attempt of data source beans:

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
PreviousDrupalNextSlim

Last updated 3 months ago

Run an HTTP request against your application (or navigate it with a browser) to see the first data flowing into the .

Use the live chat in your dashboard if you have any questions, or for further support.

Inspector dashboard
schedule a meeting