Skip to content

Latest commit

 

History

History

README.md

BTrace Documentation

Welcome to the BTrace documentation! BTrace is a safe, dynamic tracing tool for the Java platform that allows you to instrument running applications without stopping them.

Quick Start

New to BTrace? Start here → Getting Started Guide

Get up and running in 5 minutes with installation, your first script, and common usage patterns.

Documentation Map

Document Description Target Audience
Getting Started Installation, first script, deployment modes, common pitfalls New users, quick start
Oneliner Guide DTrace-style oneliners for quick debugging without scripts Quick debugging, ops/SRE
Quick Reference Annotations, patterns, CLI commands, built-in functions Experienced users, quick lookup
BTrace Tutorial Comprehensive lessons covering all features All users, in-depth learning
Troubleshooting Guide Common errors, debugging, performance, compatibility Problem-solving, debugging
FAQ Common questions, best practices, comparisons All users, decision-making
MCP Server Using BTrace from AI clients via the Model Context Protocol AI-assisted debugging, LLM integrations
Extension Registry JSON catalog and GitHub workflow for discovering published extensions Extension authors, platform maintainers

Learning Paths

I'm New to BTrace

  1. Read Getting Started Guide (10 minutes)
  2. Try the 5-minute quick start example
  3. Learn Oneliner syntax for quick debugging (5 minutes)
  4. Explore BTrace Tutorial lessons 1-3
  5. Keep Quick Reference handy

Tip: Want latency histograms fast? See Quick Start: Histogram Metrics Extension and the tutorial section Using the Histogram Metrics Extension.

I Need to Solve a Problem

  1. Check Troubleshooting Guide for your error
  2. Search FAQ for similar issues
  3. Review Getting Started common pitfalls
  4. Ask on Slack or Gitter

I Need a Quick Lookup

I Want Advanced Features

  1. JFR IntegrationGetting Started: JFR Integration, Tutorial Lesson 5
  2. SamplingQuick Reference: @Sampled, FAQ: Performance
  3. AggregationsQuick Reference: Aggregation Functions
  4. Cloud DeploymentsGetting Started: K8s, FAQ: K8s
  5. Fat Agent JARGetting Started: Fat Agent for single-JAR deployment
  6. Level FilteringQuick Reference: @Level
  7. Extensions ArchitectureExtension invokedynamic Bridge

I'm Working on AI/LLM Applications

  1. Observe LLM API callsTutorial Lesson 12.1 — token counts, latency, cost tracking
  2. Observe RAG pipelinesTutorial Lesson 12.2 — vector DB queries, similarity scores
  3. Observe on-device inferenceTutorial Lesson 12.3 — ONNX, DJL, TensorFlow
  4. Use BTrace from an AI agentMCP Server for Claude Desktop, Claude Code, Cursor

Documentation by Topic

Core Features

Advanced Features

AI/LLM Observability

  • LLM Inference TracingTutorial Lesson 12.1 — token counts, latency, cost, streaming TTFT
  • RAG Pipeline ObservabilityTutorial Lesson 12.2 — vector DB queries, similarity scores, empty retrievals
  • GPU / Inference ObservabilityTutorial Lesson 12.3 — ONNX Runtime, DJL, TensorFlow, Panama FFM
  • AI Agents (MCP)MCP Server — connect Claude Desktop, Claude Code, or Cursor to live JVMs

Deployment & Operations

Problem Solving

Integration

Architecture

Sample Scripts

BTrace includes 50+ sample scripts demonstrating real-world use cases:

  • Location: btrace-dist/src/main/resources/samples/
  • Examples: File I/O tracking, JDBC monitoring, HTTP requests, memory allocation, thread analysis
  • Browse: BTrace Samples Directory

External Resources

Official Resources

Community

Tools & Integrations

  • VisualVM Plugin: visualvm.github.io
  • JDK Mission Control: For viewing JFR events created by BTrace

Contributing

BTrace is an open-source project welcoming contributions. To contribute:

  1. Sign the Oracle Contributor Agreement
  2. Read the Contributing Guidelines
  3. Fork the repository and create a pull request
  4. See Build Instructions for development setup

Version Information

  • Current Version: Check GitHub Releases
  • Java Compatibility: Java 8-25
  • License: GPLv2 with Classpath Exception

Documentation Feedback

Found an issue with the documentation? Please:

  • Report it on GitHub Issues
  • Tag it with documentation label
  • Or submit a pull request with improvements

Ready to get started?Getting Started Guide