tag
The tag directive defines a custom identifier for each task execution. For example:
process hello {
tag "$code"
input:
val code
script:
"""
echo $code
"""
}
workflow {
ch_codes = channel.of('alpha', 'gamma', 'omega')
hello(ch_codes)
}
The above example logs each task with its corresponding tag:
[6e/28919b] Submitted process > hello (alpha)
[d2/1c6175] Submitted process > hello (gamma)
[1c/3ef220] Submitted process > hello (omega)
Tags are a useful way to track related tasks in a pipeline run. Tasks can be identified by tag in the execution log and the trace report.
note
The tag directive is not related to the label directive. Process labels are only used for shared process configuration, not for tracking.