Skip to main content

Function: createSignozClient()

createSignozClient(options): SignozClient

Defined in: src/client.ts:79

Creates the client, authenticated by a service account API key or by the browser session's tokens.

const signoz = createSignozClient({ baseUrl: "https://signoz.example.com", apiKey: process.env.SIGNOZ_API_KEY! });
// or
const signoz = createSignozClient({
baseUrl: "https://signoz.example.com",
authToken: localStorage.AUTH_TOKEN,
refreshAuthToken: localStorage.REFRESH_AUTH_TOKEN,
});
const me = await signoz.users.getMyUser();

Parameters​

options​

SignozClientOptions

Returns​

SignozClient