-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Integrating Argus with Spring Boot applications requires:
- Manual agent configuration
- JVM argument setup
- No auto-configuration
- Difficult to enable/disable based on profile
Proposed Solution
Create a Spring Boot Starter for seamless integration:
- Auto-configuration based on classpath
- Properties-based configuration
- Actuator integration
- Profile-aware enablement
Acceptance Criteria
- Create
argus-spring-boot-startermodule - Implement auto-configuration
- Add
@EnableArgusannotation (optional) - Support
application.propertiesconfiguration - Integrate with Spring Boot Actuator
- Add health indicator
- Support conditional enablement by profile
- Publish to Maven Central
Module Structure
argus-spring-boot-starter/
├── src/main/java/io/argus/spring/
│ ├── ArgusAutoConfiguration.java
│ ├── ArgusProperties.java
│ ├── ArgusHealthIndicator.java
│ └── EnableArgus.java
├── src/main/resources/
│ └── META-INF/spring/
│ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
└── build.gradle.kts
Usage
Maven
<dependency>
<groupId>io.argus</groupId>
<artifactId>argus-spring-boot-starter</artifactId>
<version>0.2.0</version>
</dependency>Gradle
implementation("io.argus:argus-spring-boot-starter:0.2.0")Configuration
# application.yml
argus:
enabled: true
server:
port: 8081
buffer:
size: 65536
persistence:
enabled: falseProfile-based
# application-dev.yml
argus:
enabled: true
# application-prod.yml
argus:
enabled: falseAnnotation (Optional)
@SpringBootApplication
@EnableArgus
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}Actuator Integration
GET /actuator/argus
{
"status": "UP",
"details": {
"eventsTotal": 15234,
"activeThreads": 45,
"pinnedEvents": 12,
"serverPort": 8081,
"webSocketClients": 2
}
}
Health Indicator
@Component
public class ArgusHealthIndicator implements HealthIndicator {
@Override
public Health health() {
return Health.up()
.withDetail("eventsTotal", metrics.getTotalEvents())
.withDetail("activeThreads", registry.size())
.build();
}
}Technical Considerations
- Use Spring Boot 3.x auto-configuration
- Support both annotation and properties-based setup
- Graceful shutdown handling
- Lazy initialization option
- Consider GraalVM native image compatibility
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request