Home / Function/ sendToLogflare() — supabase Function Reference

sendToLogflare() — supabase Function Reference

Architecture documentation for the sendToLogflare() function in logger.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  fd1ff673_ee95_c94c_f5f8_8006e2338506["sendToLogflare()"]
  9d7ff13f_efdf_f6b5_75c4_c0fbedc42b47["handleRequest()"]
  9d7ff13f_efdf_f6b5_75c4_c0fbedc42b47 -->|calls| fd1ff673_ee95_c94c_f5f8_8006e2338506
  style fd1ff673_ee95_c94c_f5f8_8006e2338506 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/lib/logger.ts lines 14–34

export function sendToLogflare(message: string, metadata?: Record<string, unknown>) {
  // Skip logging in CI and development environments
  if (IS_CI || IS_DEV) return

  const logMessage: LogflareMessage = {
    message,
  }

  if (metadata) {
    logMessage.metadata = metadata
  }

  fetch(LOGFLARE_ENDPOINT, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${LOGFLARE_INGESTION_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(logMessage),
  })
}

Subdomains

Called By

Frequently Asked Questions

What does sendToLogflare() do?
sendToLogflare() is a function in the supabase codebase.
What calls sendToLogflare()?
sendToLogflare() is called by 1 function(s): handleRequest.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free