Add custom key-value pairs to components for enhanced observability
The metadata functionality allows you to add custom key-value pairs (string, any) to all components like trace, generation, retrieval, event, and span. This is useful for storing additional context, configuration, user information, or any custom data that helps with debugging, analysis, and observability.
1
Create a repository
Select Logs from the sidebar and click the “Create repository” button.
2
Install SDK
Copy
Ask AI
npm install @maximai/maxim-js
3
Initialize SDK
Copy
Ask AI
import { Maxim } from "@maximai/maxim-js"const maxim = new Maxim({ apiKey: "" });const logger = await maxim.logger({ id: "" });