Maxim Logo
How toLog your application

Setting up your first trace

Learn how to set up tracing using the Maxim platform

We will cover the necessary steps to instrument your AI application and start monitoring and evaluating its performance.

Create a new repository on Maxim dashboard

Select Logs from the sidebar and click the "Create repository" button.

Install Maxim SDK

Installing Maxim JS SDK
npm install @maximai/maxim-js

Initialize Maxim SDK

import Maxim from "@maximai/maxim-js"
 
const maxim = new Maxim({ apiKey: "" });
 
const logger = await maxim.logger({ id: "" });

Start tracing your application

const trace = logger.trace({
	id: "trace-id", // Unique ID of the trace
	name: "user-query",
});
 
trace.input("Hello, how are you?"); // Input to LLM
trace.output("I'm fine, thank you!"); // Model output
trace.end();

On this page