oc · docs
docs / documentation

@orangecheck/insights-client


@orangecheck/insights-client / InsightsClientConfig

Interface: InsightsClientConfig

Defined in: index.ts:78

Properties

PropertyTypeDescriptionDefined in
<a id="property-fetch"></a> fetch?anyInjected fetch (tests / non-global-fetch runtimes). Default: globalThis.fetch.index.ts:86
<a id="property-onerror"></a> onError?(err: unknown) => voidOptional observability hook for swallowed errors / non-2xx. Never rethrows.index.ts:88
<a id="property-source"></a> source?stringOptional emitting-service id, sent as x-oc-insights-source. Default: env OC_INSIGHTS_SOURCE.index.ts:90
<a id="property-timeoutms"></a> timeoutMs?numberAbort the POST after this many ms. Default 2000.index.ts:84
<a id="property-token"></a> token?stringBearer token for the collector. Default: env OC_INSIGHTS_INGEST_TOKEN. Without it the client is a no-op.index.ts:82
<a id="property-url"></a> url?stringCollector ingest URL. Default: env OC_INSIGHTS_INGEST_URL ?? the canonical insights.ochk.io route.index.ts:80