← Back to blog
Guide 3 min read 炬鲸团队

Ship Spring Boot Logs to Observe in 5 Minutes

Connect your Spring Boot application's logs and traces to Observe from scratch — one dependency and one config change.

Step 1: Create a service

Sign in to the Observe console and create a service under Service Management. Note the ingestion token assigned to you.

Step 2: Add the dependency

Add the OpenTelemetry dependency to pom.xml (you can also use Logback's HTTP appender to push logs directly):

<dependency>
  <groupId>io.opentelemetry</groupId>
  <artifactId>opentelemetry-api</artifactId>
  <version>1.30.0</version>
</dependency>

Step 3: Configure the endpoint

Set the ingestion endpoint and token in application.yml:

observe:
  endpoint: https://ob.example.com
  token: <your-ingestion-token>
  service-name: order-service

Step 4: Verify

Start the app and trigger a few requests, then run a SQL-like query in the console:

SELECT * FROM logs WHERE service = 'order-service' ORDER BY ts DESC LIMIT 50

If you see fresh logs, you are connected.

FAQ

  • No logs appearing: double-check the token and network reachability
  • Timestamps look wrong: verify the app and server timezone match
  • Broken traces: make sure the HTTP client also propagates trace context