Skip to main content

BitDive Advanced Configuration Guide

This page provides an overview of the default configuration settings for config-profiling.yml in BitDive. The settings in this file determine how Bitdive monitors your application, including which methods and components to track, logging levels, and file handling. This configuration can be modified to fit your application’s needs.

Default Configuration File

Below is the advanced configuration for config-profiling.yml:

application:
moduleName: TestModule # Name of your module
serviceName: TestService # Name of your service
packedScanner: ["com.your.package"] # Replace with your main package name

monitoring:
logLevel: DEBUG # Controls logging detail level
monitoringArgumentMethod: true # Track method arguments
monitoringReturnMethod: true # Track return values
monitoringStaticMethod: false # Track static methods
monitoringOnlySpringComponent: false # Set true for Spring components only
dataFile:
path: monitoringData # Directory for storing monitoring data
timerConvertForSend: 10 # Conversion timer in seconds
fileStorageTime: 30 # How long to keep files (days)
sendFiles:
serverConsumer:
url: https://your-server-ip:8082
vault:
url: https://your-server-ip:8200
login: username
password: password123
schedulerTimer: 1000 # How often to send files (milliseconds)
serialization:
excludedPackages: ["com.sun.", "sun.", "org.apache.", "org.springframework.", "com.zaxxer."]
maxElementCollection: 50 # Max elements to collect in collections

authorisation:
token: 34geg54gb4 # Authentication token

Explanation of Settings

Application Settings

  • moduleName: The name of your module. This identifier can be customized to fit your module structure.
  • serviceName: Name of the service being monitored. This can also be customized based on your service architecture.
  • packedScanner: Array of packages to scan for profiling. Default includes just "default".

Monitoring Settings

  • logLevel: Sets the verbosity of logs (ERRORS/INFO/DEBUG)
  • monitoringArgumentMethod: When set to true, tracks method arguments
  • monitoringReturnMethod: Enables tracking of return values from methods
  • monitoringStaticMethod: Controls monitoring of static methods
  • monitoringOnlySpringComponent: When true, only monitors Spring-annotated components

Data File Settings

  • dataFile:
    • path: Directory where monitoring files are stored
    • timerConvertForSend: How often files are converted for sending (in seconds)
    • fileStorageTime: How long to keep files (in days)

Send Files Settings

  • sendFiles:
    • serverConsumer.url: Endpoint where monitoring files are sent
    • serverConsumer.proxy: (Optional) Proxy configuration:
      • url: Proxy server URL
      • login: Proxy authentication username
      • password: Proxy authentication password
    • schedulerTimer: Interval for sending files (in milliseconds)

Example with proxy configuration:

sendFiles:
serverConsumer:
url: http://localhost:8080
proxy:
url: http://proxy.company.com:8080
login: proxyuser
password: proxypass
schedulerTimer: 1000

Serialization Settings

  • serialization:
    • excludedPackages: Array of package prefixes to exclude from monitoring
    • maxElementCollection: Maximum number of elements to collect in collections

Authorization Settings

  • token: Token used for authorizing monitoring data access. Default token: 34geg54gb4.

Log Levels Explained

The logLevel setting determines the detail level of logs. Here’s a quick overview of each level:

public enum LogLevelEnum {
ERRORS, INFO, DEBUG
}
  • ERRORS: Logs only error messages.
  • INFO: Logs general events and operations, suitable for most monitoring.
  • DEBUG: Provides detailed logs, useful for in-depth analysis and troubleshooting.

Use this default configuration as a starting point and adjust settings based on your monitoring needs.