tarantool / tarantool/doc

Extend `box.cfg.audit_spaces`

Open Beginner friendly
#5,649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Since: 3.7

Each element of box.cfg.audit_spaces used to be a string representing
a space name. Now it also can be a table with the following fields:
- name - mandatory, name of the space.
- extract_key - optional, has the same semantics as option
audit_extract_key, but for particular space.

Also, space name can be a wildcard. It describes all spaces except for ones
listed in audit_log.spaces.

Example:

box.cfg({
    audit_log = 'audit.log',
    audit_format = 'csv',
    audit_filter = 'dml',
    audit_spaces = {
        {name = 'space1', extract_key = true},
        {name = 'space2', extract_key = true},
        '*' -- Enable all other spaces.
    }
})

box.schema.space.create('space1')
box.space.space1:create_index('primary')
box.schema.space.create('space2')
box.space.space2:create_index('primary')
box.schema.space.create('space3')
box.space.space3:create_index('primary')

box.space.space1:insert({1}) -- primary key is logged
box.space.space2:insert({2}) -- primary key is logged
box.space.space3:insert({3}) -- full tuple is logged

os.exit(0)

Contents of the file audit.log:

2026-04-15T12:55:24.956+0000,accd96f6-328f-4f43-99cb-903ab315ec47,VERBOSE,,background,tarantool,admin,space_insert,,Insert key [1] into space space1
2026-04-15T12:55:24.956+0000,f09b35dc-94d8-4cf4-9e35-c3ce7a4b7ca4,VERBOSE,,background,tarantool,admin,space_insert,,Insert key [2] into space space2
2026-04-15T12:55:24.956+0000,4d5e46d8-f795-49d8-8ae6-b864804f4a63,VERBOSE,,background,tarantool,admin,space_insert,,Insert tuple [3] into space space3

Requested by @drewdzzz in https://github.com/tarantool/tarantool-ee/commit/f75dbb1f0ad0babe1215ad119a35144e2cd1fbe1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the documentation entry for box.cfg.audit_spaces and review how the current string-only configuration is described. Document table entries with name and extract_key, wildcard behavior, and the provided Lua and CSV examples; done means the supported forms and their logging effects are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.