Doppler SDK manual integration
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(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.
logCrawl(payload: DopplerCrawlPayload)
function sends traffic data to Doppler’s API. It accepts a payload object and an optional API key.