Chart annotations

Chart annotations are labels or notes added to a chart to provide additional information or context. Annotations help clarify the data presented in the chart and help the viewer understand key points or trends.

Uptrace displays annotations as square dots on the x-axis. Clicking on an annotation displays the annotation description and tags. The description field can contain markdown links to other systems with more details.

Chart annotations

Creating annotations

You can create annotations by sending an HTTP POST request to the Uptrace API:

curl -X POST https://api.uptrace.dev/api/v1/annotations \
   -H 'uptrace-dsn: https://<token>@api.uptrace.dev/<project_id>' \
   -d '{"name":"Deployed to production", "attrs": {"service.version": "540d2ee"}}'

The JSON payload must include the name field. Other fields are optional.

FieldDescription
nameAnnotation name. Required.
descriptionAnnotation description text in Markdown format. Optional.
colorColor to be used in charts, for example, green or #00ff00. Optional.
attrsKey-value metadata, for example, {"deployment.environment": "production"}. Optional.
fingerprintUnique string used for deduplication. Uptrace will ignore other annotations with the same fingerprint. Optional.
timeOverrides annotation time in RFC3339 format. Optional.

For example:

curl -X POST https://api.uptrace.dev/api/v1/annotations \
   -H 'uptrace-dsn: https://<token>@api.uptrace.dev/<project_id>' \
   -d '{"name":"Deployed to production", "fingerprint": "v1.2.3", "attrs": {"service.version": "v1.2.3"}}'
Last Updated: