@grow-codes/datadog-logs - v0.1.1
    Preparing search index...

    Class DatadogLogsQuery

    Datadog Logs query client (needs appKey): searchLogs (one page), iterateLogs (cursor pagination), aggregateLogs, and the category BaseLogQueryClient methods: search, waitForLog, tail (polling search), listStreams (index names, needs logs_read_config); listLabels throws UnsupportedError.

    Hierarchy (View Summary)

    Index
    • Iterates over every matching event across pages (cursor pagination). limit caps the total number of events; a repeated cursor raises UnavailableError (protocol loop guard).

      Parameters

      Returns AsyncGenerator<DatadogLogEvent, void, void>

      for await (const event of query.iterateLogs({ query: "status:error", limit: 5000 })) console.log(event.message);
      
    • One page of POST /api/v2/logs/events/search. Pass nextCursor back as cursor (with the same filter and sort) for the next page.

      Parameters

      Returns Promise<DatadogLogsPage>

      const page = await query.searchLogs({ query: 'service:checkout "run-7f3a"', from: "now-1h", limit: 50 });