Java and Kotlin

Install com.github.blipit-io:blipit-java

The blipit-java library is served by JitPack straight from GitHub. It runs on Blipit's own core, has no dependencies and works on Java 8 or newer. Add the repository and the dependency, then call Blipit.init once at startup with your project's public key and project id.

Paste it into Claude Code, Cursor or any AI coding assistant. It carries the steps and the code. In app.blipit.io, API keys, the same prompt comes with your key filled in.
Video: Install Blipit in any stack, from 1:07

1Add the repository and dependency

build.gradle.kts
repositories {
    mavenCentral()
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.blipit-io:blipit-java:v0.2.2")
}
pom.xml
<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependency>
  <groupId>com.github.blipit-io</groupId>
  <artifactId>blipit-java</artifactId>
  <version>v0.2.2</version>
</dependency>

2Initialise at startup

Spring Boot: at the top of main, before SpringApplication.run, or in a @PostConstruct method of a @Configuration class. Uncaught exceptions on any thread are written to a queue on disk before the app stops, then sent, so a crash is reported even if the network is down; anything left over goes out on the next start.

java
import io.blipit.Blipit;
import io.blipit.BlipitOptions;

Blipit.init(BlipitOptions.builder()
    .key("<public key>")
    .project(<project id>)
    .environment("production")
    .release("myapp@1.4.2")
    .build());

3Get your keys

Sign in at app.blipit.io and open API keys in the sidebar, then your project. Every project has two keys. The public key starts with blipit_pk_: it goes in browser and app code, can only send events, and is safe for anyone to see. The secret key starts with blipit_sk_: it stays on your server or in Odoo, never in a browser, because it can also read and change issues. The secret key is shown only once, right after it is created, so copy it then; if you lose it, press Create a new secret key, and the old one stops working at once. Some SDKs also need the project id, shown on the same page.

API keys in app.blipit.io: the public key (blipit_pk_) for browser code and the secret key (blipit_sk_) for servers and Odoo.
API keys in app.blipit.io: the public key (blipit_pk_) for browser code and the secret key (blipit_sk_) for servers and Odoo.
A new secret key is shown once. Copy it now: it is stored hashed and cannot be shown again.
A new secret key is shown once. Copy it now: it is stored hashed and cannot be shown again.

4Keep the key in the environment

This SDK sends with the public key and the project id. Read them from environment variables, or in Spring Boot from application.properties filled from the environment.

application.properties
blipit.key=${BLIPIT_KEY}
blipit.project=${BLIPIT_PROJECT}
java
Blipit.init(BlipitOptions.builder()
    .key(System.getenv("BLIPIT_KEY"))
    .project(Long.parseLong(System.getenv("BLIPIT_PROJECT")))
    .build());

5Keep keys out of git

Keep keys in environment variables or your host's secret settings, never in code you commit, and add your .env files to .gitignore. A public key in a web page is normal. If a secret key ever ends up in git, a public page, a screenshot or a chat, open API keys, press Create a new secret key, and paste the new key wherever the old one was used: the old key stops working straight away.

.gitignore
.env
.env.local
.env.*.local

6Manual capture and login attempts

Login attempts need the secret key: on the server, init with the secret key instead of the public one, or ingest refuses them with 403 security_needs_secret_key. Scale plan.

java
Blipit.captureException(err);
Blipit.captureMessage("cache miss rate above 50%");
Blipit.captureMessage("disk almost full", Level.WARNING);
Blipit.setUser("42", "ana@example.com");
Blipit.addBreadcrumb("GET /api/cart 500", "http", Level.ERROR);
Blipit.captureSecurity("login_failed", email, "bad_password", null, ip, userAgent, null);

7Check it works

Open Issues in app.blipit.io. The first event appears within a few seconds, grouped into an issue, and the people in charge get an email.

java
Blipit.captureMessage("Hello from Java");

Good to know

  • Kotlin uses the same calls.
  • The Java SDK does not time requests by itself: for the Pulse page, send spans from any OpenTelemetry exporter to https://in.blipit.io/v1/traces with the X-Blipit-Key header (JSON protocol).
  • Upgrading from v0.1: the level enum is io.blipit.Level, setUser(User) becomes setUser(id, email) or setUser(id, email, username), addBreadcrumb(Breadcrumb) becomes addBreadcrumb(message, category, level), Blipit.dsn is gone, captureException and captureMessage return the event id, and flush returns whether everything was delivered.
  • Keeping Blipit up to date: the Keeping Blipit up to date guide (docs.blipit.io/updates) explains the update banner, the emails for important releases, the notice in your development console and the update command for this platform.
  • One project per app and platform: each project picks its platform when it is created (Android, iOS, React Native, Flutter, Web, Backend or Odoo), and Blipit refuses data from any other platform with a clear error, so an iOS app and an Android app need two projects with two keys. Releases, versions, crash rates and store builds differ per platform, so mixing them in one project makes all of them wrong. A Web project also takes the server side of the same web app (the Next.js server or Node), and a React Native or Flutter project also takes its own native Android and iOS crash reports.

Stuck? Email support@blipit.io. Keys and the project id for each project are under API keys in app.blipit.io.