Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/sentry-architecture-variants

@0d57af8
Run it yourself

Configure Sentry error tracking and performance monitoring for different application architectures. Use when setting up Sentry for monoliths, microservices, serverless functions, event-driven systems, frontend SPAs, mobile apps, or hybrid deployments. Trigger: "sentry monolith setup", "sentry microservices tracing", "sentry serverless lambda", "sentry event-driven kafka", "sentry react native", "sentry architecture pattern".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/sentry-architecture-variants

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesmicroservices-architecture.md

≈772 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Microservices Architecture — Sentry Deep Dive

Project Layout

Organization: mycompany
├── Project: api-gateway        (DSN_GATEWAY)
├── Project: user-service       (DSN_USERS)
├── Project: payment-service    (DSN_PAYMENTS)
├── Project: notification-svc   (DSN_NOTIFICATIONS)
└── Project: frontend-web       (DSN_FRONTEND)

Each service gets its own project and DSN for isolated error budgets and team ownership.

Shared Configuration Package

// packages/sentry-config/index.ts — shared across all services
import * as Sentry from '@sentry/node';

export function initServiceSentry(serviceName: string) {
  Sentry.init({
    dsn: process.env.SENTRY_DSN,
    environment: process.env.NODE_ENV,
    release: `${serviceName}@${process.env.APP_VERSION}`,
    serverName: serviceName,
    tracesSampleRate: 0.1,
    sendDefaultPii: false,

    initialScope: {
      tags: {
        service: serviceName,
        cluster: process.env.K8S_CLUSTER || 'default',
        namespace: process.env.K8S_NAMESPACE || 'default',
      },
    },
  });
}

// Usage in each service's instrument.mjs:
// import { initServiceSentry } from '@mycompany/sentry-config';
// initServiceSentry('user-service');

Distributed Tracing — HTTP

SDK v8 auto-propagates sentry-trace and baggage headers on all HTTP requests. No manual work needed for fetch(), axios, or http.request().

Service mesh proxies (Istio, Linkerd) pass these headers transparently.

Distributed Tracing — gRPC

// gRPC client — inject headers into metadata
function callGrpcService(client: GrpcClient, method: string, request: any) {
  const metadata = new grpc.Metadata();
  const span = Sentry.getActiveSpan();

  if (span) {
    metadata.set('sentry-trace', Sentry.spanToTraceHeader(span));
    metadata.set('baggage', Sentry.spanToBaggageHeader(span) || '');
  }

  return Sentry.startSpan(
    { name: `grpc.${method}`, op: 'grpc.client' },
    () => clientmethod
  );
}

// gRPC server — continue trace from incoming metadata
function handleGrpcRequest(call: ServerUnaryCall, callback: sendUnaryData) {
  const sentryTrace = call.metadata.get('sentry-trace')[0]?.toString();
  const baggage = call.metadata.get('baggage')[0]?.toString();

  Sentry.continueTrace({ sentryTrace, baggage }, () => {
    Sentry.startSpan(
      { name: `grpc.${call.getPath()}`, op: 'grpc.server' },
      () => processRequest(call, callback)
    );
  });
}

Cross-Service Trace View

In the Sentry Trace View, a distributed trace shows as a waterfall:

api-gateway: POST /api/orders         [200ms]
├── user-service: GET /users/123      [ 45ms]
├── payment-service: POST /charge     [120ms]
│   └── stripe-api: POST /charges     [ 80ms]
└── notification-svc: POST /email     [ 15ms]

All spans share a single trace_id, linked by sentry-trace headers.


Tons of Skills by Intent Solutions | jeremylongshore.com

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides architectural guidance and code snippets for integrating Sentry error tracking and performance monitoring into various application types. No security issues or malicious patterns were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files Runs commands
version
1.51.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
compatibility
Designed for Claude Code
All 7 allowed tools
ReadWriteEditGrepGlobBash(node:*)Bash(npx:*)
Other metadata
tags
[
  "saas",
  "sentry",
  "serverless",
  "microservices",
  "architecture",
  "distributed-tracing",
  "lambda",
  "spa",
  "mobile"
]

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/sentry-architecture-variants