Skip to content

ShardlensClientOptions

Defined in: packages/client/src/transport.ts:4

Options of createShardlensClient.

apiKey: string

Defined in: packages/client/src/transport.ts:14

A read key (slk_read_…) or, to read the activity log as well, an activity key (slk_activity_…). Keep it on your server: a key in a browser can be read by every visitor.


endpoint: string

Defined in: packages/client/src/transport.ts:9

Your collector’s address, such as https://stats.example.com: the SDK’s endpoint (SHARDLENS_URL). HTTPS, or HTTP to localhost only, and no path.


optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: packages/client/src/transport.ts:18

The fetch to send requests with. Default: the global one.

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>


optional timeoutMs?: number

Defined in: packages/client/src/transport.ts:16

How long a request may take, and how long a live stream may take to connect, in milliseconds. Default 10,000.