Flag Change History and Audit Log in Flagsmith
How Flagsmith remembers who changed what and when, and how to use that memory to debug, investigate and prove control.
Imagine a school that keeps a notebook at the front desk. Every time someone borrows the sports key, they write their name, the time and the reason. Months later, when a ball goes missing, the teacher opens the notebook and finds the answer in seconds. Without the notebook, everyone would only guess and argue.
A feature flag system needs the same notebook. A flag is a small switch that can change what thousands of people see on a screen. When something odd happens at three in the morning, the first question is always the same: what changed, who changed it and when? In Flagsmith, the notebook is called the audit log, together with the history of each flag. This guide teaches you how it works, how to read it and how to build good habits around it.
Flagsmith is updated often. Screen names, the exact fields shown in the log, how long records are kept, and whether some features exist on your plan can differ between versions and between the hosted and self-hosted editions. Use this guide to understand the ideas, and confirm exact labels and limits in your own dashboard and in the official documentation.
1Why a Change History Matters
Before learning any buttons, let us understand the problem the audit log solves.
Flags change behaviour without a release
A normal code change goes through a long road. It is written, reviewed, tested, built and deployed. Every step leaves a record, such as a commit, a pull request and a build number. A flag change skips most of that road. Someone clicks a switch, and the behaviour of the live product changes within seconds.
That speed is the whole point of flags. But speed without memory is dangerous. If nobody can see what was clicked, then a flag becomes a hidden hand moving things around in the dark.
Questions the history answers
- What changed? Which flag, which setting, which environment.
- Who did it? A person, or an automated tool using a key.
- When? The exact time, so it can be matched against graphs and error spikes.
- What was the old value? So you can go back.
- Why? Sometimes recorded in a comment or a linked request.
A flight recorder in an aeroplane does not fly the plane. It only remembers. Yet when something goes wrong, it is the most valuable box on board. The audit log is the flight recorder of your flags.
Four groups who depend on it
Debugging
Match a bug to the change that caused it.
Customer questions
Explain why a customer saw something odd yesterday.
Investigations
Find unusual or unauthorised actions.
Proof of control
Show that changes are traceable and reviewed.
2Quick Recap of the Moving Parts
A few Flagsmith words appear in every audit entry. Let us make sure they are clear.
Organisation, project and environment
An organisation is your company account. Inside it live projects, usually one per product. Inside each project live environments, such as Development, Staging and Production. Each environment has its own settings for every flag.
Feature and feature state
A feature (or flag) is a named switch. It exists at the project level. A feature state is the setting of that feature in one environment: on or off, plus an optional value. So one feature has many feature states, one per environment.
Segments and overrides
A segment is a named group of users defined by rules. A segment override gives the feature a different setting for that group. An identity override does the same for one named user.
Who can act
People log in and act as users of the dashboard. Programs act through API keys. Either one may change things, and both can appear in the history.
| Word | Simple meaning | Appears in the log as |
|---|---|---|
| Feature | A named switch | Creation, edit or deletion of the feature |
| Feature state | Switch setting in one environment | Change of enabled state or value |
| Segment | Named group of users | Creation or edit of rules |
| Override | Special setting for a group or user | Added, changed or removed override |
| Environment | One stage, such as Production | Created, cloned, edited or deleted |
| Change request | A proposed change awaiting review | Created, approved and published |
3What Is the Audit Log
The audit log is a time-ordered list of actions taken inside your Flagsmith organisation.
The simple definition
The audit log is a record that Flagsmith writes automatically each time something important is changed. Each line says roughly: “At this time, this actor did this thing to this object.” Lines are added at the top as time passes, so the newest change is first.
Nobody has to remember to write it
This is a key point. You do not fill in a form. The system writes the entry itself whenever a change is saved. That is why an audit log can be trusted more than a hand-written diary. A person can forget to write. The system does not forget.
What a typical entry holds
- The time of the change.
- The actor: the user, or the key used.
- A short description, such as “Flag state updated for feature checkout_v2 in environment Production”.
- The project and often the environment.
- A link to the object that changed, where the dashboard supports it.
Think of a shop till receipt roll. The till prints a line for every sale without the cashier doing anything. At the end of the day, the roll tells the story of the whole day in order.
An audit log records that something changed, and in many cases what changed. It does not usually record why a person wanted it. Reasons live in tickets, comments and change request descriptions. A good team connects both.
4Audit Log Versus Flag History
People often mix up two related views. They answer different questions, so let us separate them.
The organisation or project audit log
This is the wide view. It lists changes across many objects: features, segments, environments, users, permissions and more. Use it to ask: “What happened in this project yesterday afternoon?”
The history of one flag
This is the narrow view. It shows the story of a single feature, often in one environment: when it was turned on, when its value changed, when an override was added. Use it to ask: “How did this flag get into the state it is in now?”
Side by side
| Question | Wide audit log | Single flag history |
|---|---|---|
| Scope | Many objects, one project or organisation | One feature |
| Best for | Incidents and investigations | Understanding one flag |
| Filter by | Time, actor, object type, environment | Environment and time |
| Typical reader | Security, on-call engineer | Feature owner, support |
The wide audit log is the whole school notebook. The single flag history is the page you get when you look only at entries about the sports key.
5What Gets Recorded
Not every click is recorded, but the important ones that change behaviour or access are. Here are the usual families of events.
Flag events
- A feature is created, renamed, edited or deleted.
- A feature state is switched on or off in an environment.
- A value changes, including multivariate values and their percentages.
- Tags and descriptions are edited, in many versions.
Targeting events
- A segment is created, edited or deleted.
- A segment override is added, changed, reordered or removed.
- An identity override is added, changed or removed.
Environment and project events
- An environment is created, cloned or deleted.
- Environment settings change, such as requiring approval for changes.
- Keys are created or regenerated.
People and access events
- Users are invited, removed or given new roles.
- Permission groups change.
Workflow events
- A change request is created, approved, published or deleted.
- A scheduled change is set or cancelled.
The exact list of recorded events varies by version. Test it once: make a harmless change in a Development environment and see how it appears. Knowing exactly what is recorded, and what is not, is better than assuming.
What is not recorded
Ordinary reading is not a change, so the log does not fill up each time an app asks for flags. It would be huge and useless. The log is about writes, not reads. If you need to know which users were served which value, that is a different tool: evaluation analytics or your own application logs.
6Reading the Audit Log Screen
Let us walk through how to read a typical audit log page, from the top.
The order of lines
The newest entry is at the top. As you scroll down, you travel back in time. This matches the way we think about incidents: start with now, and look backwards until you find the culprit.
The columns or parts of each line
Filtering and searching
Busy projects produce many entries. Filters help you narrow down. Typical filters include a date range, a search for a flag name or text, a project or environment, and sometimes the type of object. In an incident, the best first filter is a time window around the moment the problem started.
Time zones
The dashboard may display time in your browser’s time zone, while exports and APIs often use UTC. A flag change at 16:00 in Kolkata is 10:30 in UTC. When you compare with a graph or a log from another tool, always compare in the same zone.
Reading across time zones without care is like comparing two clocks on a wall that show different hours. Both are right in their own place, but you must agree on one before you say what happened first.
7The Anatomy of One Entry
Let us take one imaginary entry apart, piece by piece, to see how to read it like a detective.
An example in words
Suppose the log shows: “Yesterday at 14:32, user Asha Rao, Flag state updated: checkout_v2, environment Production, enabled changed from off to on.”
| Part | What it tells you | What to do with it |
|---|---|---|
| Time 14:32 | The exact moment | Compare with error graphs and releases |
| User Asha Rao | Who acted | Ask her for the reason, politely |
| Flag state updated | Kind of action | Know it is a setting change, not a deletion |
| checkout_v2 | Which feature | Open its page and its history |
| Production | Which environment | Understand customer impact |
| Off to on | Before and after | Know exactly how to undo it |
The five questions every entry should answer
- Who? The actor.
- What? The kind of change.
- Which? The object and environment.
- When? The time.
- From what to what? The before and after.
When you read an entry, say the five answers out loud, as one sentence. If you cannot, the entry is missing something, and that is worth noting for your team’s practices.
8Who Is the Actor: People and Machines
An entry is only useful if you can tell who or what made the change.
Human actors
When a person logs in and clicks, the entry normally shows their name or email. This makes follow-up easy: you can ask them why. It also means that shared accounts are harmful. If five people use one login called “admin”, the audit log says “admin did it”, and the trail ends.
Machine actors
Programs may change flags through the Flagsmith API using a key. Examples are a deployment pipeline that turns on a flag after a successful release, or a script that creates flags from a configuration file. Entries for such changes may show the key or a service identity instead of a person.
Why naming keys well helps
If your keys are called “key1” and “key2”, then an entry that mentions them tells you nothing. If they are called “release-pipeline” and “terraform-sync”, the entry tells a story at once. Give every key a clear name that states the program and the purpose.
Single sign-on and identity
If your company uses single sign-on, the actor in the log can be tied to your central identity. When a person leaves the company and their identity is closed, you can still read what they did long ago, because the history names them.
Good practice
- One login per person
- Descriptive key names
- Separate keys for separate programs
- Remove unused keys
Poor practice
- Shared admin accounts
- One key for every tool
- Keys named by number
- Keys that nobody owns
9The History of a Single Flag
When you open one feature, Flagsmith can show you how that feature has changed over time. This is often the fastest path to an answer.
Where it lives
On the feature’s page, in many versions, there is a section or tab that lists past changes for that feature, often with a way to switch between environments. It shows the same kind of facts as the wide audit log, but only for this feature, so there is far less noise.
Why it is easier than the wide log
In a busy project, the wide log might contain hundreds of lines per day. If you only care about one flag, you would have to search and filter. The single flag history does that filtering for you. It is like opening a patient’s file instead of reading the hospital’s whole daily diary.
Versions of a flag
Some Flagsmith versions and plans support versioning of feature states. Each saved change creates a numbered version, and you can look at an older version, compare it to the current one, and in some cases restore it. Where this exists, it gives you more than a sentence of description: it gives you the full old setting.
| Capability | Audit log entry | Versioned flag history |
|---|---|---|
| Says that a change happened | Yes | Yes |
| Shows who and when | Yes | Yes |
| Shows the full old setting | Sometimes, as a description | Yes, as a version |
| Lets you compare two points in time | Manually | Often, side by side |
| Lets you restore an old state | No, you re-enter it | In some versions, yes |
The audit log is a diary that says “Asha repainted the fence at two o’clock”. Versioning is a set of photographs of the fence after each coat. The diary tells you who and when. The photographs show exactly what it looked like.
Versioning may be an option you must enable for an environment, and it may be tied to certain plans. Check whether it is on in your environments before an incident, not during one.
10Each Environment Has Its Own Story
A flag in Production and the same flag in Staging are two different settings with two different histories.
Same flag, different timelines
A feature exists once in a project, but its state exists in every environment. Turning it on in Staging does nothing to Production. So the history of that flag in Production is a separate list from the history in Staging.
What this means for investigations
When customers report a problem, make sure you are reading the history of the right environment. A very common mistake is to open the Staging history, see a calm list, and conclude that nobody changed anything. The real change was in Production.
Reading across environments
It is useful to compare environments. If Staging was switched on two weeks ago and Production only yesterday, you can see how long the flag was tested before release. This pattern, repeated, tells you about your team’s release discipline.
| Environment | Typical pattern of changes | What unusual looks like |
|---|---|---|
| Development | Many small, frequent changes | Almost nothing, meaning nobody tests |
| Staging | Changes before every release | Production changes with no earlier staging change |
| Production | Few, deliberate, reviewed changes | Late-night changes by unexpected people |
A theatre has a rehearsal room and a main stage. The rehearsal room is noisy, with many trials. The main stage is quiet, with careful, planned moves. If the main stage suddenly gets lots of changes with no rehearsal, someone should ask why.
Colour or label your Production environment clearly in the dashboard, and read the environment name aloud at the start of every investigation.
11Investigating an Incident Step by Step
When something goes wrong, a calm, repeatable method beats frantic clicking. Here is a path that works.
flowchart TD
A["Problem reported or alert fires"] --> B["Note the exact start time"]
B --> C["Open audit log for the right environment"]
C --> D["Filter to a window before and after the start"]
D --> E{"Any change just before the problem?"}
E -- "Yes" --> F["Read the entry: who, what, which, when, from and to"]
E -- "No" --> G["Widen the window and check other objects"]
G --> H{"Found a candidate?"}
H -- "No" --> I["Look outside flags: releases, infrastructure, data"]
H -- "Yes" --> F
F --> J["Contact the actor for the reason"]
J --> K["Decide: revert, fix forward, or leave"]
K --> L["Record the finding and the action"]
Step 1: Write down the start time
Before you open anything, find the first moment the problem was seen: an alert time, a graph bend, a customer message. Write it down with its time zone. Everything else is measured against this time.
Step 2: Open the right log
Choose the project and environment where customers are affected. Usually it is Production.
Step 3: Filter by time
Look at one hour before the start time and a little after. Changes made long before are rarely the cause of a sudden problem, unless a scheduled change fired later.
Step 4: Read candidates carefully
For each entry in the window, ask the five questions. Prefer entries that touch features related to the broken part of the product.
Step 5: Contact the actor
Ask a short, friendly question. Aim is to learn the intention, not to blame. Many incidents are honest mistakes, and a calm tone gets you the facts faster.
Step 6: Decide the response
- Revert if the change is clearly the cause and the old state is safe.
- Fix forward if reverting would cause other trouble.
- Leave it if the change is unrelated.
Step 7: Record what you learned
Write a short note: what happened, which entry, what was done. This note is the first page of your incident history.
A change just before a problem is a strong clue, but not proof. Check that the timing and the affected feature make sense before deciding that it is the cause.
12Comparing Before and After, and Going Back
Finding the change is half the job. The other half is returning safely to a good state.
Reading the before and after
A good entry tells you the previous value and the new one. If the entry says that the enabled state moved from off to on, going back is simple: switch it off. If it says that a text value changed from “Pay now” to “Buy now”, you can set it back.
When the change is complex
Some changes touch many things at once: several overrides, a percentage split and a value. For these, a one-line entry may not be enough to rebuild the previous state. This is where flag versions are very valuable, because they keep the whole old picture.
Rolling back with care
- Check that the old state is safe. A flag that was on for three months might depend on changes made in the meantime.
- Check the environment before you click.
- Make the revert as a normal change, so it also appears in the audit log.
- Tell the people who watch the product.
A revert is also a change
Going back does not erase history. It adds a new line: “Asha switched it off at 14:41”. The old line stays. That is exactly how a good history should behave. Nothing is hidden, and the whole story, including the mistake and the fix, can be read later.
A pencil with an eraser leaves a smudge. An accountant’s book never erases. If a mistake is made, a correcting line is added below. The book stays honest, and anyone can see what happened and how it was fixed.
| Situation | Best way back |
|---|---|
| Simple on or off change | Switch the state back |
| Text or number value change | Re-enter the old value from the entry |
| Override added by mistake | Remove the override |
| Many linked changes | Restore a previous version, if available |
| Unclear history | Compare with another environment that is healthy |
13The Audit Log and Change Requests
Change requests add a layer of review. The audit log records how that review unfolded.
A quick reminder
A change request is a proposal. Someone suggests a change, others review it, and only after approval is it applied. Environments can be set so that changes must go this way.
What the log can show
- That a request was created, and by whom.
- That it was approved, and by whom.
- That it was published, and at what time.
- The resulting change to the flag itself.
Two layers of story
The request holds the reason and the conversation. The audit log holds the facts and the timing. For a complete picture, read both. A strong team writes a clear title and description on every request, and then the audit log entry can be traced back to the request that explains it.
The actor of a published change
Be careful here. A change request may be written by one person, approved by another, and published by a third. The entry for the final flag change may show the person who published it, while the request shows the author and the approver. To know who truly authored the idea, open the request, not only the log.
| Question | Where to look |
|---|---|
| Who proposed it? | The change request |
| Who approved it? | The change request approvals |
| Who made it go live? | The audit log entry |
| When did it go live? | The audit log timestamp |
| Why was it needed? | The request description and linked ticket |
In a company, a purchase may be asked for by one person, signed by a manager and paid by the finance team. The bank statement shows the payment. The signed form shows the asking and the approving. You need both to tell the whole story.
14Scheduled Changes and the Time Gap
A scheduled change creates a gap between the moment it was decided and the moment it took effect. The history must make both clear.
Two times, not one
If someone schedules a flag to turn on tomorrow at nine, there are two events: the moment of scheduling (today) and the moment of going live (tomorrow). A reader who only looks at the time of going live may wonder who did it, because nobody was at a keyboard at that moment.
How to read such entries
- Find the entry for the scheduling to see who decided.
- Find the entry for the live change to see when it took effect.
- Check whether the schedule was edited or cancelled in between.
Why this matters in incidents
Imagine a problem begins at nine in the morning, and the audit log shows a change at that exact moment. If you search for a person who was working at nine, you may waste time. Look for a schedule set earlier. A scheduled change is a time bomb with a note attached, and the note is in the earlier part of the log.
An alarm clock rings at six, but it was set the night before. If you ask, “who woke me?”, the answer is “you, last night.” The history of the alarm is in the evening, not the morning.
Before any big launch, list all scheduled changes in the next week and share the list. Surprises from forgotten schedules are common and avoidable.
15Segments and Identity Overrides in the History
Flag settings are not only on and off. Targeting changes also alter who sees what, and they are recorded too.
Segment changes
A segment is shared by many features. If someone edits the rules of a segment, for example changing “plan equals premium” to “plan equals premium or standard”, every feature that uses that segment may behave differently for some users. The change is recorded against the segment, not against each feature.
This is a classic trap in investigations. You open a feature’s history and see nothing recent. The feature itself did not change. But the segment it relies on did. So always check the segment history as well.
Segment overrides
Adding, removing or reordering an override on a feature is a change to that feature in that environment, and is recorded as such. Reordering is especially important, because the order decides which override wins when a user belongs to more than one segment.
Identity overrides
A setting for one person is a very targeted change. It is easy to forget because it affects only one user. Over time, many such overrides may appear. The history is how you find out who added a special case for a user and when.
| What changed | Where it is recorded | Who is affected |
|---|---|---|
| Segment rule | Segment history | All features using the segment |
| Override order on a feature | Feature history in that environment | Users in several segments |
| Override value | Feature history in that environment | Members of that segment |
| Identity override | Feature history in that environment | One user |
A guest list for a party is used at many doors. If someone edits the guest list, every door changes at once, though nobody touched the doors. When a door behaves oddly, check the guest list, not just the door.
User traits are not part of this log. A user’s plan changing from free to premium happens in your own system, and it may change what the user sees without any flag change at all. If the audit log is quiet but behaviour changed, look at traits.
16Sending Audit Events to Other Tools
The audit log is most useful when its news reaches the places where people already look.
Webhooks
A webhook is a way for one program to knock on another program’s door when something happens. Flagsmith can be set up to send a small message to a web address of your choice whenever certain events occur, including audit-log type events in many versions. The receiving program can then do something useful with it.
Common destinations
- Chat tools. A short message in a team channel: “Production flag checkout_v2 was turned on by Asha”.
- Monitoring tools. An event marker on a graph, so you can see a flag change as a vertical line next to an error curve.
- Ticket systems. A note added to a ticket that mentions the flag.
- Security tools. A copy of events in a central store for long-term analysis.
Built-in integrations
Flagsmith offers integrations with several popular tools. The list changes over time, so look at the integrations section of your dashboard to see which are offered for your plan.
Why graph markers are powerful
When an engineer looks at a graph of errors and sees a sharp jump, the next question is “what happened then?”. If a flag change appears as a marker at exactly that moment, the answer is visible without opening any log. This often cuts the time to find a cause from half an hour to a minute.
flowchart LR
CHANGE["Flag change saved"] --> LOG["Audit log entry written"]
LOG --> HOOK["Webhook or integration fires"]
HOOK --> CHAT["Team chat message"]
HOOK --> MON["Marker on monitoring graph"]
HOOK --> SEC["Security data store"]
HOOK --> TICKET["Ticket note"]
A village bell rings for important news, so that people in every field hear it. The webhook is the bell. The audit log is the book where the news is written down properly.
If every single change in Development posts to the main channel, people stop reading. Send Production events to the loud channel, and keep other environments in a quiet one.
17Reading the Log Through the API
The dashboard is good for people. Programs prefer the API.
Why use the API
Flagsmith has an administration API that lets programs read and manage data. In many versions, this includes the audit log. With it, you can fetch the latest entries on a schedule, copy them to your own storage and run your own reports.
Typical uses
- Daily export. A job copies the last day’s entries into your central log store.
- Compliance reports. A job prepares a monthly list of Production changes for auditors.
- Alerting. A job watches for unusual patterns, such as many deletions in a short time.
Keys and permissions
The administration API uses a different kind of key from the one used by apps to read flags. It is powerful and must be treated like a password. Give it only to the jobs that need it, store it in a secrets vault and rotate it.
Paging and limits
A big log cannot be returned in one piece. The API gives a page at a time, and the program asks for the next page until all are read. A well-written job remembers the latest entry it saw, so it only fetches new ones next time.
Time and ordering
Entries have timestamps, usually in UTC. When you copy them elsewhere, keep the original timestamp and add your own copy time as a separate field. Never replace one with the other, because later you will want to know both when the change happened and when you learned about it.
Think of a librarian who hands over a long register a few pages at a time. A good clerk notes the last page copied, so tomorrow’s visit starts at the next page, not at the beginning.
Endpoint names, filters and fields differ between versions. Read the current API reference before you write an export job, and test it against a small date range first.
18Architecture and Core Components
Let us look behind the screen. Understanding the parts helps you reason about speed, reliability and trust.
The big picture
flowchart TD
UI["Dashboard"] --> API["Admin API"]
CI["Pipelines and scripts"] --> API
API --> AUTH["Authentication and permissions"]
AUTH --> LOGIC["Business logic: features, segments, environments"]
LOGIC --> DB[("Primary database")]
LOGIC --> AUDIT["Audit recorder"]
AUDIT --> DB
AUDIT --> HOOKS["Webhooks and integrations"]
LOGIC --> CACHE["Flag serving caches"]
CACHE --> SDKS["Apps reading flags"]
The components in plain words
Dashboard and Admin API
Where people and programs make changes.
Authentication and permissions
Checks who you are and what you may do.
Business logic
Applies the change to features, segments and environments.
Primary database
Stores the real flag data and the history.
Audit recorder
Writes the entry for each change.
Webhooks and integrations
Tell other tools what happened.
The separation of reading and writing
The path that serves flags to apps is separate from the path that records changes. Apps read from a fast serving layer. Changes go through the admin path, are stored, recorded and then pushed into the serving layer. This design keeps flag reading very quick and keeps the audit log out of the way of customers.
A caution about self-hosted installs
If you run Flagsmith yourself, the audit log lives in your database. Its safety depends on your backup, access control and retention choices. The hosted service handles this for you, within the terms of your plan.
In a restaurant, the waiter takes your order at the front, the kitchen cooks it, and a bookkeeper notes the sale. Customers eating at the tables are not slowed by the bookkeeper’s writing. The audit recorder is that bookkeeper.
19How an Entry Is Created Internally
When you press Save, a small chain of events runs in the background. Knowing the chain explains why audit entries are trustworthy and why they sometimes look the way they do.
The chain, step by step
sequenceDiagram
participant P as Person or script
participant A as Admin API
participant G as Permission check
participant D as Database
participant R as Audit recorder
participant H as Webhooks
P->>A: Save change
A->>G: Who is this and may they do it
G-->>A: Allowed
A->>D: Write new feature state
A->>R: Create audit entry
R->>D: Store entry with server time
R->>H: Trigger notifications
A-->>P: Success
Why the server’s clock matters
If the time came from the person’s computer, anyone could write any time they like. Because the server writes the time, entries are consistent and hard to fake. This is why audit logs from a proper system carry more weight than screenshots or hand-written notes.
What happens when something fails
If the save fails, there should be no audit entry for a change that did not happen. If the save works but the notification to a chat tool fails, the audit entry still exists. This is a vital difference: the record is the truth, and notifications are only convenient messengers. If your chat channel misses a message, the log is still right.
A bank first checks your card and balance, then moves the money, then prints the receipt, then sends a text message. If the text message fails, the money has still moved and the bank record still exists. The text was only a convenience.
Never treat a chat notification as your official history. Always keep the audit log, or your own exported copy of it, as the source of truth.
20The Life of an Audit Record
An audit record is born, lives a quiet life and eventually leaves. Following that life helps you plan what to keep.
Birth
The record is created at the moment of the change, with the actor, the time and the description. From this moment, it should never be edited. A good audit system is append-only: new lines are added, and old lines are left alone.
Young life: active reading
In the first days and weeks, the record is read often. People look at it in incidents, in reviews and in standups. It is stored in the main database, so it is quick to search.
Middle life: occasional reading
After a few months, reading becomes rare, mostly for investigations and audits. Some teams move older records into cheaper storage, through exports.
Old age: retention limits
No system keeps everything forever without cost. The hosted Flagsmith service may keep audit data for a limited period, which can depend on the plan, and self-hosted installs depend on your own settings. Check the retention period that applies to you, and compare it with what your auditors expect. If the system keeps ninety days and your auditors ask for a year, you need your own exports.
Death: deletion
At the end of the retention period, the record is removed. Some rules, such as privacy laws, may even require removal of personal details after some time. Others, such as financial rules, may require long keeping. Your policy must balance these.
flowchart LR
B["Created at change time"] --> Y["Active period: quick to search"]
Y --> M["Older period: occasional reading"]
M --> E{"Exported to long-term storage?"}
E -- "Yes" --> L["Kept in your archive"]
E -- "No" --> R["Removed at end of retention"]
L --> X["Removed per your own policy"]
A simple retention plan
| Age | Where it lives | Who reads it |
|---|---|---|
| 0 to 90 days | Flagsmith dashboard | Engineers, support |
| 3 months to 1 year | Your central log store, exported | Security, incident reviewers |
| 1 year to policy limit | Cheap archive storage | Auditors, legal |
| After the limit | Deleted by policy | Nobody |
Think of a family’s papers. Recent bills sit on the desk. Last year’s bills go into a box in the cupboard. Very old papers are kept only if the law requires, and shredded after that.
Never assume that the dashboard keeps history for as long as you need. Look up the actual retention for your plan or install, and write it in your runbook.
21Storage, Performance and Scale
An audit log grows forever, unless it is trimmed. A log that grows without care can become slow. Let us see how to keep it healthy.
How fast does it grow
Growth depends on how often people and programs change flags. A small team might create a few dozen entries per day. A big organisation with automated pipelines may create thousands. Programs are the real danger: a script that rewrites flags every minute, even when nothing changes, can fill the log with useless entries.
Writes are cheap, reads can be heavy
Adding a line is quick. Searching through millions of lines with loose filters can be slow. This is why time filters matter. Asking for “the last hour” is cheap. Asking for “everything containing the word checkout” over three years is expensive.
Habits that keep it fast
- Always filter by a time window first.
- Do not poll the API every second. Every minute or every five minutes is plenty for most needs.
- Make automation idempotent: only write a change if the value is different from what is already there.
- Export old data and keep the live system lean.
Self-hosted considerations
If you host Flagsmith, the audit table is in your database. Watch its size, index it properly according to the documentation, and plan clean-up jobs that follow your retention policy. A very large table can slow down not only the audit page but other parts of the system that share the database.
The serving path is protected
Customers reading flags do not touch the audit table. Even if the log is large, flag serving stays quick. That separation is a deliberate and wise design.
Writing a line in a diary takes a second. Reading the entire diary looking for one word takes an evening. If you know the month, you open that page straight away. A time filter is knowing the month.
If your audit log is full of entries from one program, fix the program. A log full of noise hides the one entry that matters.
22Security and Access to the Log
The log is a mirror of your control system. Who may read it, and who may change it, deserves careful thought.
Reading is also sensitive
An audit log can reveal flag names, project structure, who works on what and when. Names like “payment_fraud_check_off” tell outsiders a lot. Limit read access to people who need it: engineers, security and auditors.
Writing must be impossible
Nobody, not even an administrator, should be able to edit or delete an audit line through the dashboard. A log that an administrator can edit is a log that a bad administrator can tidy up. Make sure that no feature, role or script lets people rewrite history.
Role-based access
Flagsmith supports roles and permissions at organisation, project and environment levels in many plans. Use them like this:
- Developers can change Development and Staging.
- Only a small, named group can change Production.
- Only a very small group can manage users, keys and permissions.
- Auditors get read-only access.
Protect the keys
Admin API keys can change flags and read the log. A leaked key is like a stolen master key, and the log will show actions as if done by a legitimate service. Rotate keys, keep them in a vault, never place them in source code, and give each tool its own key so that you can revoke one without stopping the others.
Protect the exports
Copies of the log in other systems are just as sensitive as the original. Give them the same access controls and encryption.
Personal data
The log holds names or emails of your team members. This is personal data in many laws. Share it only for legitimate purposes, and keep it as long as needed, no more.
Strong setup
- Named accounts with single sign-on
- Few people can change Production
- Auditors read-only
- Keys in a vault, rotated
- Exports encrypted
Weak setup
- Shared logins
- Everyone is an administrator
- Keys in code or chat
- Exports in open folders
- No review of access
The school notebook is kept at the front desk. Teachers may read it and write in it, but nobody may tear out a page. Visitors off the street may not see it at all.
23Trust, Integrity and Tamper Resistance
An audit log is only as good as your belief that it is true. Let us see what makes it trustworthy, and what its limits are.
Properties of a trustworthy log
- Automatic. Written by the system, not by people.
- Complete. Covers every important change, with no way to skip it.
- Accurate in time. Time from the server, not from the user.
- Attributable. Every entry tied to an actor.
- Append-only. Not editable through normal use.
Where trust can break
Even a good log has weak points. Anyone with direct access to the database, such as an administrator of a self-hosted install, could in theory change rows. A hosted service reduces that risk, since only the provider’s own staff can access storage, under strict rules. For self-hosting, you should limit database access, log database administrators’ actions and make regular copies.
Making a second copy
The best protection is an independent copy. If you export entries every few minutes to a separate system that the Flagsmith administrators cannot edit, then any later tampering would show up as a difference between the two copies. Think of it as two witnesses who were not in the same room.
Tamper evidence
Some teams add a fingerprint to exported batches, for example a checksum, stored elsewhere. If the batch changes later, the fingerprint no longer matches. This is a simple and strong way to prove that old records are untouched.
What the log cannot prove
- That the person typing was really the account owner. A stolen password can look like the owner.
- That a change was wise. It only says it happened.
- That nothing happened outside Flagsmith, for example a direct database edit on a self-hosted system.
If one person keeps the only notebook, you must trust that person. If two people keep separate notebooks and they match, you can trust the story much more. Independent copies are the same idea.
24Compliance and Regulations
Many rules and standards ask companies to prove that changes to production systems are controlled. The audit log is one piece of that proof. This chapter explains the common ideas in general terms. It is not legal advice, and your own advisers should confirm what applies to you.
The common requirement
Most standards ask three simple things: that changes are authorised, that they are traceable and that records are protected. Flags are production changes, so they fall under these questions.
How the audit log helps
| Auditor’s question | Evidence from Flagsmith practice |
|---|---|
| Who can change production? | Role and permission settings, reviewed regularly |
| Are changes approved first? | Change requests required on Production, with approvals recorded |
| Can you trace a change to a person? | Audit entries with named actors and single sign-on |
| Can records be altered? | Append-only log plus an independent exported copy |
| How long do you keep records? | Documented retention policy and export jobs |
| Do you review activity? | Regular review notes and alerts |
Examples of frameworks where this matters
Security and service standards such as SOC 2 and ISO 27001 ask for controlled change management and logging. Financial reporting rules, for companies that fall under them, ask for control over systems that affect reported numbers, and a flag that changes pricing or a payment path can fall in that area. Privacy laws such as GDPR ask that personal data in logs is handled properly, with a clear purpose and limited keeping time. Industries such as healthcare and banking have their own rules about tracing who changed what.
What auditors usually do
An auditor picks a sample of changes, for example ten Production flag changes from the last quarter. For each one, they ask you to show the audit entry, the approval, and the reason. If you can open the entry, show the linked request and explain the reason within a few minutes, you pass easily. If the trail leads to “I do not remember”, you will have a harder day.
Preparing for an audit
- Keep a short document that describes how flags are controlled.
- Keep exports for the whole period the auditor asks about.
- Run a practice sample yourself every quarter.
- Remove accounts of people who have left.
An auditor is like a school inspector who asks to see the sports key notebook. If every line has a name, a time and a reason, the inspector smiles and moves on. If pages are missing, the inspector looks much harder at everything else.
25Monitoring, Alerting and Metrics on the Log
A log that nobody reads is a locked drawer. Turning the log into signals makes it a living safety net.
What is worth watching
- Production changes outside working hours. Sometimes legitimate, but worth a glance.
- Deletions. Deleting a flag, segment or environment is rare and dangerous.
- Permission changes. New administrators, new keys, changed roles.
- Bursts. Many changes in a few minutes, which may signal a runaway script or an attack.
- Changes by unusual actors. A key that has been quiet for months suddenly acting.
- Disabled safeguards. Turning off the approval requirement on Production.
Useful metrics
| Metric | What it tells you | Healthy sign |
|---|---|---|
| Production changes per week | How active releases are | Stable, understandable pattern |
| Share of changes through change requests | How well review is followed | Close to one hundred percent for Production |
| Changes by automation versus people | Reliance on scripts | Scripts clearly named and expected |
| Time from request to publish | Review speed | Hours, not days |
| Number of deletions | Risky activity | Low and always explained |
| Entries with no named person | Accountability gaps | Zero or explained |
Alert design
Alerts should be few and meaningful. If you alert on every change, people mute the channel. Start with three: any deletion in Production, any permission change, and any Production change made without a change request while that rule exists.
Weekly review
Once a week, a person spends ten minutes reading the Production entries of the past seven days. It sounds old-fashioned, yet it is surprisingly good at spotting small strange things that no alert thought of.
flowchart TD
LOG["Audit log"] --> EXP["Regular export"]
EXP --> STORE["Central log store"]
STORE --> RULES["Alert rules"]
STORE --> DASH["Dashboards and metrics"]
STORE --> ARCH["Long-term archive"]
RULES --> PAGE["Alert to on-call or security"]
DASH --> REV["Weekly human review"]
A smoke alarm rings when there is fire, but a good caretaker also walks round the building once a week. Alerts are the alarm. The weekly review is the walk-round.
26Failure Scenarios and Recovery
Even a well-designed history can have trouble. Knowing the common failures in advance means you will not panic when one appears.
Scenario 1: The log shows nothing, but behaviour changed
This is the most confusing case. Possible explanations are many, and the audit log is only one witness among several.
- A trait changed in your own system, so users moved into or out of a segment.
- A percentage rollout uses a hash of the user identifier, and a new set of users joined the product.
- An app release changed how flags are used, with no flag change at all.
- A cache in an app delayed an old change, which finally took effect.
- You are reading the wrong environment or project.
Work through this list calmly before you suspect that the log is missing entries.
Scenario 2: The actor is a mystery
The entry names a key with a vague name, or a user who left the company. Ask the platform team which pipeline uses that key. Check the key’s creation entry in the log, which names who made it. If nobody owns it, revoke it in a quiet moment, watch for broken tools, and replace it with named keys.
Scenario 3: The webhook did not arrive
A change was made, but the chat channel stayed silent. Remember that the log is the truth, and the webhook is the messenger. Look at the log first. Then check that the webhook address is correct, that the receiver was up and that retries are working.
Scenario 4: The log is too old
You need the history of a change from two years ago, but the dashboard only keeps a shorter period. If you exported it, you can answer. If not, the best you can do is gather indirect evidence: release notes, tickets, chat history. This is the strongest reason to start exports on day one.
Scenario 5: A flood of entries
A broken script writes the same flag every second. The log fills up, and real entries are buried. Stop the script, remove its key permissions if needed, and add a check that avoids writing identical values.
Scenario 6: Time confusion
Two engineers disagree about the order of events because one reads local time and the other reads UTC. Agree on UTC for incident notes, and display the offset on every timestamp.
Scenario 7: The self-hosted database is lost
If you run Flagsmith yourself, a database failure takes the log with it, unless you have backups and an exported copy. Test restoring a backup at least once a year.
| Failure | First check | Prevention |
|---|---|---|
| Behaviour changed, log quiet | Traits, rollouts, app releases, environment | Add markers for releases next to flag changes |
| Unknown actor | Key creation entry and platform team | Name every key and keep an owner list |
| Missing webhook | The log, then the receiver | Alert on failed deliveries |
| History too short | Your own exports | Daily exports from the first day |
| Flood of entries | Which actor is writing | Write only when values differ |
| Time confusion | Time zones in each tool | Use UTC in notes |
| Lost database | Backups and exported copies | Practice restores |
Lifeboat drills happen on calm days so that nobody guesses during a storm. Walking through these failures on a calm day does the same for your team.
27Advantages, Disadvantages and Trade-offs
Every tool has strengths and limits. An honest look at both helps you decide what to add around it.
Advantages
- Automatic, with nothing to remember
- Fast answers to “what changed”
- Supports debugging, support and audits
- Works with webhooks and integrations
- Does not slow down flag serving
- Encourages accountability and calm teamwork
Disadvantages
- Limited retention unless you export
- Does not store the reason for a change
- Does not record reads or user evaluations
- Cannot see changes to your own traits
- Needs good account discipline to be meaningful
- Can be noisy if automation is careless
Trade-offs worth thinking about
Detail versus noise
A very detailed log answers more questions, but is harder to read and larger. A short log is easy to read, but sometimes leaves questions unanswered. Flagsmith chooses a balanced middle, and you can add your own detail through descriptions and linked requests.
Long retention versus privacy
Keeping records for years helps investigations and audits. It also keeps personal data of staff for a long time. Decide how long is really needed and write it down.
Open access versus safety
Letting everyone read the log builds trust and speeds learning. Letting only a few read it reduces the exposure of sensitive names. A common compromise is to let all engineers read Development and Staging entries, and restrict Production and permission entries to a smaller group.
Speed versus review
Requiring approvals adds a step, but adds traceability and a second pair of eyes. Skipping approvals is fast but leaves the log as the only protection, and a log can only tell you about a problem afterwards.
| Choice | Benefit | Cost | Balanced approach |
|---|---|---|---|
| Long retention | Deep history | Storage and privacy burden | Export, then archive with a stated limit |
| Wide read access | Shared learning | Exposure of names | Restrict sensitive environments |
| Strict approvals | Safer Production | Slower changes | Fast review path and an emergency path |
| Chatty webhooks | Awareness | Alert fatigue | Production only in the main channel |
Locks on doors make a house safer and also make it slightly more trouble to enter. Nobody removes all locks to save a few seconds. The art is picking the right locks for the right doors.
28Design Patterns and Anti-Patterns
Teams that use audit logs well tend to follow the same few patterns. Teams that struggle tend to repeat the same few mistakes.
Good patterns
Named identity everywhere
Every person has an account, and every program has a named key. The log always tells a story.
Request first for Production
Production changes go through change requests, so the reason and the approval sit next to the entry.
Independent second copy
Entries are exported to a store that Flagsmith administrators cannot edit.
Markers on graphs
Flag changes appear on monitoring graphs for fast correlation.
Ticket in the description
Every request quotes its ticket number, linking the log to the reason.
Weekly walk-round
One person reads the week’s Production entries on a fixed day.
Anti-patterns
The shared admin login
Everyone uses “admin”. The log cannot tell people apart.
The silent script
A script changes flags with a generic key and no owner.
Log as the only control
The team relies on the log to catch mistakes after they happen, with no review before.
Chat as the only history
People treat chat messages as the record, and lose them when channels are cleaned.
Never reading it
The log exists, but nobody looks until an incident, when nobody knows what normal looks like.
Cleaning up by deleting
Staff delete old flags without recording why, leaving gaps in understanding.
A tidy kitchen has a label on every jar. A messy kitchen has unlabelled jars and one person who “just knows”. The first works when that person is on holiday.
29Best Practices and Common Mistakes
Here is a practical list of habits to adopt and traps to avoid.
Best practices
- Give every person their own account. Use single sign-on if possible.
- Name every key. Use the program and the purpose, such as “release-pipeline-prod”.
- Use change requests for Production. Write a clear title and reason.
- Link tickets. Put the ticket number in the description of changes and requests.
- Export regularly. Keep an independent copy that matches your retention policy.
- Send Production events to the right place. Chat, monitoring and security stores.
- Review weekly. Ten minutes with the Production entries.
- Practise investigations. Pick a past incident and see whether the log answers the five questions.
- Remove old accounts and keys. Every quarter.
- Write a one-page runbook. Where the log is, how to read it, who to call.
Common mistakes
| Mistake | Why it hurts | Better way |
|---|---|---|
| Reading the wrong environment | False reassurance | Say the environment aloud before reading |
| Ignoring segment history | Missing the real cause | Check segments and overrides too |
| Forgetting scheduled changes | Searching for a person who was not there | Look at when the schedule was set |
| Trusting chat messages as history | Messages can be lost | Treat the log as the truth |
| Assuming long retention | History disappears when you need it | Check and export |
| Blaming first, asking later | People hide mistakes | Ask what the intention was |
| Mixing time zones | Wrong order of events | Use UTC in notes |
| Giving everyone Production access | More risk and more noise | Small named group |
Troubleshooting quick guide
- Cannot see the log. Your role may not include read access. Ask an administrator.
- Entry looks short. Open the detail view or the flag version for more.
- Cannot find a known change. Widen the time range, change the environment, and remove text filters.
- Export job misses entries. Check paging, and overlap your time windows slightly, removing duplicates afterwards.
- Webhook silent. Check the address, the receiver, secrets and retries.
The goal of an audit log is learning, not blaming. Teams that treat it as a way to find the guilty person soon find that people stop making changes openly. Teams that treat it as a shared memory get faster and safer together.
30A Complete Walkthrough: The Midnight Checkout Problem
Let us follow an imaginary company, “Acme Cart”, through a real-feeling incident, to see all the ideas working together.
The alert
At 00:12 UTC, an alert says that the share of successful payments has dropped from 98 percent to 71 percent. The on-call engineer, Meera, writes down the start time: about 00:05 UTC, when the graph bent.
Opening the log
Meera opens the audit log for the Production environment and filters from 23:30 to 00:15 UTC. She finds three entries.
| Time (UTC) | Actor | Change |
|---|---|---|
| 23:47 | release-pipeline-prod | Flag “payment_provider_v2” enabled for segment “Beta Users” |
| 00:04 | scheduled change | Flag “payment_provider_v2” enabled for everyone |
| 00:09 | Ravi Nair | Description edited on flag “banner_text” |
Reading the clues
The entry at 00:04 matches the start of the problem very closely. It was a scheduled change, so nobody was at a keyboard. Meera looks for the entry that set the schedule, and finds it in the log from the previous afternoon: Asha Rao scheduled it, with a change request linked to a ticket. The request had two approvals.
The 00:09 entry is unrelated: only a description was changed.
Deciding
The new payment provider works for the Beta Users, but fails at scale for some card types. Meera decides to revert. She switches “payment_provider_v2” off in Production, using the emergency path, which still creates an audit entry. She posts the finding in the incident channel.
Confirming
Within a few minutes, the graph climbs back to 97 percent. The audit log now shows Meera’s revert at 00:19. Together, the entries give a precise story:
sequenceDiagram
participant A as Asha
participant S as Schedule
participant F as Flag in Production
participant M as Meera
A->>S: Schedule enable for everyone at 00:04
S->>F: 00:04 enable for everyone
F-->>M: 00:12 payment success alert
M->>F: 00:19 switch off
F-->>M: Success rate recovers
What the team learned
- The scheduled change had no staged rollout. Next time, release to ten percent first.
- The graph had no flag markers. They added them, so the cause would have been visible in seconds.
- The change request lacked a test plan. They added a “how to check” section to the request template.
- Nobody was blamed. Asha helped write the new template.
Context
A scheduled change turned on a new payment provider for everyone at midnight and hurt payment success.
Decision
Production changes affecting payments must use a staged percentage rollout, show flag markers on payment graphs, and include a checking plan in the change request.
Consequences
Releases take slightly longer, but incidents are found within minutes and affect fewer customers.
31Governance: Policies, Owners and Habits
Tools record facts. People decide what to do with them. A small amount of written governance turns an audit log from a passive record into an active safety system.
A one-page flag change policy
The policy does not need to be long. It should answer a few plain questions, and everyone should be able to find it in under a minute.
- Who may change flags in each environment?
- Which changes need a change request and how many approvals?
- What counts as an emergency, and what is the emergency path?
- Where is the audit log, who reviews it and how often?
- How long is history kept, and where are the exports?
- Who owns keys and integrations?
Owners for each piece
| Item | Owner | Duty |
|---|---|---|
| Flagsmith organisation | Platform team | Accounts, plans, backups, upgrades |
| Each project | Product team lead | Environments, roles, naming |
| Admin keys | Platform team | Naming, rotation, removal |
| Export job | Platform or security team | Run, monitor, fix gaps |
| Weekly review | Rotating engineer | Read entries and report oddities |
| Audit evidence | Security or compliance lead | Prepare samples and reports |
Naming conventions help the log
The log repeats names of flags, segments and keys. Clear names make every line easier to read. A flag called “checkout_v2_payment_provider” tells a reader what is happening. A flag called “test2” does not. Agree on a pattern: area, feature, purpose. Keep the same style in all projects.
Lifecycle of a flag, written in the log
A healthy flag has a visible life: created, tested in Development, tested in Staging, enabled in Production gradually, fully released, then removed once it is no longer needed. The log should show each of these steps. If it shows a flag created three years ago and never touched, ask whether it is a forgotten switch.
Regular clean-up with a record
When you remove old flags, do it deliberately: list candidates, ask owners, remove in a batch, and write a short note saying what was removed and why. The audit log keeps the lines for the deletions, and your note keeps the reason.
A town keeps a register of who owns each shop and when licences end. The register itself does nothing, but the council uses it every year to keep the high street tidy. Governance is the council’s yearly walk.
32Advanced Topics: Many Projects, Many Teams
When a company grows, one small log becomes many logs. New questions appear about how to see the whole picture.
Many projects
Large companies often have one project per product. Each project has its own audit view. For a security team that cares about all of them, opening a dozen dashboards is tiring. The answer is central collection: export all entries into one store and add a field that names the project. Then one search covers everything.
Many environments with the same name
Many projects have an environment called “Production”. When logs are merged, the environment name alone is not enough. Always store the project name or identifier together with the environment.
Cross-checking with other change records
Flags are only one kind of change. Releases, database changes, infrastructure changes and feature settings in other tools also affect users. The most valuable view is a single timeline that combines them all. When Flagsmith entries sit in the same timeline as deployments and configuration changes, correlations become visible at once.
flowchart LR
F["Flagsmith audit log"] --> C["Central change timeline"]
D["Deployment records"] --> C
I["Infrastructure changes"] --> C
DB["Database migrations"] --> C
C --> V["Single view for incidents and audits"]
Analytics on change behaviour
Once the entries are in a data store, you can ask interesting questions. Which flags change most often? Which teams change Production at night? How long do flags live? How many flags were never removed? These questions guide clean-up and training.
Linking flag changes to experiments
If your team runs experiments, the audit log gives exact start and end times for each variant change. Analysts can use these times to cut data windows correctly, instead of guessing from meeting notes.
Automation that respects the log
Pipelines that manage flags as configuration must write meaningful changes only. If a pipeline compares the desired state with the current one, and only changes the differences, the log contains only real changes. If it overwrites everything on every run, the log fills up with noise, and the signal is lost.
Multiple Flagsmith installs
Some companies run separate installs, for example one per region or one for a regulated business unit. The same advice applies: collect all logs centrally, tag each entry with its install, and keep time in UTC.
A city has many police stations, each with its own record book. A central control room copies all of them onto one big board. That is how patterns across districts become visible.
You do not need a giant data platform. A single scheduled export into a simple store, plus one saved search, already gives most of the benefit.
33Testing Your Audit Trail
A smoke alarm is only useful if it rings. Test your audit trail before you need it.
The five-minute test
- In a Development environment, change a flag in a small way.
- Open the audit log. Can you find your change within a minute?
- Check the actor, time, flag, environment and before and after values.
- Check that your chat message or graph marker appeared, if set up.
- Check that your export job picked it up at the next run.
The drill
Once a quarter, pick a past Production change at random, without telling the team. Ask a colleague to explain it using only the log and linked requests. Time how long it takes. Aim for under five minutes. If it takes longer, find what slowed them: missing reason, vague key name, absent ticket link.
The permission test
Create a test account with the lowest developer role. Try to change Production. It should be refused. Try to read the audit log. Check that it behaves as designed. Test an auditor account too, which should read but not change.
The tamper test for exports
Take a batch of exported entries, change one character in a copy and run your integrity check. It must report a difference. If it does not, the check is not protecting you.
The restore test
For self-hosted installs, restore a backup into a spare environment and confirm that the audit log is present. For hosted use, confirm that you can rebuild history from your exports.
| Test | How often | Success means |
|---|---|---|
| Five-minute test | After any setup change | Entry found with all five facts |
| Incident drill | Quarterly | Explained in under five minutes |
| Permission test | Quarterly | Roles behave as designed |
| Tamper test | Twice a year | Changed copy is detected |
| Restore test | Yearly | History recovered |
A fire drill feels tiresome until the day it saves minutes. These tests are fire drills for your history.
34A Maturity Roadmap
Nobody builds a perfect audit practice in a day. Here is a path with four levels, so you can see where you are and what comes next.
How to move up
| From | To | First actions |
|---|---|---|
| Level 1 | Level 2 | Remove shared logins, name keys, add a Production channel, require requests for Production |
| Level 2 | Level 3 | Start exports, write the retention rule, add three alerts, begin the weekly review |
| Level 3 | Level 4 | Merge with deployment records, add graph markers, start quarterly drills, build a few reports |
Learning to cook goes from boiling an egg to cooking a feast. You do not need to become a chef in the first week. Each level is useful on its own.
35Reading Patterns in the Log
After you have read many entries, shapes start to appear. Learning to recognise these shapes lets you spot trouble and good health at a glance.
Pattern 1: The staircase
A healthy release looks like a staircase. A flag is switched on for a small group, then a larger group, then everyone, with gaps of minutes or hours between steps. Each step is a separate entry. If you see a staircase, the team is releasing carefully, and each step gave them a chance to look at graphs before taking the next.
Pattern 2: The cliff
A cliff is a single entry that takes a flag from nothing to everyone at once. Cliffs are sometimes fine, for small and safe changes. For risky changes, a cliff is a warning sign, and it often appears at the start of an incident story.
Pattern 3: The seesaw
A flag that goes on, off, on, off within a short time is a seesaw. It usually means that someone is trying to find a cause by trial and error, or that two people are fighting over the same switch. Ask what is happening. A seesaw in Production is a sign that the team needs a calmer process.
Pattern 4: The midnight visitor
A Production change made at an odd hour by a person who normally works elsewhere deserves a quick check. It may be perfectly innocent, such as an engineer in a different time zone. It may also be an account that someone else is using. Asking costs one message.
Pattern 5: The burst
Many entries in a few seconds, all by one actor, usually point to a script. Check that it is the script you expect, and that it is not writing the same value again and again.
Pattern 6: The long silence
A flag with no changes for a year may be stable and healthy, or forgotten. If the feature is fully released, it is a candidate for removal. If the flag controls something that should be reviewed, such as a limit or a price, a long silence may mean that nobody has looked at it for too long.
Pattern 7: The orphan override
An identity override added a long time ago for one user, never removed, is an orphan. These special cases pile up and make behaviour hard to predict. The history shows who created them and when, which helps decide whether to remove them.
| Pattern | What it looks like | Usual meaning | Response |
|---|---|---|---|
| Staircase | Gradual widening in steps | Careful release | Celebrate and copy it |
| Cliff | All users at once | Fast but risky change | Prefer steps for big changes |
| Seesaw | On and off repeatedly | Trial and error or conflict | Slow down and coordinate |
| Midnight visitor | Production change at odd hours | Time zones or misuse | Ask politely |
| Burst | Many entries in seconds | Script behaviour | Check script and key |
| Long silence | No change for a year | Stable or forgotten | Review for removal |
| Orphan override | Old one-user special case | Forgotten promise | Review and clean up |
A doctor reading a heart monitor does not read every beat. They look at the shape of the line. A steady rhythm is reassuring, and a sudden spike draws their eye. Reading the log by its shapes is the same skill.
Spend ten minutes with the log of one busy flag and try to name the pattern of each period. It trains your eye faster than any manual.
36Using the Log for Customer Support
Support teams meet the effects of flag changes first, often without knowing a flag exists. A little shared knowledge turns confusing tickets into quick answers.
The typical customer message
A customer writes: “Yesterday I could see the new reports page, and today it is gone.” The support agent cannot tell whether this is a bug, a planned change or something about the customer’s own account. The audit log helps answer the first two questions in minutes.
A simple routine for support
What support should not do
- Do not change Production flags to fix a single ticket, unless that is your approved process.
- Do not share internal flag names or the names of colleagues with customers.
- Do not promise that a feature will return before the owner confirms it.
Read-only access is enough
Support staff rarely need to change anything. A read-only role for Production and the ability to read the audit log is usually enough. This keeps the risk low while keeping the answers fast.
A hotel receptionist does not repair the lift, but can read the maintenance notice that says the lift was closed at two o’clock. That small piece of knowledge saves a guest from a long and puzzled wait.
Give support a short guide with screenshots from your own dashboard, showing how to open a feature’s Production history. Ten minutes of teaching saves hours of escalations.
37Real-World and Industry Examples
Audit trails are an old idea. Almost every serious industry keeps one. The descriptions below are general patterns that are widely discussed, not details of any private system.
Cloud platforms
Major cloud providers such as Amazon Web Services, Google Cloud and Microsoft Azure offer activity logs that record who called which management operation and when. Security teams rely on them for investigations and compliance. The lesson for flags is the same: every administrative action should be recorded with an actor and a time, and teams should export these records somewhere safe.
Source control
Systems such as Git keep a history of every change to code, with an author, a time and a message. Developers rely on that history daily, to find which change introduced a bug. A flag audit log plays the same role for behaviour changes that happen outside the code.
Banking and payments
Banks keep strict records of every transaction and every administrative change to account settings. Regulators expect these records to be complete, protected from edits and kept for set periods. Payment flags are close to this world, so teams working in payments usually follow similar discipline.
Healthcare
Healthcare systems record who looked at or changed a patient record, and when. The principle of attributable, time-stamped, append-only history is the same, even if the stakes are different.
Aviation
Aeroplanes carry flight recorders, and airlines keep maintenance logs that record every repair and inspection. After an accident, investigators rebuild events from these records. The culture of learning without blaming, often highlighted in aviation safety, is exactly the culture that makes audit logs useful in software.
Large technology companies
Companies that run products at huge scale, such as large social networks, video services and search engines, have written publicly about internal tools for feature gating and configuration changes. Common themes include change review, staged exposure, and fast correlation between a configuration change and a spike in errors. These themes match the practices in this guide.
| Industry | Record kept | Core idea shared with flag audit logs |
|---|---|---|
| Cloud platforms | Activity logs of management actions | Every admin action has an actor and a time |
| Software development | Commit history | History explains how the present came to be |
| Banking | Transaction and setting records | Complete, protected, kept for set periods |
| Healthcare | Access and change records | Attributable and time-stamped |
| Aviation | Flight and maintenance records | Learn from the record, do not blame |
Wherever a small action can have large effects, mature fields keep a protected, time-ordered record of it. Feature flags are exactly such a place.
38Reusable Checklists
Copy these into your team wiki. Short lists, used often, beat long manuals read once.
Setting up a healthy audit practice
- Personal accounts for all people, with single sign-on if possible.
- Named keys for every program, with an owner list.
- Change requests required on Production.
- Production events sent to a team channel.
- Flag markers on important graphs.
- Exports scheduled, with a stored copy outside Flagsmith.
- Retention written down and compared with audit needs.
- Three alerts: deletions, permission changes, bypassed review.
When investigating an incident
- Write the start time and time zone.
- Pick the right project and environment.
- Filter to a window around the start.
- Check feature, segment and override entries.
- Look for scheduled changes set earlier.
- Check traits, rollouts and app releases if the log is quiet.
- Ask the actor kindly for their reason.
- Record the finding and the action.
Before a big launch
- List scheduled changes for the coming week.
- Confirm the right people hold Production access.
- Confirm that alerts and markers are working.
- Make sure the change request lists a checking plan.
- Choose a staged rollout rather than a sudden switch.
Every quarter
- Run a drill on a past change.
- Review accounts, roles and keys.
- Check that exports are complete and protected.
- Run a sample for the auditors as practice.
- Remove old flags with a recorded note.
A pilot never trusts memory for routine steps. Checklists are not a sign of weakness, but of care. They free the mind to think about the unusual parts.
39Plain-English Glossary
A short reference for the words used in this guide.
Audit log
A time-ordered record of important actions taken in the system.
Actor
The person or program that made a change.
Append-only
A record where new lines are added and old lines are never edited.
Feature flag
A switch outside the code that changes behaviour.
Feature state
The setting of a feature in one environment.
Environment
A separate stage, such as Development or Production.
Segment
A named group of users defined by rules.
Override
A special setting for a segment or one user.
Trait
One fact about a user, such as their plan.
Change request
A proposed change that waits for review.
Scheduled change
A change set to take effect at a later time.
Versioning
Keeping numbered copies of past states.
Webhook
A message one program sends to another when something happens.
Integration
A ready-made link between Flagsmith and another tool.
Admin API
The programming interface used to manage Flagsmith.
Retention
How long records are kept before removal.
Export
Copying records into another system.
Checksum
A fingerprint that changes if the data changes.
UTC
The world’s shared reference time, used to avoid zone confusion.
Single sign-on
One company login used across many tools.
40Frequently Asked Questions
Quick answers to the questions that come up most often.
41Summary and Key Takeaways
Let us pull the whole story together in a few lines you can remember.
Key Takeaways
- The audit log is the memory of your flags. It records who changed what, where and when, automatically, with server time.
- Know the two views. The wide audit log is for investigations. The single flag history, with versions where available, is for understanding one feature.
- Look wider than the flag. Check segments, overrides, scheduled changes, traits, rollouts and the right environment before deciding the log is silent or wrong.
- The log is the truth, messages are messengers. Keep an independent exported copy, and plan retention before you need it.
- Identity makes history useful. Personal accounts, named keys and single sign-on turn lines into a story.
- Connect and watch it. Use change requests for Production, send events to chat and graphs, and alert on deletions, permission changes and bypassed review.
- Practise and stay kind. Run drills, review weekly, and use the log to learn, not to blame. Confirm version-specific details in the Flagsmith documentation.