Skip to content

feat(plugin): add sample on array field indices#5297

Open
outsinre wants to merge 2 commits into
mainfrom
KAG-8577-update-doc
Open

feat(plugin): add sample on array field indices#5297
outsinre wants to merge 2 commits into
mainfrom
KAG-8577-update-doc

Conversation

@outsinre
Copy link
Copy Markdown
Contributor

@outsinre outsinre commented May 20, 2026

PR Title

fix(plugin): add sample on array field indices

Description

Log plugins now support array indices within square brackets like hello[1].world[2].foo.

It is added in 3.15.0.0.

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@outsinre outsinre requested a review from a team as a code owner May 20, 2026 06:31
Copilot AI review requested due to automatic review settings May 20, 2026 06:31
@netlify
Copy link
Copy Markdown

netlify Bot commented May 20, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 7364308
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a0d6d85578ea30008314cab
😎 Deploy Preview https://deploy-preview-5297--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for using array indices in custom_fields_by_lua field paths for logging plugins, aligning the docs with newly supported field[1].nested[2] syntax.

Changes:

  • Fixes minor whitespace/indentation issues in the include.
  • Adds a new example showing array index usage in log field keys (square bracket notation).

Comment thread app/_includes/plugins/logging/log-custom-fields-by-lua.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread app/_includes/plugins/logging/log-custom-fields-by-lua.md Outdated
--data {{custom_fields_by_lua}}.header="return kong.request.get_header('h1')"
```

Array indices should be enclosed within square brackets:
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lena-larionova lena-larionova added this to the Gateway 3.15 milestone May 20, 2026
@lena-larionova lena-larionova self-assigned this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants