AgentStack
SKILL verified MIT Self-run

Sentry Integration

skill-ampli-group-agentic-mobile-blueprint-sentry-integration · by Ampli-Group

Add Sentry error tracking to Supabase Edge Functions. Use when creating functions that need error monitoring.

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add skill-ampli-group-agentic-mobile-blueprint-sentry-integration

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Sentry Integration? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Sentry Integration for Supabase Edge Functions

Helpers Available

Module _shared/sentry.ts provides:

  • initSentry() - Initialize (call once)
  • handleError() - Capture errors automatically
  • setSentryUser() - Track user (optional)
  • addBreadcrumb() - Track flow (optional)

Usage

Basic Pattern

import { initSentry, handleError } from '../_shared/sentry.ts';

initSentry();

Deno.serve(async (req: Request) => {
  if (req.method === 'OPTIONS') {
    return new Response('ok', { headers: corsHeaders });
  }

  try {
    const result = await processData();
    return new Response(JSON.stringify({ success: true }));
  } catch (error) {
    return handleError(error, { functionName: 'my-function', corsHeaders });
  }
});

With User Context

import { initSentry, setSentryUser, handleError } from '../_shared/sentry.ts';
import { authenticate } from '../_shared/auth.ts';

initSentry();

Deno.serve(async (req: Request) => {
  try {
    const { user } = await authenticate(req);
    setSentryUser(user.id, user.email);
    
    // Your logic
    
    return new Response(JSON.stringify({ success: true }));
  } catch (error) {
    return handleError(error, { functionName: 'auth-function', corsHeaders });
  }
});

With Breadcrumbs

import { initSentry, addBreadcrumb, handleError } from '../_shared/sentry.ts';

initSentry();

try {
  addBreadcrumb('Started processing');
  const result = await process();
  addBreadcrumb('Completed', { count: result.length });
} catch (error) {
  return handleError(error, { functionName: 'processor', corsHeaders });
}

Setup

  1. Set SENTRY_DSN in .env.local:

``bash SENTRY_DSN=https://your-sentry-dsn@sentry.io/123456 ``

  1. Module exists at supabase/functions/_shared/sentry.ts (already created)

What Gets Captured

✅ Error message and stack trace ✅ Function name (tagged) ✅ Request details ✅ User context (if set) ✅ Breadcrumbs (if added) ❌ Authorization headers (auto-removed)

Testing

throw new Error('Test error for Sentry');

Check Sentry dashboard for the error with full context.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.