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

/intercom-observability

@0d57af8
Run it yourself

Use when you need production monitoring for an Intercom integration — instrumenting API calls with metrics and traces, standing up dashboards, or wiring alerts for error rate, latency, and rate-limit health. Set up observability for Intercom integrations with Prometheus metrics, OpenTelemetry traces, structured logging, and alert rules. Trigger with phrases like "intercom monitoring", "intercom metrics", "intercom observability", "monitor intercom", "intercom alerts", "intercom tracing".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/intercom-observability

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencesexamples.md

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

Intercom Observability — Worked Examples

End-to-end scenarios that wire the individual layers from implementation.md into a running integration. Each example shows the input situation, the code that instruments it, and the resulting metrics / traces / log lines you should observe.

Example 1: Instrument a contact lookup end-to-end

Goal: every contacts.find call is counted, timed, traced, and logged with PII redacted.

const rawClient = new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN! });
const client = instrumentedClient(rawClient); // Step 2 proxy adds metrics

async function lookupContact(contactId: string) {
  const start = Date.now();
  const contact = await tracedIntercomCall(       // Step 4 tracing
    "contacts.find",
    { "intercom.contact_id": contactId },
    () => client.contacts.find({ contactId })     // Step 2 metrics fire here
  );
  logIntercomOp("contacts.find", { contact }, Date.now() - start); // Step 3 log
  return contact;
}

Observed output:

  • Counter intercom_api_requests_total{endpoint="contacts.find",status="success"} increments by 1.
  • Histogram intercom_api_request_duration_seconds{endpoint="contacts.find"} records the latency.
  • A span intercom.contacts.find appears in your tracing backend with intercom.contact_id.
  • A log line: {"service":"intercom","operation":"contacts.find","duration_ms":142,"contact":{"id":"...","role":"user"}} (email/name/phone redacted by the Step 3 serializer).

Example 2: A rate-limit (429) event

Goal: confirm the instrumentation reacts correctly when Intercom returns 429.

When client.contacts.list() throws an IntercomError with statusCode === 429, the Step 2 proxy runs:

  • intercom_api_requests_total{...,status="error"} +1
  • intercom_api_errors_total{error_code="rate_limited",status_code="429"} +1
  • intercom_rate_limit_remaining is set to 0

The IntercomRateLimitLow alert (intercom_rate_limit_remaining < 1000) fires after 1m, and IntercomHighErrorRate fires if the 429s push the error ratio over 5%.

Example 3: Webhook processing with success/failure accounting

async function handleWebhook(payload: { topic: string; id: string; data: unknown }) {
  const start = Date.now();
  try {
    await processWebhook(payload);
    webhookProcessed.inc({ topic: payload.topic, status: "processed" });
    logWebhook(payload.topic, payload.id, "processed", Date.now() - start);
  } catch (err) {
    webhookProcessed.inc({ topic: payload.topic, status: "failed" });
    logWebhook(payload.topic, payload.id, "failed", Date.now() - start);
    throw err;
  }
}

If more than 10% of webhooks for any topic fail over 5m, the IntercomWebhookFailures alert fires.

Example 4: Scraping the metrics endpoint

With the Step 6 /metrics route mounted, a Prometheus scrape returns:

# HELP intercom_api_requests_total Total Intercom API requests
# TYPE intercom_api_requests_total counter
intercom_api_requests_total{endpoint="contacts.find",method="API",status="success"} 128
intercom_api_errors_total{endpoint="contacts.list",error_code="rate_limited",status_code="429"} 3
intercom_rate_limit_remaining 8420

Point a Grafana panel at intercom_rate_limit_remaining and the alert rules from Step 5 at the same series to close the loop from metric to page.

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 production-ready templates for instrumenting Intercom integrations with Prometheus, OpenTelemetry, and structured logging. It follows industry best practices by including PII redaction in logs and recommending the use of environment variables for API credentials.

  • 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 4 months ago
What it can do
Reads files Edits files
version
1.6.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "support",
  "messaging",
  "intercom"
]
All 3 allowed tools
ReadWriteEdit
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/intercom-observability