Linking Agent Telemetry to Tickets
By default, minware attributes AI agent usage to the ticket the person was working on at the time, based on their ticket activity. That works well when someone works one ticket at a time. It can't tell which ticket a session was for when someone runs several agents in parallel on different tickets, or works on a ticket that isn't assigned to them or isn't marked in progress.
To make the link explicit, tag your agent's telemetry with the key of the ticket it is working on. minware then attributes every AI session and event from that agent directly to that ticket.
This works with the Claude Code and Codex telemetry integrations.
How it works
Add an OpenTelemetry attribute named minware.ticket.key whose value is the ticket's key, such as
MW-123:
- Use the ticket key, not an internal ID. Use the value minware shows in the Ticket Key
column of reports. This is the key you see in your ticketing system, like
MW-123in Jira. - The key must match exactly, including case.
mw-123does not matchMW-123. - When the key matches a ticket, minware attributes the AI sessions and events to that ticket and to that ticket's sprint. AI usage metrics broken down by ticket or sprint then reflect it.
- When the attribute is missing, or the key doesn't match a ticket in minware, minware falls back to the default attribution: the ticket the person was working on at the time.
Set the ticket key when you start the agent
The ticket changes from task to task, so set the key in the environment you launch the agent from,
rather than in settings.json or config.toml, which apply to every session. Both Claude Code and
Codex read the standard OTEL_RESOURCE_ATTRIBUTES environment variable:
OTEL_RESOURCE_ATTRIBUTES="minware.ticket.key=MW-123" claude
OTEL_RESOURCE_ATTRIBUTES="minware.ticket.key=MW-123" codex
OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of key=value pairs. If it is already set,
for example by your organization's managed settings, add minware.ticket.key to the same list
instead of replacing it:
OTEL_RESOURCE_ATTRIBUTES="team.id=platform,minware.ticket.key=MW-123" claude
The key applies to everything the agent sends until it exits. To work on a different ticket, start a new session with the new key.
Notes
- Only the Claude Code and Codex telemetry integrations carry a ticket key. AI usage from other sources, such as Cursor, GitHub Copilot, and the Claude Enterprise analytics API, always uses the default attribution.
- The ticket key changes which ticket and sprint AI usage is attributed to. Breakdowns by branch or commit still use the work the person was doing at the time.
- If a ticket moves to another project and its key changes, telemetry sent with the old key no longer matches it and falls back to the default attribution.