ShardlensHttpOptions
Defined in: packages/http/src/index.ts:45
Properties
Section titled “Properties”apiKey?
Section titled “apiKey?”
optionalapiKey?:string
Defined in: packages/http/src/index.ts:49
Ingest-only API key (slk_ingest_…). On Workers, keep it in a secret (wrangler secret put).
auditIncludeProfile?
Section titled “auditIncludeProfile?”
optionalauditIncludeProfile?:boolean
Defined in: packages/http/src/index.ts:53
Audit mode only: send each user’s username and avatar with their ID. Default true; false records IDs only.
captureOptionValues?
Section titled “captureOptionValues?”
optionalcaptureOptionValues?: readonlystring[]
Defined in: packages/http/src/index.ts:61
Option names whose values may be recorded. Values of user, channel, role, mentionable and attachment options, and any value holding a Discord ID, are never recorded; strings are cut to 100 characters, secrets redacted. Default none.
dryRun?
Section titled “dryRun?”
optionaldryRun?:boolean
Defined in: packages/http/src/index.ts:77
Print events instead of sending them.
endpoint?
Section titled “endpoint?”
optionalendpoint?:string
Defined in: packages/http/src/index.ts:47
Your collector’s URL. HTTPS, or HTTP to localhost only. Leave out with apiKey to use exporters only.
environment?
Section titled “environment?”
optionalenvironment?:string
Defined in: packages/http/src/index.ts:65
Separates staging from production. Default 'production'.
exporters?
Section titled “exporters?”
optionalexporters?: readonlyShardlensExporter[]
Defined in: packages/http/src/index.ts:75
In-process metrics exporters. They get every event, never with a user.
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: packages/http/src/index.ts:81
Override fetch (tests, proxies).
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
instance?
Section titled “instance?”
optionalinstance?:string
Defined in: packages/http/src/index.ts:69
A label for this deployment in SDK health, for example the Worker name. Default 'http'.
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: packages/http/src/index.ts:79
Where SDK warnings go. Default console.
optionalmode?:"privacy"|"audit"
Defined in: packages/http/src/index.ts:51
'privacy' (default) or 'audit'; audit only takes effect when the collector is in audit mode too.
normaliseCustomId?
Section titled “normaliseCustomId?”
optionalnormaliseCustomId?: (customId) =>string
Defined in: packages/http/src/index.ts:63
Replaces the default custom-ID normaliser (numbers and IDs become *).
Parameters
Section titled “Parameters”customId
Section titled “customId”string
Returns
Section titled “Returns”string
optedOut?
Section titled “optedOut?”
optionaloptedOut?:Iterable<string|bigint,any,any>
Defined in: packages/http/src/index.ts:71
Users who opted out earlier. Their events are dropped in-process. BigInt IDs from a database are accepted.
release?
Section titled “release?”
optionalrelease?:string
Defined in: packages/http/src/index.ts:67
Your bot’s version, to compare releases.
saltPeriod?
Section titled “saltPeriod?”
optionalsaltPeriod?:SaltPeriod
Defined in: packages/http/src/index.ts:55
Informational; the collector decides. Default 'month'.
sampleRate?
Section titled “sampleRate?”
optionalsampleRate?:Readonly<Record<string,number>>
Defined in: packages/http/src/index.ts:73
Sample rate per event type in (0, 1].