feat(docs): document Metering & Billing plugin event dimensions - #6538
feat(docs): document Metering & Billing plugin event dimensions#6538gergely-kurucz-konghq wants to merge 3 commits into
Conversation
|
|
The plugin page said it "captures standard Kong Gateway metadata" but never listed the fields the plugin emits on its CloudEvents. Add a "Captured event dimensions" section under "How it works" with a table per event type (kong.api_request, kong.llm_request) plus the conditional portal/application fields, rendered from a new data file via an include (otel metric_tables pattern). Fields transcribed from the plugin source cloudevent.lua.
The guides show a curated subset of meter dimensions. Add a line in each "Create a meter" step linking to the new event dimensions reference on the Metering & Billing plugin page for the complete list.
a054c51 to
e7b9c8f
Compare
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
lena-larionova
left a comment
There was a problem hiding this comment.
One nitpick, otherwise lgtm. We'll just need to make sure we keep this table updated for every 3.x release.
@lena-larionova My idea is to propose to the plugin developers to annotate the relevant parts of the M&B Plugin code, so that the data fields are documented. (I will put up a PR about this for them.) Then, from this annotation, a JSON file can be exported, listing all the well-known fields. Then, in docs, we could track this JSON export of the fields, to implement a "drift detection" check (compare the JSON field list against what we have in |
That makes sense to me, and would help us a lot. One question: can we assume that if they've merged the changes, that the changes are live to customers? Or are these gated behind API Gateway releases, since this is in the Gateway plugin? |
I am not fully aware of the how the release process of the GW plugins work, I will ask the team. |
Description
What
## How it works), with a table per emitted event type (kong.api_request,kong.llm_request) plus the conditional portal/application fields. Rendered from a new_datafile via an include.Why
The plugin page said it "captures standard Kong Gateway metadata" but never listed the fields it emits — that dimension catalog was undocumented. The how-to guides show only a curated subset, so readers had nowhere to find the complete set.
How
Field lists are transcribed from the plugin source
cloudevent.lua(create_api_event/create_ai_event). The table is data-driven (app/_data/plugins/metering-and-billing.yaml+app/_includes/plugins/metering-and-billing/event_dimensions.md), following the existing OTelmetric_tables.mdpattern. Operator-configured customattributesare documented as an extension mechanism (they can't be enumerated from source). Render-checked locally: both event tables + portal table render, and both guide links resolve to#captured-event-dimensions.Fixes https://konghq.atlassian.net/browse/OM-433
Preview Links
Checklist
descriptionentry in frontmatter.