Dash0 apply has so far been focused on creating and updating assets. Deleting was on you: delete a definition from your repo, and the asset stayed in Dash0 until somebody removed it by hand.
The new apply -f <directory> --since <ref> option handles the full synchronization. Give it a git reference (a commit hash or a branch), and it compares the asset definitions in that ref against what apply -f resolves to now. Anything in the git reference that is not there anymore in the directory gets deleted.
dash0 apply -X -f ./assets --dry-run --since HEAD~1
Dry run: 2 documents from 2 files validated; 1 deletion pending due to --since 'HEAD~1'
checkout-overview.yaml
* Apply Dashboard "Checkout Overview"
legacy-errors.yaml
* Delete View "Legacy Errors" (view_legacy_errors)
payments-latency.yaml
* Apply Dashboard "Payments Latency"
The apply -f <directory> --since <ref> also handles moving assets among files. As long as the id or the origin is in some file, the asset won’t get deleted.
Stay tuned for more: we are working on a full dash0 diff command, and a GitHub Action so that the new apply -f <directory> --since <ref> workflow fits without any toil into your CD.