Skip to content

feat: export error issues as JSON and Markdown - #609

Closed
unjica wants to merge 1 commit into
developfrom
feat/608-issue-export-json
Closed

unjica wants to merge 1 commit into
developfrom
feat/608-issue-export-json

Conversation

@unjica

@unjica unjica commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • Open an issue detail page → Copy JSON → paste into an editor; confirm schema, telemetry_tracker_version, issue.id, and stacks look right
  • Download JSON → file named issue-<id>.json
  • Copy Markdown → paste into a GitHub comment; stack + dashboard link render
  • Issue with no occurrences (or after retention) still exports with latest_occurrence: null
  • curl/API: GET /api/errors/:id/export with session + project headers returns 200 JSON
  • Unknown id → 404

Made with Cursor

Add GET /api/errors/:id/export (telemetry-tracker.issue.v1) and issue-detail
actions so developers can copy/download JSON or copy Markdown for tickets and AI tools.

Co-authored-by: Cursor <[email protected]>
Comment on lines +1174 to +1207
app.get<{ Params: { id: string } }>("/errors/:id/export", async (request, reply) => {
const projectId = await resolveReadProjectId(request, reply);
if (projectId === null) return;
const { id } = request.params;
const query = request.query as {
app?: string;
environment?: string;
platform?: string;
release?: string;
range?: string;
from?: string;
to?: string;
metricsUntil?: string;
metricsSince?: string;
};
const doc = await loadIssueExportDocument(prisma, projectId, id, {
app: queryApp(query.app),
environment: queryString(query.environment),
platform: queryString(query.platform),
release: queryString(query.release),
range: queryString(query.range),
from: queryString(query.from),
to: queryString(query.to),
metricsUntil: queryString(query.metricsUntil),
metricsSince: queryString(query.metricsSince),
});
if (!doc) return reply.status(404).send({ error: "Not found" });
return reply
.header(
"Content-Disposition",
`attachment; filename="issue-${id}.json"`
)
.send(doc);
});
@unjica

unjica commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as stale: three months behind develop with a failing CodeQL check, and #608 isn't scheduled. The branch is kept and linked from #608 so the work can be resumed.

@unjica unjica closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export error issue as JSON (copy + download)

2 participants