0Pricing
Supabase Backend as a Service · 강의

모니터링, 로깅 및 관측 가능성

로그를 읽고 핵심 지표를 추적하며 Edge Functions를 계측하고 알림을 설정하여 작은 문제가 서비스 중단으로 이어지기 전에 운영 중인 Supabase 백엔드의 건전성을 유지합니다.

모니터링, 로깅 및 관측 가능성은(는) CoddyKit의 무료 Supabase Backend as a Service 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Supabase Backend as a Service 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Supabase Backend as a Service 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Observability Matters

Deploying is only half the job. Once your backend serves real traffic you need to see what it is doing. Observability is the practice of understanding system state from its outputs.

  • Logs tell you what happened
  • Metrics tell you how much and how fast
  • Traces tell you where time was spent

The Supabase Logs Explorer

Supabase exposes logs for every service in the dashboard under Logs: API gateway, Postgres, Auth, Storage, and Edge Functions. Each is queryable with SQL-like syntax.

Filtering by status code and path quickly surfaces failing requests.

Querying Logs

The Logs Explorer accepts SQL over structured log events. Here we count API errors grouped by path over the last hour.

select path, count(*) as errors
from edge_logs
where status_code >= 500
group by path
order by errors desc;

Structured Logging in Edge Functions

Inside Edge Functions, prefer structured JSON logs over plain strings. They are far easier to filter and aggregate later.

console.log(JSON.stringify({
  level: 'info',
  event: 'order_created',
  orderId: order.id,
  userId: user.id,
  durationMs: Date.now() - start
}));

Log Levels

Use consistent levels so you can filter noise from signal.

  • debug for development detail
  • info for normal events
  • warn for recoverable problems
  • error for failures needing attention

In production, avoid logging at debug to control cost and volume.

Key Database Metrics

Watch a handful of Postgres metrics closely:

  • Active connections vs the pool limit
  • Cache hit ratio (aim above 99%)
  • Slow query count
  • Disk and CPU usage

Supabase surfaces these on the Reports page.

Finding Slow Queries

Enable pg_stat_statements to see which queries consume the most total time. This is the single most useful tool for performance triage.

select query, calls, mean_exec_time, total_exec_time
from pg_stat_statements
order by total_exec_time desc
limit 10;

Never Log Secrets

Logs are persisted and often shared. Never write passwords, tokens, full card numbers, or service-role keys into logs.

  • Redact sensitive fields before logging
  • Log identifiers, not raw payloads
  • Treat log access as a security boundary

Correlating Requests

Attach a request ID to every log line in a function so you can reconstruct a single request's full journey across logs.

const requestId = crypto.randomUUID();
console.log(JSON.stringify({ requestId, event: 'start' }));
// ... work ...
console.log(JSON.stringify({ requestId, event: 'done' }));

Alerting

Logs you never look at help no one. Set up alerts for the conditions that matter: error-rate spikes, connection exhaustion, disk nearing capacity.

Forward logs to an external sink (e.g. via webhooks or a log drain) when you need richer alerting than the dashboard provides.

Retention and Cost

Logs cost money and storage. Decide a retention policy deliberately.

  • Keep high-value audit logs longer
  • Sample or drop chatty debug logs
  • Archive to cheap storage before deletion if needed for compliance

Quick Check

Test your observability knowledge.

Recap

You now have a foundation for production observability.

  • Use the Logs Explorer and structured JSON logs
  • Apply consistent log levels and request IDs
  • Track connections, cache hit ratio, and slow queries
  • Use pg_stat_statements for performance triage
  • Never log secrets; set alerts and a retention policy

자주 묻는 질문

“모니터링, 로깅 및 관측 가능성” 강의는 무료인가요?

네 — “모니터링, 로깅 및 관측 가능성” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Supabase Backend as a Service 강의 전체를 잠금 해제할 수 있습니다. Supabase Backend as a Service 강의에는 총 4개의 강의가 포함되어 있습니다.

“모니터링, 로깅 및 관측 가능성”에서 뭘 배우나요?

로그를 읽고 핵심 지표를 추적하며 Edge Functions를 계측하고 알림을 설정하여 작은 문제가 서비스 중단으로 이어지기 전에 운영 중인 Supabase 백엔드의 건전성을 유지합니다. 브라우저에서 직접 실행하는 실습 코드로 Supabase Backend as a Service을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Supabase Backend as a Service을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Supabase Backend as a Service은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“모니터링, 로깅 및 관측 가능성” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Supabase Backend as a Service 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Supabase Backend as a Service 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 환경 관리 및 CI/CD
  2. 백업, 복원 및 재해 복구
  3. 보안 감사 및 모범 사례
  4. 모니터링, 로깅 및 관측 가능성
← Supabase Backend as a Service(으)로 돌아가기