Add JavaScript structured logs skills#134
Open
KyleTryon wants to merge 7 commits into
Open
Conversation
Add feature and workflow skills for configuring structured JavaScript logs and migrating existing console/logger calls to Sentry Logs. Co-authored-by: Cursor <cursoragent@cursor.com>
Refine the description to clarify the purpose of the skill, emphasizing the addition and improvement of operation-boundary logs for enhanced debugging and operations.
There was a problem hiding this comment.
Pull request overview
Adds two new JavaScript logging skills to guide structured Sentry Logs adoption and migration, and wires them into the existing skill discovery routers and documentation so they’re discoverable via the skill tree and README.
Changes:
- Add
sentry-logs-migration-javascriptworkflow skill (including references and a bundled local ESLint plugin asset) to migrateconsole.*/logger calls to structured Sentry Logs. - Add
sentry-setup-logs-javascriptfeature-setup skill (plus an event catalog template) for improving post-SDK structured logging (catalogs, sampling, redaction, scope placement). - Register both skills in workflow/feature routers,
SKILL_TREE.md, andREADME.md.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/sentry-workflow/SKILL.md | Adds routing for JS/TS logs migration workflow skill. |
| skills/sentry-feature-setup/SKILL.md | Adds routing for JS/TS logs post-setup feature skill. |
| skills/sentry-setup-logs-javascript/SKILL.md | New feature skill content for structured log instrumentation guidance. |
| skills/sentry-setup-logs-javascript/references/event-catalog-template.md | Template for designing event catalogs before instrumentation. |
| skills/sentry-logs-migration-javascript/SKILL.md | New workflow skill content for migrating existing logs to Sentry Logs. |
| skills/sentry-logs-migration-javascript/references/execution-flow-mapping.md | Reference guide for boundary mapping and scope ownership. |
| skills/sentry-logs-migration-javascript/references/eslint-plugin-sentry-structured-logs.md | Reference docs for using the bundled local ESLint plugin. |
| skills/sentry-logs-migration-javascript/assets/eslint/sentry-structured-logs-plugin.mjs | Bundled local ESLint plugin implementing structured-log lint rules. |
| SKILL_TREE.md | Adds both skills to the generated/public skill index. |
| README.md | Lists both skills under Feature Setup / Workflow sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: GPT-5.5 <gpt-5.5@cursor> Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines
+29
to
32
| 4. If the user mentions **migrating JavaScript/TypeScript `console.*` or existing logger calls to Sentry Logs** → `sentry-logs-migration-javascript` | ||
| 5. If the user mentions **upgrading Sentry, migrating SDK versions, or fixing deprecated APIs** → `sentry-sdk-upgrade` | ||
|
|
||
| When unclear, **ask the user** whether the task involves live production issues, PR review comments, or SDK upgrades. Do not guess. |
| reporter, or a maintained wrapper), then apply the same operation, scope, | ||
| wide-event, level, redaction, and lint rules to the retained logger calls. | ||
|
|
||
| ## Phase 2: Boundary Map |
| # Sentry Workflows | ||
|
|
||
| Debug production issues and maintain code quality with Sentry context. This page helps you find the right workflow skill for your task. | ||
| Debug production issues, migrate logging, and maintain code quality with Sentry context. This page helps you find the right workflow skill for your task. |
| # Sentry Feature Setup | ||
|
|
||
| Configure specific Sentry capabilities beyond basic SDK setup — AI monitoring, OpenTelemetry pipelines, and alerts. This page helps you find the right feature skill for your task. | ||
| Configure specific Sentry capabilities beyond basic SDK setup — AI monitoring, JavaScript Logs, OpenTelemetry pipelines, and alerts. This page helps you find the right feature skill for your task. |
Co-Authored-By: GPT-5.5 <gpt-5.5@cursor> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: GPT-5.5 <gpt-5.5@cursor> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: GPT-5.5 <gpt-5.5@cursor> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have two skills I have been demoing with a couple of users to help migrate unstructured logs, and add additional/better logs to JavaScript projects.
Running both of these Skills against any JavaScript project should greatly improve structured logging, as well as implement linting for Sentry-based best practices in logging.
One thing I would maybe discuss before merging, is the lint rule is currently built into this Skill, but another option would be to officially publish a Sentry ESLint rule for all Sentry best practices, and use that instead. I do think that would be a great move, but it could also be done later.
Summary
sentry-logs-migration-javascriptfor migrating console and existing logger calls to Sentry Logs.sentry-structured-logs-javascriptfor adding or improving high-signal structured Sentry Logs after Logs are enabled.Test plan
./scripts/build-skill-tree.sh --checkgit diff --checkMade with Cursor