Mark changes and deploys
A mark is a vertical line on your charts with a short text. You can add one by hand from the dashboard, and your CI can add one after each successful production deployment, so you can see what changed next to the visits of that day.
Add and manage marks by hand
Marks appear on the overview of your site, under the visits chart, in a section called Marks. Anyone with access to the dashboard can add, edit and delete marks, including the ones your CI wrote. The public shared dashboard does not show marks.
Add a mark
Click Add mark. If the period has no marks yet, the button is in the empty block under the chart. Fill in the form:
- Text: what changed, in a few words. It is required, up to 140 characters, and a counter shows the characters used out of 140.
- Link: optional. An
https://address, for example the release notes. - Date and time: now by default, in the time zone of your site. It cannot be more than 24 hours in the future or earlier than the start of your data retention period.
Then confirm with Add mark. If you pick a time that does not exist in your time zone because of a clock change, the form asks you to choose another one. A site holds a limited number of marks (see the end of this page), so delete the ones you no longer need if you reach the limit.
See your marks
On the chart, each bucket with marks gets a vertical line. A bucket is an hour, a day, a week or a month, depending on the interval you chose. If a bucket has several marks, its line shows a number. Lines that sit close together merge into one, with a bar over the span they cover and the total count.
Click or tap a line, or focus it and press Enter or Space, to open its details: the text, the date and time in the time zone of your site, the host of the link (it opens in a new tab) and a From CI label if a CI wrote the mark. Close the details with the close button (×), with Escape, or by clicking outside.
Under the chart, a list shows the marks of the period, newest first, with the same details. It starts with the 5 newest marks, and a button below it shows up to 50 more each time. Show fewer takes you back to 5 marks. On small screens the list is collapsed: tap the Marks title to open it.
Edit or delete a mark
In the details or in the list, click Edit, change the text, the link or the time, and click Save changes. If you do not touch the time, it stays as it was.
Click Delete and confirm with Delete mark. Deleting is permanent and cannot be undone.
Hide marks
Show marks turns the lines and the list on or off. Hide marks from CI hides only the marks that come from a CI, and it is not available while Show marks is off. Both only change what you see on screen: they delete nothing. While Show marks is off, the section says that marks are hidden. With Hide marks from CI, the count under the title tells you how many marks are hidden. They are not remembered, so after you reload the page, marks are shown again.
Do not put personal data in the text or the link of a mark.
Marks from your CI: token and GitHub Actions
A CI can add marks on its own after each successful production deployment. You need a token, and then one step in your deploy job.
Create a token for the site
Open Site settings → Tracking → Marks from CI and create a token. A token is valid for one site, can create marks and cannot read anything: it never opens your statistics. Copy it when it is shown, because it is displayed once. Store it in your CI as a secret named ATRIQO_ANNOTATION_TOKEN, never in the repository. If it leaks, revoke it in the same card and delete the marks it wrote.
The call below goes from your CI to https://api.atriqo.com/api/v1/annotations. It is not meant for browsers: do not put the token in a web page.
GitHub Actions
Make this the last step of your production deploy job. It runs only if every earlier step succeeded, and continue-on-error keeps a failed mark from failing your deployment.
# GitHub Actions: last step of the production deploy job
- name: Mark the deployment in Atriqo
if: success()
continue-on-error: true
shell: bash # needed for the ${GITHUB_SHA::7} slice on non-Linux runners
env:
ATRIQO_ANNOTATION_TOKEN: ${{ secrets.ATRIQO_ANNOTATION_TOKEN }}
run: |
curl --fail --silent --show-error --max-time 10 \
-X POST https://api.atriqo.com/api/v1/annotations \
-H "Authorization: Bearer ${ATRIQO_ANNOTATION_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"text\":\"Deploy ${GITHUB_SHA::7}\",\"delivery_id\":\"gh-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}\"}" The delivery_id is built from the run id and the attempt number, so a retry of the same run does not add a second mark and a re-run of the workflow is a new one.
GitLab CI
Put the command as the last line of the script of your production deploy job. It runs only if every earlier command of that job succeeded, and || echo keeps a failed mark from failing your deployment. It does not depend on the name of your default branch.
# GitLab CI: the last line of the script of YOUR production deploy job.
# It runs only if every earlier command of the job succeeded.
deploy-production:
script:
- ./deploy.sh production # your own deploy commands
- >
curl --fail --silent --show-error --max-time 10
-X POST https://api.atriqo.com/api/v1/annotations
-H "Authorization: Bearer ${ATRIQO_ANNOTATION_TOKEN}"
-H "Content-Type: application/json"
-d "{\"text\":\"Deploy ${CI_COMMIT_SHORT_SHA}\",\"delivery_id\":\"gl-${CI_PIPELINE_ID}\"}"
|| echo "Atriqo mark skipped" This example assumes one production deploy per pipeline: the delivery_id is the pipeline id, so a second production deploy in the same pipeline would be acknowledged instead of marked. If your pipeline deploys to production more than once, add something that tells the deployments apart, such as the job name.
Another CI
Any system that can run a command works. Set COMMIT_SHORT to a 7-character prefix of the commit hash and DEPLOY_ID to an identifier of this production deployment that is the same on a retry and different on a new deployment, such as the run id plus its attempt number.
curl --fail --silent --show-error --max-time 10 \
-X POST https://api.atriqo.com/api/v1/annotations \
-H "Authorization: Bearer ${ATRIQO_ANNOTATION_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"text\":\"Deploy ${COMMIT_SHORT}\",\"delivery_id\":\"${DEPLOY_ID}\"}" \
|| echo "Atriqo mark skipped" The answer is 201 with the id of the new mark. Sending the same delivery_id again answers 200 with the id of the existing mark and creates nothing, so a retry after a timeout is safe. Use the id of the deployment, not of the commit: deploying the same commit again is a separate change.
What a mark stores
A mark stores only what you send. The example we suggest sends the commit identifier, not the author or the message. Do not put personal data in marks.
Mark only a production deployment that finished successfully, with a short neutral text. You may add the branch or tag name, or a link to the run, in the text or the optional url field. Do not use the name of the CI user, the author of the commit or the commit message: they can carry personal data, and a commit message can include the email addresses of co-authors.
A token can create up to 30 marks a minute, and a site up to 120 marks an hour across all its tokens. A site holds up to 10,000 marks. The full description of the call, with every answer, is in the file /docs/api/openapi-annotations-v1.yaml.
Delete the marks of a token
If a token leaks, or you no longer want what it wrote, you can delete its marks. In the token card (Site settings → Tracking → Marks from CI), click Delete its marks. You can also open a mark that comes from CI, in its details or in the list, and click Delete all marks from this token.
After you confirm with Delete marks, every mark written with that token is deleted. That includes marks outside the period you are looking at and marks of that token that you edited later. Marks you created by hand are not affected. It is permanent and cannot be undone.