Skip to content

Commit 1c31bcd

Browse files
authored
Merge pull request #16 from taskbadger/sk/external-id
Document Task external_id field
2 parents 0e52847 + 207ac29 commit 1c31bcd

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

docs/data_model.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ The main attributes or a task are:
7171
: The name of the queue the task was submitted to. This is set automatically by the Celery and
7272
Procrastinate integrations and can also be set explicitly when creating or updating a task.
7373

74+
<a name="external_id"></a>
75+
`external_id`
76+
77+
: An identifier from the originating system (e.g. a Celery task ID) that lets you correlate a task
78+
with its logs. Set it when creating or updating a task, then filter tasks by exact match on this
79+
value in the web UI.
80+
7481
### Example Task
7582

7683
```json
@@ -97,7 +104,8 @@ The main attributes or a task are:
97104
"tags": [
98105
{"environment": "production"}
99106
],
100-
"queue": "default"
107+
"queue": "default",
108+
"external_id": "celery-abc-123"
101109
}
102110
```
103111

docs/python-celery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Task Badger will create task records for each inner invocation with metadata sim
218218
}
219219
```
220220

221-
**Opting out**
221+
## Opting out
222222

223223
If you want to prevent TaskBadger from tracking a particular execution, set the `taskbadger_track` header (False) when publishing:
224224

0 commit comments

Comments
 (0)