4.3 KiB
4.3 KiB
IronTelemetry SDK for Java
Error monitoring and crash reporting for Java applications
Website • Documentation • Java Guide • Git
IronTelemetry helps you capture exceptions, track user journeys, and get actionable insights to fix issues faster. Built for developers who want simple, powerful error monitoring without the complexity.
Features
- Exception Capture - Automatically capture exceptions with full stack traces
- Journey Tracking - Understand what users did before an error occurred
- Breadcrumbs - Add context with custom breadcrumbs and metadata
- Async Support - CompletableFuture support for async operations
- Thread-Safe - All operations are safe for concurrent use
- Spring Integration - Easy integration with Spring Boot
Installation
Maven
<dependency>
<groupId>com.ironservices</groupId>
<artifactId>telemetry</artifactId>
<version>0.1.0</version>
</dependency>
Gradle
implementation 'com.ironservices:telemetry:0.1.0'
Quick Start
Initialize the SDK
import com.ironservices.telemetry.TelemetryClient;
TelemetryClient client = new TelemetryClient("https://pk_live_xxx@irontelemetry.com");
Capture Exceptions
try {
doSomething();
} catch (Exception e) {
client.captureException(e);
throw e;
}
Track User Journeys
Journey journey = client.startJourney("Checkout Flow");
journey.setUser("user-123", "user@example.com", "John Doe");
try {
journey.runStep("Validate Cart", BreadcrumbCategory.BUSINESS, () -> {
validateCart();
});
journey.runStep("Process Payment", BreadcrumbCategory.BUSINESS, () -> {
processPayment();
});
journey.complete();
} catch (Exception e) {
journey.fail(e);
client.captureException(e);
throw e;
}
Add Breadcrumbs
client.addBreadcrumb("User clicked checkout button", BreadcrumbCategory.UI);
client.addBreadcrumb("Payment API called", BreadcrumbCategory.HTTP);
Spring Integration
@ControllerAdvice
public class GlobalExceptionHandler {
private final TelemetryClient telemetryClient;
@ExceptionHandler(Exception.class)
public ResponseEntity<?> handleException(Exception e) {
telemetryClient.captureException(e);
return ResponseEntity.status(500).body("Internal Server Error");
}
}
Configuration
TelemetryOptions options = new TelemetryOptions("https://pk_live_xxx@irontelemetry.com")
.setEnvironment("production")
.setAppVersion("1.2.3")
.setSampleRate(1.0)
.setDebug(false);
TelemetryClient client = new TelemetryClient(options);
Documentation
For complete documentation, visit irontelemetry.com/docs.
Other SDKs
| Platform | Package |
|---|---|
| JavaScript/TypeScript | @ironservices/telemetry |
| .NET | IronTelemetry.Client |
| Python | irontelemetry |
| Go | irontelemetry-go |
| Rust | irontelemetry |
Support
- Documentation: irontelemetry.com/docs
- Email: dev@ironservices.io
- Issues: git.marketally.com/ironservices/irontelemetry-java/issues
License
MIT License - see LICENSE for details.