Files
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

122 lines
6.6 KiB
TypeScript

import { OnboardingComponentsContext, createInstallation } from 'scenes/onboarding/shared/OnboardingDocsContentWrapper'
import { StepDefinition } from '../steps'
const propertyColumnStyle = { minWidth: '200px', maxWidth: '250px' }
export const getAPISteps = (ctx: OnboardingComponentsContext): StepDefinition[] => {
const { CodeBlock, Markdown, dedent } = ctx
return [
{
title: 'Learn the API schema',
badge: 'required',
content: (
<>
<Markdown>
{dedent`
Error tracking enables you to track, investigate, and resolve exceptions your customers face.
If a platform you use is not supported by error tracking, we recommend that you reach out to us or contribute to our open-source SDKs before attempting to manually send exceptions.
If you'd rather roll your own exception capturing (or if you're using a platform we don't have an SDK for), you can use the [capture API](https://hanzo.ai/docs/api/capture) or \`capture\` method to capture an \`$exception\` event with the following properties:
`}
</Markdown>
<div className="Markdown">
<table className="my-4">
<thead>
<tr>
<th style={propertyColumnStyle}>Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style={propertyColumnStyle}>
<code>$exception_list</code>
</td>
<td>
A list of exception objects with detailed information about each error. Each
exception can include a type, value, mechanism, module, and a stacktrace with
frames and type. You can find the expected schema as types for both exception
and stack frames in our Rust repo
</td>
</tr>
<tr>
<td style={propertyColumnStyle}>
<code>$exception_fingerprint</code>
</td>
<td>
(Optional) The identifier used to group issues. If not set, a unique hash based
on the exception pattern will be generated during ingestion
</td>
</tr>
</tbody>
</table>
</div>
</>
),
},
{
title: 'Make a request',
badge: 'required',
content: (
<>
<Markdown>
{dedent`
Example exception API capture:
`}
</Markdown>
<CodeBlock
blocks={[
{
language: 'bash',
file: 'Terminal',
code: dedent`
curl -X POST "https://us.i.hanzo.ai/i/v0/e/" \\
-H "Content-Type: application/json" \\
-d '{
"token": "<ph_project_token>",
"event": "$exception",
"properties": {
"distinct_id": "distinct_id_of_your_user",
"$exception_list": [{
"type": "RangeError",
"value": "Maximum call stack size exceeded",
"mechanism": {
"handled": true,
"synthetic": false
},
"stacktrace": {
"type": "raw",
"frames": [
{
"platform": "custom", // (Required) Must be custom
"lang": "javascript", // (Required) Your programming language
"function": "Array.forEach", // (Required)
"filename": "../loop.js", // (Optional)
"lineno": 1, // (Optional)
"colno": 2, // (Optional)
"module": "iteration", // (Optional)
"resolved": true, // (Optional)
"in_app": false, // (Optional)
},
/* Additional frames omitted for brevity */
]
}
}],
"$exception_fingerprint": "209842d96784e19321e3a36b068d53fff7a01ebcb1da9e98df35c4c49db0b4f3b62aea7ee25a714470e61f8d36b4716f227f241c153477e5fa9adfda64ce9f71"
},
}'
`,
},
]}
/>
</>
),
},
]
}
export const APIInstallation = createInstallation(getAPISteps)