Alephant-Analytics-AI icon

Alephant-Analytics-AI

Alephant AI Analytics provides visibility into AI usage, cost, latency, model/provider performance, agent sessions, and request-level traces across your organization.

Request Log Detail

AI-generated

Summary

Fetches the full detail of a single Alephant analytics request log by ID from the Alephant analytics API, retrying if the log isn't available yet.

Inputs

  • Request Log ID (required) — ID of the request log to fetch. Defaults to the incoming item's requestLogId or requestId. It is trimmed and URL-encoded; an empty value raises 'Request Log ID is required'.
  • Workspace ID — Workspace for the lookup, sent as the X-Workspace-Id header. If empty, falls back to the input item's workspaceId, workspace_id or xWorkspaceId, then to the Workspace ID in credentials. If still empty, the node calls the Alephant cockpit scope endpoint to resolve it, and errors if that fails.
  • Request Log Max Attempts — Maximum number of lookup attempts (default 6, minimum 1). Retries happen only on a 404 'request not found' response (code 40401), which covers logs that are not yet indexed. Other errors fail immediately. No delay between attempts is visible in the source.

Output shape

One output item per input item. Its json is the raw response from GET {analyticsBaseUrl}/v1/analytics/request-logs/{id}, paired to the input item.

Authenticates with the virtual key from the alephantVirtualKeyApi credential as a Bearer token. Network errors such as ECONNRESET and ETIMEDOUT are retried once. Failures are thrown as NodeApiError or NodeOperationError. The node can also be used as an AI tool, where the model supplies requestLogId and workspaceId. In that mode Max Attempts is not read from the tool input, so the lookup uses the default of 6.

Examples

Example 1: Inspect the trace of a request that an earlier node just logged, using its ID.

Operation: Request Log Detail; Request Log ID: {{$json.requestId}}; leave Workspace ID empty to use credentials or auto-resolve; Max Attempts 6.

Example 2: Look up a freshly created log that may not be indexed yet.

Request Log ID from the previous node; Request Log Max Attempts raised to 10 so it keeps retrying on 'request not found'.

Example 3: Query a log in a specific workspace other than the one in the credentials.

Request Log ID: abc123; Workspace ID: ws_456 to override the credential workspace.

Links

Discussion