linear-sdk-telemetry-labeler
Skill4 starsChanged 10 months agoApache-2.0View on GitHub
Classify and apply SDK Telemetry labels to Linear issues based on their title and description. Use when triaging issues related to SDK telemetry signals: errors, traces, spans, profiles, replays, logs, metrics, cron checks, client reports, user feedbacks, or attachments. Triggers: "sdk telemetry label", "telemetry labeler", "label telemetry issues", "tag telemetry".
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- contributing-mdSkill
- daily-updateSkill
- linear-initiativeSkill
- linear-type-labelerSkill
- sdk-feature-implementationSkill
- span-convention-reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Use query_data to list issues for the team, including each issue's label IDs.
- Very specific: line 56
Use query_data to fetch workspace-level labels and build a UUID map:
- Distinctive: line 63
If the workspace has no "SDK Telemetry" label group, surface that to the user before proceeding.
- Very specific: line 99
When ambiguous between Spans and Traces: spans are individual units of work.
- Distinctive: line 103
When ambiguous between Logs and Errors: structured log capture → Logs.
- Distinctive: line 122
Ask: *"Should I apply these labels?
- Distinctive: line 125
If the user provides corrections, update the table and show the revised plan before proceeding.
- Very specific: line 131
Call get_issue to fetch the issue's current label IDs immediately before writing
- Very specific: line 133
Call save_issue with the full combined label set
- Distinctive: line 147
No clear telemetry signal: Do not apply any label; flag for human review.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Linear SDK Telemetry Labeler
Classifies Linear issues and applies an SDK Telemetry label from the Sentry workspace's label taxonomy based on the content of each issue's title and description.
Requirements
This skill requires the Linear MCP server to be configured.
SDK Telemetry Label Reference
SDK Telemetry labels in the Sentry workspace (workspace-level, not per-team):
| Label | When to use |
| Errors | Error events, exception capture, crash reporting, error grouping, captureException, captureMessage, error payloads, fingerprinting |
| Traces | Distributed tracing, trace context propagation, trace sampling, sentry-trace header, W3C traceparent/baggage |
| Spans | Span creation, span attributes/tags, auto-instrumentation producing spans, startSpan, span operations, OTel span APIs |
| Profiles | Profiling, continuous profiling, function-level profiling, profiler lifecycle, profile envelope item |
| Replays | Session replay, replay recording/capture, replayId, rrweb integration, replay worker, replay envelope item |
| Logs | Structured log capture, sentry.logger, logger.info/warn/error, log envelope item |
| Metrics | Custom metrics, counters, gauges, histograms, distributions, metrics.increment, metrics.gauge, metrics.distribution |
| Checks | Cron monitors, check-ins, captureCheckIn, monitor slugs, scheduled task tracking |
| Client Reports | Client reports, discarded events reporting, envelope items for client reports, sendClientReports |
| User Feedbacks | User feedback widget, feedback form, captureFeedback, crash reporter UI, showReportDialog |
| Attachments | Attachments, file uploads, addAttachment, screenshot capture, view hierarchy dumps |
Workflow
Step 1 — Identify issues to process
Two modes:
A — List of Linear IDs provided (e.g. SDK-123, SDK-456):
- Fetch each issue by ID using
get_issue. Skip the team-fetch step entirely.
B — No IDs provided:
- Infer the team: (1) current GitHub repository name — for the
getsentryorg the repo name matches the Linear team name, (2) explicitly stated by the user, (3) if still ambiguous, ask. - Use
query_datato list issues for the team, including each issue's label IDs. Paginate (limit 50, usecursor) until done.
Step 2 — Fetch label IDs
Use query_data to fetch workspace-level labels and build a UUID map:
query_data: fetch all labels whose parent label name is "SDK Telemetry"
→ build a map: { "Errors": "<uuid>", "Spans": "<uuid>", ... }If the workspace has no "SDK Telemetry" label group, surface that to the user before proceeding.
Step 3 — Filter candidates
Filter issues client-side: keep only issues where none of the issue's label IDs appear in the Step 2 UUID map values (i.e., no SDK Telemetry label assigned yet).
Announce the total candidate count before continuing. If there are more than 25 candidates, process in chunks of 25, confirming each chunk before the next.
Step 4 — Classify each issue
For each candidate issue, read its title and description. Apply heuristics in priority order — stop at the first match:
- Title or description mentions "replay", "session replay", "rrweb", "replay recording", "replay capture" → Replays
- Title or description mentions "profile", "profiling", "profiler", "continuous profil" → Profiles
- Title or description mentions "cron", "check-in", "checkin", "captureCheckIn", "monitor slug", "scheduled task" → Checks
- Title or description mentions "client report", "discarded event", "sendClientReports" → Client Reports
- Title or description mentions "feedback", "showReportDialog", "captureFeedback", "feedback widget", "crash reporter UI" → User Feedbacks
- Title or description mentions "attachment", "addAttachment", "screenshot capture", "view hierarchy" → Attachments
- Title or description mentions "metric", "counter", "gauge", "histogram", "distribution", "metrics.increment", "metrics.gauge" → Metrics
- Title or description mentions "log", "logger", "structured log", "sentry.logger", "log envelope" → Logs
- Title or description mentions "span", "startSpan", "auto-instrument", "OTel span", "span attribute", "span operation" → Spans
- Title or description mentions "trace", "tracing", "traceparent", "baggage", "sentry-trace", "distributed trac", "trace propagat", "trace sampl" → Traces
- Title or description mentions "error", "exception", "crash", "captureException", "captureMessage", "error group", "fingerprint" → Errors
When ambiguous between Spans and Traces: spans are individual units of work; traces are
the propagation/sampling/context layer. An issue about instrumenting a library → Spans. An issue
about sentry-trace header or sampling → Traces.
When ambiguous between Logs and Errors: structured log capture → Logs. Error/exception capture → Errors.
Assign exactly one SDK Telemetry label. Mark confidence:
- High — clear signal in title or description
- Low — genuinely ambiguous; flag for human review, don't guess
Step 5 — Present the plan
Show a summary table before writing anything:
| Issue | Title | Proposed Label | Confidence |
|---------|--------------------------------|----------------|---------------------|
| SDK-123 | Add span for DB queries | Spans | High |
| SDK-456 | Fix trace propagation in Fetch | Traces | High |
| SDK-789 | Improve SDK startup | — | Low — please review |Ask: "Should I apply these labels? Reply with any corrections (e.g. 'SDK-789 → Logs') and I'll update the plan before applying."
If the user provides corrections, update the table and show the revised plan before proceeding.
Step 6 — Apply labels
For each approved classification:
- Call
get_issueto fetch the issue's current label IDs immediately before writing - Append the SDK Telemetry label UUID from the Step 2 map
- Call
save_issuewith the full combined label set
Always re-fetch and always pass the full combined set. Linear replaces labels on update — labels added between Step 3 and now would be silently stripped if you use the cached label list.
Report as you go: "SDK-123 → Spans", "SDK-456 → Traces".
Edge Cases
- Issue already has an SDK Telemetry label: Skip it; don't overwrite human classifications.
- Issue could belong to multiple signals: Pick the most specific one (e.g., an issue about replay span instrumentation → Replays, not Spans).
- Very short title, no description: Flag as low-confidence; surface for human review.
- No clear telemetry signal: Do not apply any label; flag for human review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

