/getsentry:sentry-otel-exporter-setupfrom getsentry
Configure the OpenTelemetry Collector with Sentry Exporter for multi-project routing and automatic project creation. Use when setting up OTel with Sentry, configuring collector pipelines for traces and logs, or routing telemetry from multiple services to Sentry projects.
Ships in getsentry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
All Skills > Feature Setup > OTel Exporter
Terminology: Always capitalize "Sentry Exporter" when referring to the exporter component.
Configure the OpenTelemetry Collector to send traces and logs to Sentry using the Sentry Exporter.
Copy this checklist to track your progress:
OTel Exporter Setup:
- [ ] Step 1: Check for existing configuration
- [ ] Step 2: Check collector version and install if needed
- [ ] Step 3: Configure project creation settings
- [ ] Step 4: Write collector config
- [ ] Step 5: Add environment variable placeholders
- [ ] Step 6: Run the collector
- [ ] Step 7: Verify setup
Search for existing OpenTelemetry Collector configs by looking for YAML files containing receivers:. Also check for files named otel-collector-config.*, collector-config.*, or otelcol.*.
If an existing config is found: Ask the user which approach they want:
Wait for the user's answer and record their choice before proceeding to Step 2. The rest of the workflow depends on this decision.
If no config exists: Note that you'll create a new collector-config.yaml in Step 4, then proceed to Step 2.
The Sentry Exporter requires otelcol-contrib v0.145.0 or later.
which otelcol-contrib to check if it's on PATH, or check for ./otelcol-contrib in the projectotelcol-contrib if on PATH, or ./otelcol-contrib if local) for use in later steps| Existing Version | Action |
|---|---|
| ≥ 0.145.0 | Skip to Step 3 — existing collector is compatible |
| < 0.145.0 | Proceed with installation below |
| Not installed | Proceed with installation below |
Ask the user how they want to run the collector:
Fetch the latest release version from GitHub:
curl -s https://api.github.com/repos/open-telemetry/opentelemetry-collector-releases/releases/latest | grep '"tag_name"' | cut -d'"' -f4
Important: The GitHub API returns versions with a v prefix (e.g., v0.145.0). The download URL path requires the full tag with v prefix, but the filename and Docker tags use the numeric version without the prefix (e.g., 0.145.0).
Detect the user's platform and download the binary:
uname -s and uname -m to detect OS and architecturedarwin_arm64darwin_amd64linux_amd64linux_arm64curl -LO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v<numeric_version>/otelcol-contrib_<numeric_version>_<os>_<arch>.tar.gz
tar -xzf otelcol-contrib_<numeric_version>_<os>_<arch>.tar.gz
chmod +x otelcol-contrib
Example: For version v0.145.0, the URL uses v0.145.0 in the path but 0.145.0 in the filename.
Perform these steps for the user—do not just show them the commands.
Wait for the user's response. Only delete if they explicitly choose to:
rm otelcol-contrib_<numeric_version>_<os>_<arch>.tar.gz
docker --versionv prefix):docker pull otel/opentelemetry-collector-contrib:<numeric_version>
Example: For GitHub tag v0.145.0, use docker pull otel/opentelemetry-collector-contrib:0.145.0.
The docker run command comes later in Step 6 after the config is created.
Ask the user whether to enable automatic Sentry project creation. Do not recommend either option:
Wait for the user's answer before proceeding to Step 4.
If user chooses Yes: Warn them that the exporter will scan all projects and use the first team it finds. All auto-created projects will be assigned to that team. If they don't have any teams yet, they should create one in Sentry first.
Use the decision from Step 1 - if the user chose to modify an existing config, edit that file. If they chose to create a separate config, create a new file. Record the config file path for use in Steps 5 and 6.
Fetch the latest configuration from the Sentry Exporter documentation:
https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector-contrib/main/exporter/sentryexporter/docs/example-config.yamlhttps://raw.githubusercontent.com/open-telemetry/opentelemetry-collector-contrib/main/exporter/sentryexporter/docs/spec.mdUse WebFetch to retrieve the example config as a starting template. Reference the spec if the user needs advanced options not shown in the example.
Add the sentry exporter to the exporters: section and include it in the appropriate pipelines (traces, logs). Do not remove or modify other exporters unless the user requests it.
Create collector-config.yaml based on the fetched example. Ensure credentials use environment variable references (${env:SENTRY_ORG_SLUG}, ${env:SENTRY_AUTH_TOKEN}).
If user chose auto-create in Step 3, add auto_create_projects: true to the sentry exporter.
For troubleshooting during setup, add a debug exporter with verbosity: detailed to the pipelines. This logs all telemetry to console. Remove it once setup is verified.
The Sentry Exporter requires two environment variables. You will add placeholder values that the user fills in themselves—never actual credentials.
Language constraint: NEVER say "add credentials", "add environment variables", or "add the token" without explicitly stating these are placeholders. Always clarify the user fills them in later.
DO NOT say:
SAY INSTEAD:
Search for existing .env files in the project using glob **/.env. Always ask the user which file to use—do not infer from context or guess based on open files.
Present the discovered options:
Wait for the user's explicit selection. Do not proceed until they choose. Record the env file path for use in Steps 5 (validation) and 6 (running).
Add these placeholder values to the chosen file:
SENTRY_ORG_SLUG=your-org-slug
SENTRY_AUTH_TOKEN=your-token-here
After adding the placeholders, tell the user how to get their real values from Sentry:
myorg in https://myorg.sentry.io)auto_create_projectsEnsure the chosen .env file is in .gitignore.
After explaining how to get the values, ask the user to confirm when they've updated the .env file:
If user selects "Not yet", wait and ask again. Do not proceed to Step 6 until credentials are confirmed.
Once credentials are set, validate the configuration using the appropriate method based on the installation choice from Step 2.
Use the config file path from Step 1 (either the existing config you modified or the new collector-config.yaml).
Use the collector path recorded in Step 2 (either otelcol-contrib if on PATH, or ./otelcol-contrib if local).
Load environment variables first, then run validation:
set -a && source "<env_file>" && set +a && "<collector_path>" validate --config "<config_file>"
Note: Docker volume mounts require absolute paths. If <config_file> or <env_file> are relative paths, prefix them with $(pwd)/. If they're already absolute paths, use them directly.
docker run --rm \
-v "<config_file>":/etc/otelcol-contrib/config.yaml \
--env-file "<env_file>" \
otel/opentelemetry-collector-contrib:<numeric_version> \
validate --config /etc/otelcol-contrib/config.yaml
Use the .env file path chosen in Step 5.
If validation fails:
Once validation passes, ask the user if they're ready to run the collector:
Wait for the user's confirmation before proceeding to Step 6.
Only reach this step after the user confirms they're ready to run the collector.
Give the user the run command but do not execute it automatically. The user will run it themselves.
Provide the appropriate command based on the installation method chosen in Step 2.
Use the actual paths chosen earlier:
collector-config.yaml).env file the user selected)otelcol-contrib if on PATH, or ./otelcol-contrib if local)Load environment variables first, then run the collector:
set -a && source "<env_file>" && set +a && "<collector_path>" --config "<config_file>"
Note: Docker volume mounts require absolute paths. If <config_file> or <env_file> are relative paths, prefix them with $(pwd)/. If they're already absolute paths, use them directly.
If re-running: Stop and remove any existing container first:
docker stop otel-collector 2>/dev/null; docker rm otel-collector 2>/dev/null
docker run -d \
--name otel-collector \
-p 4317:4317 \
-p 4318:4318 \
-p 13133:13133 \
-v "<config_file>":/etc/otelcol-contrib/config.yaml \
--env-file "<env_file>" \
otel/opentelemetry-collector-contrib:<numeric_version>
Use the same numeric version (without v prefix) that was pulled in Step 2.
After providing the command, tell the user to run it when they're ready, then proceed to Step 7 for verification.
Success criteria:
If using Docker, check logs with docker logs otel-collector.
| Error | Cause | Fix |
|---|---|---|
| "failed to create project" | Missing Project:Write permission | Update Internal Integration permissions in Sentry |
| "no team found" | No teams in org | Create a team in Sentry before enabling auto-create |
| "invalid auth token" | Wrong token type or expired | Use Internal Integration token, not user auth token |
| "connection refused" on 4317/4318 | Collector not running or port conflict | Check collector logs and ensure ports are available |
| Validation fails with env var errors | .env file not loaded or placeholders not replaced | Ensure real credentials are in .env and the file is sourced |
| "container name already in use" | Previous container exists | Run docker stop otel-collector && docker rm otel-collector |
What SKILL.md sets; muted values are Claude Code's defaults
48 skills in this plugin
/agents-mdThis skill should be used when the user asks to "create AGENTS.md", "update AGENTS.md", "maintain agent docs", "set up CLAUDE.md", or needs to keep agent instructions concise. Enforces research-backed best practices for minimal, high-signal agent documentation./blog-writing-guideWrite, review, and improve blog posts for the Sentry engineering blog following Sentry's specific writing standards, voice, and quality bar. Use this skill whenever someone asks to write a blog post, draft a technical article, review blog content, improve a draft, write a product announcement, create an engineering deep-dive, or produce any written content destined for the Sentry blog or developer audience. Also trigger when the user mentions "blog post," "blog draft," "write-up," "announcement post," "engineering post," "deep dive," "postmortem," or asks for help with technical writing for Sentry. Even if the user just says "help me write about [feature/topic]" — if it sounds like it could become a Sentry blog post, use this skill./brand-guidelinesApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply./claude-settings-auditAnalyze a repository to generate recommended Claude Code settings.json permissions. Use when setting up a new project, auditing existing settings, or determining which read-only bash commands to allow. Detects tech stack, build tools, and monorepo structure./code-reviewConduct thorough, constructive code reviews for quality and security. Use when reviewing pull requests, checking code quality, identifying bugs, or auditing security. Handles best practices, SOLID principles, security vulnerabilities, performance analysis, and testing coverage./code-simplifierSimplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices.npx claudepluginhub ulpi-io/plugin-marketplace --plugin getsentry