Installation
Pick your package manager and install the core SDK.Setup
Make sure to define the following environment variable to store your API Key.Usage
The core SDK exposes 2 methods:- getSource
- logCrawl
getSource function and based on the result, you can call the logCrawl function to log the traffic data to Doppler’s API.
Ideally you don’t await logCrawl in order not to slow down your request.
getSource
ThegetSource(headers: Record<string, string>, url: string) function analyzes incoming requests to detect the traffic source. It accepts a request object with headers and URL, and returns a DopplerDetectionResult object.
Parameters
Return type
logCrawl
ThelogCrawl(payload: DopplerCrawlPayload) function sends traffic data to Doppler’s API. It accepts a payload object and an optional API key.

