Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 47 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Logdash Java SDK

[![GitHub Release](https://img.shields.io/github/v/release/logdash-io/java-sdk)](https://github.com/logdash-io/java-sdk/releases)
[![Maven Central](https://img.shields.io/maven-central/v/io.logdash/logdash)](https://central.sonatype.com/artifact/io.logdash/logdash)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Java Version](https://img.shields.io/badge/Java-17+-blue.svg)](https://openjdk.java.net/projects/jdk/17/)
[![CI/CD](https://github.com/logdash-io/java-sdk/workflows/CI/CD%20Pipeline/badge.svg)](https://github.com/logdash-io/java-sdk/actions)
[![Coverage](https://img.shields.io/codecov/c/github/logdash-io/java-sdk)](https://codecov.io/gh/logdash-io/java-sdk)

Official Java SDK for [Logdash.io](https://logdash.io/) - Zero-configuration observability platform designed for developers working on side projects and prototypes.
> **Official Java SDK for [Logdash.io](https://logdash.io/) - Zero-configuration observability platform designed for developers working on side projects and prototypes.**

## Why Logdash?

Most observability solutions feel overwhelming for hobby projects. Logdash provides instant logging and real-time
metrics without complex configurations. Just add the SDK and start monitoring your application immediately.
Most observability solutions feel overwhelming for small projects and prototypes. Logdash provides **instant logging and real-time metrics** without complex configurations. Just add the SDK and start monitoring your application immediately.

## Features
## Key Features

- **🚀 Zero Configuration**: Start logging and tracking metrics in seconds
- **📊 Real-time Dashboard**: Cloud-hosted interface with live data updates
Expand All @@ -23,15 +24,13 @@ metrics without complex configurations. Just add the SDK and start monitoring yo
- **🔧 Framework Agnostic**: Works with Spring Boot, Quarkus, Micronaut, or standalone apps
- **☕ Java 17+ Compatible**: Supports Java 17, 21, and all newer versions

## Quick Start

### Installation
## Pre-requisites

**Maven Central**
Setup your free project in less than 2 minutes at [logdash.io](https://logdash.io/)

Add the dependency to your project:
## Installation

**Maven:**
### Maven Central

```xml
<dependency>
Expand All @@ -41,23 +40,23 @@ Add the dependency to your project:
</dependency>
```

**Gradle:**
### Gradle

```gradle
```groovy
dependencies {
implementation 'io.logdash:logdash:0.2.0-SNAPSHOT'
}
```

**Gradle (Kotlin DSL):**
### Gradle (Kotlin DSL)

```kotlin
dependencies {
implementation("io.logdash:logdash:0.2.0-SNAPSHOT")
}
```

**Local Installation**
### Local Installation

```bash
# Clone and install locally
Expand All @@ -76,6 +75,8 @@ Then use in your project:
</dependency>
```

## Quick Start

### Basic Usage

```java
Expand Down Expand Up @@ -270,17 +271,25 @@ Track business and technical metrics to monitor application performance:
var metrics = logdash.metrics();

// Counters - track events and occurrences
metrics.mutate("page_views",1);
metrics.mutate("api_requests",5);
metrics.mutate("response_time_ms",-100);
metrics.mutate("available_licenses",-1);
metrics.mutate("page_views", 1);
metrics.mutate("api_requests", 5);
metrics.mutate("response_time_ms", -100);
metrics.mutate("available_licenses", -1);

// Gauges - track current values
metrics.set("active_users", 1_250);
metrics.set("memory_usage_mb", 512.5);
metrics.set("queue_size", 0);
```

## View Your Data

To see the logs or metrics, go to your project dashboard at [logdash.io](https://logdash.io/app/clusters)

![Logs Dashboard](docs/images/logs.png)

![Metrics Dashboard](docs/images/delta.png)

## Configuration

### Development Configuration
Expand All @@ -306,9 +315,11 @@ Logdash logdash = Logdash.builder()
.build();
```

## Configuration

### All Configuration Options

| Option | Default | Description |
| Parameter | Default | Description |
|-------------------------|--------------------------|----------------------------------|
| `apiKey` | `null` | Your Logdash API key (required) |
| `baseUrl` | `https://api.logdash.io` | Logdash API endpoint |
Expand Down Expand Up @@ -371,7 +382,7 @@ Check out the [`examples/`](./examples) directory for a complete sample applicat

- **Java 17 or higher** (tested on Java 17, 21, 22)
- **Internet connection** for sending data to Logdash
- **Valid API key** from [Logdash.io](https://logdash.io)
- **Valid API key** from [logdash.io](https://logdash.io)

## Contributing

Expand All @@ -383,7 +394,6 @@ We welcome contributions! Here's how to get started:
git clone https://github.com/logdash-io/java-sdk.git
cd java-sdk
mvn clean compile
mvn test
```

### Running Tests
Expand All @@ -401,11 +411,26 @@ mvn clean verify

### Code Quality

- Follow existing code style (checkstyle configuration included)
- Follow existing code style
- Ensure all tests pass
- Add tests for new features
- Update documentation as needed

### GitFlow Workflow

```bash
# Start new feature
git checkout develop && git pull origin develop
git checkout -b feat/awesome-feature

# Development and testing
mvn clean verify
git add . && git commit -m "feat: add awesome feature"
git push origin feat/awesome-feature

# Create pull request to develop branch
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Expand Down
Loading