fix(ai-gateway): Decouple otel data and icnludes from API Gateway#5609
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ Ready to approve
The changes are a straightforward docs refactor with new AI Gateway–scoped includes/data, and the Liquid/YAML patterns match existing, already-used include implementations in the repo.
Note: this review does not count toward required approvals for merging.
Pull request overview
This PR refactors the AI Gateway OpenTelemetry reference docs to source span attribute and metric tables from AI Gateway–specific data/includes rather than reusing API Gateway (plugin) include/data files, helping decouple the documentation paths and content ownership.
Changes:
- Updated AI Gateway docs to include AI Gateway–scoped span attribute and metric table includes.
- Added new reusable include partials to render span attribute and metric tables from AI Gateway data files.
- Introduced new AI Gateway v2 YAML datasets for OTel span attributes and metrics (including attribute descriptions).
File summaries
| File | Description |
|---|---|
| app/ai-gateway/llm-open-telemetry.md | Switches the span attribute table include to the AI Gateway–scoped partial. |
| app/ai-gateway/ai-otel-metrics.md | Replaces large inline metric documentation blocks with AI Gateway–scoped metric table includes and a brief note for kong.gen_ai.llm.cost. |
| app/_includes/md/ai-gateway/v2/policies/span_attribute_tables.md | New include to render span attribute reference sections from AI Gateway YAML data. |
| app/_includes/md/ai-gateway/v2/policies/metric_tables.md | New include to render metric reference sections from AI Gateway YAML data with prefix filtering. |
| app/_includes/md/ai-gateway/v2/policies/collecting-otel-data.md | Adds an AI Gateway–scoped “Collecting telemetry data” include block for policy docs. |
| app/_data/ai-gateway/v2/otel-span-attributes.yaml | New dataset defining AI Gateway span groups and attribute descriptions. |
| app/_data/ai-gateway/v2/otel-metrics.yaml | New dataset defining AI Gateway metrics and attribute descriptions. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 0
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #issue
Preview Links
Checklist
descriptionentry in frontmatter.