English

What should a staging environment audit log record, and how long should you keep it?

On this page

A staging environment audit log is a record of who did what and when around a shared environment: who booked it, who approved the booking, who changed its rules and what was deployed to it. It matters most on the day someone asks why staging was unavailable, or why a test passed there and failed in production.

This guide lists what the log should hold, why Jira’s own audit log does not cover it, how long to keep each kind of record, and how to use it in an incident review.

What should a staging environment audit log record?

Record every event that changes who can use the environment, or what is running on it. Each entry needs the same four parts: the environment, the actor, the action and the time.

Event Why it belongs in the log
Booking created, changed or canceled Settles “I had that slot” disputes
Approval or rejection Shows who allowed the use and when
Rule change (hours, maximum duration, approvers) Explains why a booking was refused
Maintenance window added or moved Explains downtime nobody expected
Deployment started, succeeded or failed Links a symptom to a version
Rollback Shows a version was reverted, and from what

Add a free-text reason where you can. “Canceled: release moved” is more useful a month later than “Canceled”.

Does Jira’s own audit log cover this?

Not for this purpose. Atlassian’s documentation says the audit log is “intended to record configuration changes that can impact users and spaces”, and not to record all activity in Jira. It also notes that retention is configurable and that viewing it needs the Administer Jira permission.

Jira’s deployments feature helps with a different part of the problem. Atlassian describes it as showing which features have deployed to which environment, using data from a connected deployment tool. The page does not say who performed a deployment. So for staging you need two things: what is deployed where, from the deployment view, and who changed the environment’s rules and bookings, from a log that is about the environment.

For a full walk through the deployment view, see deployment tracking in Jira: what to record for every environment.

How long should you keep each trail?

Different records answer different questions, so they deserve different retention. A sensible starting point:

Record Suggested retention Reason
Audit entries (who changed what) One year Covers yearly reviews and most incident questions
Finished bookings A little over a year Needed to explain past utilization
Conflict and automation logs Three months Useful for debugging, rarely for audits
Deployment history Two years Lets you trace a regression over many releases
The latest successful deployment per application and environment Always It answers what is running now

These numbers are a policy suggestion. Whatever you pick, write it down, and purge on a schedule rather than by hand, so nobody argues about what was deleted.

What does a deployment record need?

A deployment entry should hold enough to find the rest elsewhere: the source system, the environment, the commit reference, a link to the pipeline run and the status. You do not need to copy the whole pipeline log. The link is the bridge to your CI tool, where the person who triggered the run is known.

Keep personal data to the minimum. Whether you need a person’s name in a deployment record is a policy choice. A record that holds a pipeline link and an account ID rather than names and email addresses is easier to retain for long.

How do you use the log in an incident review?

Work backwards from the symptom. This sequence takes ten minutes when the data is there:

  1. Note the time the problem was first seen on staging.
  2. List deployments to that environment in the hours before it. Which version, which commit, did it succeed?
  3. List bookings and approvals in the same window. Was someone testing a different build on purpose?
  4. Check rule and maintenance window changes. Was the environment meant to be down?
  5. Follow the pipeline link for any deployment you cannot explain, and ask the person who ran it.
  6. Write the finding in the incident record, with times.

Most staging incidents turn out to be two people using the environment at once or an unannounced deployment, and the log makes both visible without anyone being asked to remember.

Example Reading the log after an incident

  1. SymptomWhen staging first misbehaved
  2. DeploymentsVersion, commit and result before that time
  3. BookingsWho was testing a different build
  4. Rules and windowsWas it meant to be down
  5. FindingWritten into the incident record, with times
Work backwards from the first symptom, then line up what was deployed, booked and changed in that window.

Doing this inside Jira with an app

ProbePilot for Jira, an app for booking test environments and tracking deployments records changes with who did what and when, and keeps the audit log for 365 days. Bookings, approvals and per-environment rules (business hours, maximum duration, approvers, maintenance windows) are part of the app, and deployments reported by your own CI are tracked per application and environment, with approval and rollback options. In its documented retention, finished bookings and maintenance windows are kept for 400 days, conflict and automation logs for 90 days and deployment history for two years, with the latest successful deployment of each application and environment always kept.

A deployment record keeps the source, the environment, the commit reference, the pipeline link and the status. It does not store the name or email of whoever triggered the pipeline, so use the pipeline link for that. The sending deployments from CI documentation explains the request and what is stored. ProbePilot is for Jira Cloud only and is coming soon to the Atlassian Marketplace.

Sources

Frequently asked questions

What should a staging environment audit log record?

Who did what and when, for every change that affects who can use the environment or what runs on it: bookings, approvals, rule changes, maintenance windows and deployments. Each entry should name the environment, the actor, the action and the time, so a question like who changed the maintenance window yesterday has one answer.

Does the Jira audit log cover deployments to staging?

Not by design. Atlassian says the audit log is intended to record configuration changes that can impact users and spaces, not all activity in Jira. Deployment events are not what it is for, so you need a separate trail for them.

How long should a staging audit log be kept?

Keep it as long as you may need to explain a decision. A year covers most incident reviews and audits of who changed what. Keep deployment history longer than the booking trail if you need to trace a regression across several releases.

Can an audit log tell me who triggered a deployment?

Only if the deployment record stores that. ProbePilot's deployment record keeps the source, environment, commit reference, pipeline link and status, but not the name or email of whoever triggered the pipeline, so you follow the pipeline link to your CI tool for that.

Is an audit log the same as deployment history?

No. Deployment history says what version went where and whether it succeeded. An audit log says who changed settings, bookings and approvals around it. You usually need both to reconstruct an incident.