Developer Quickstart Guide

Learn how to stream structural JSON logs, track P99 microservice response distributions, and configure automated threshold alerts in minutes.


1. Platform Quickstart

To begin capturing application logs, you will need to register an account on LogFlow, create a Project namespace, and generate an API key. LogFlow allocates isolated queues for your project logs to prevent database congestion.

2. SDK Installation

Add the lightweight telemetry compiler as a dependency inside your project packages:

Terminal
$ npm install logflow-sdk

3. Telemetry Integration

Initialize the client inside your server core routing pipeline. Pass the credentials, name the microservice node, and start capturing traces:

server.js
import LogFlow from 'logflow-sdk';

const lf = new LogFlow({
  apiKey: 'lf_live_5af28c9b109e23',
  serviceName: 'order-api',
  environment: 'production'
});

// Capture global error states
lf.captureException(new Error("Payment processing gateway returned 504"));

4. Ingestion Architecture Spec

LogFlow uses advanced distributed streaming models. When you emit a log line via the SDK, it does not send an immediate HTTP POST request. Instead, it places the trace inside an in-memory queue.

Asynchronous Buffers

The client pools lines and transmits them in batches every 500ms or 100 lines, ensuring minimal CPU cycle consumption.

Metadata Aggregators

System runtime profiles, process IDs, and memory utilization stamps are automatically attached to the JSON trace body.