Audit Logs

Track who changed what and when

Flipswitch logs all changes to flags, rules, and configuration. See who did what, when, and what changed.

What's Logged

Every significant action creates an audit log entry:

ActionDetails Captured
Flag createdFlag key, type, default value
Flag updatedChanged fields, old and new values
Flag deletedFlag key
Flag enabled/disabledEnvironment, previous state
Rule addedConditions, variant
Rule updatedOld and new conditions/variants
Rule deletedRule details
Segment createdSegment key, conditions
Segment updatedChanged conditions
API key createdEnvironment (auto-created with environment)
API key rotatedLeeway period
API key rotation abortedWhether new key was used
API key rotation completedImmediate revocation

Viewing Audit Logs

Navigate to Project > Audit Log to see all changes for a project.

Each entry shows:

[2024-01-15 10:30:42] alice@company.com
  Action: FLAG_RULES_UPDATED
  Flag: dark-mode
  Environment: production
  Changes:
    - enabled: false → true

Filtering

Filter audit logs by:

  • Date range - Last 24 hours, 7 days, 30 days, or custom
  • User - See all changes by a specific user
  • Flag - See all changes to a specific flag
  • Action type - Only show flag toggles, rule changes, etc.

Entry Details

Click on an audit log entry to see full details:

{
  "id": "entry-123",
  "timestamp": "2024-01-15T10:30:42Z",
  "user": {
    "id": "user-456",
    "email": "alice@company.com",
    "name": "Alice Smith"
  },
  "action": "FLAG_RULES_UPDATED",
  "resource": {
    "type": "flag",
    "id": "flag-789",
    "key": "dark-mode"
  },
  "environment": {
    "id": "env-101",
    "key": "production"
  },
  "changes": {
    "enabled": {
      "before": false,
      "after": true
    }
  }
}

Use Cases

Debugging. Something changed and broke production? Check the audit log to see what was modified and by whom.

Compliance. Need to demonstrate who has access to production flag changes? Export audit logs for compliance reports.

Accountability. Know who enabled that flag at 2am on Saturday.

Retention

Audit logs are retained for:

  • Standard plans: 90 days
  • Enterprise plans: 1 year+

Contact support if you need longer retention or log exports for compliance requirements.

Best Practices

Check before major changes. Before enabling a flag in production, review recent changes to understand current state.

Set up alerts. Use the API to monitor for unexpected changes and alert your team.

Regular reviews. Periodically review audit logs to ensure access patterns are appropriate.

On this page