Skip to content

fix: remove llm related metrics for non llm requests#13088

Merged
Baoyuantop merged 7 commits into
apache:masterfrom
shreemaan-abhishek:fix/remove-llm-related-metrics-from-normal-request
Apr 7, 2026
Merged

fix: remove llm related metrics for non llm requests#13088
Baoyuantop merged 7 commits into
apache:masterfrom
shreemaan-abhishek:fix/remove-llm-related-metrics-from-normal-request

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

Which issue(s) this PR fixes:

Fixes #12953

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Mar 13, 2026

@moonming moonming left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @shreemaan-abhishek, thank you for fixing the LLM metrics for non-LLM requests (#12953)!

Removing LLM-related metrics (token counts, etc.) from non-LLM requests is the correct behavior — these metrics should only be populated for AI/LLM plugin routes. I'll review the code in detail shortly.

moonming
moonming previously approved these changes Mar 16, 2026
Baoyuantop
Baoyuantop previously approved these changes Mar 17, 2026
Comment thread apisix/plugins/prometheus/exporter.lua Outdated
Comment thread t/plugin/prometheus-ai-proxy2.t Outdated
Comment thread t/plugin/prometheus-ai-proxy2.t Outdated
@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Mar 18, 2026
Signed-off-by: Abhishek Choudhary <[email protected]>
@shreemaan-abhishek
shreemaan-abhishek dismissed stale reviews from Baoyuantop and moonming via ea141c9 March 31, 2026 02:51
Signed-off-by: Abhishek Choudhary <[email protected]>
f
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
@Baoyuantop
Baoyuantop merged commit 490ee29 into apache:master Apr 7, 2026
19 checks passed
wistefan pushed a commit to wistefan/apisix that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files. wait for update wait for the author's response in this issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Prometheus reports LLM metrics even when LLM plugin is not enabled

4 participants