Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ai): improve analytics report #12924

Merged
merged 21 commits into from
Apr 26, 2024
Merged

Conversation

AntoineJac
Copy link
Contributor

@AntoineJac AntoineJac commented Apr 24, 2024

Summary

This PR will add new AI analytics into the PING anonymous report

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Apr 24, 2024
@pull-request-size pull-request-size bot added size/S and removed size/M labels Apr 25, 2024
@hanshuebner
Copy link
Contributor

hanshuebner commented Apr 25, 2024

How are these counters consumed?

@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 25, 2024
@AntoineJac
Copy link
Contributor Author

@hanshuebner , it is a request from @subnetmarco to start tracking ai usage

@hanshuebner
Copy link
Contributor

Can you add tests, please?

@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 25, 2024
Copy link
Contributor

@hanshuebner hanshuebner left a comment

Choose a reason for hiding this comment

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

Thank you for adding the test! The sleep needs to go, however, to avoid flakiness in high-load CI situations.

proxy_client:close()
proxy_client2:close()

ngx.sleep(0.1)
Copy link
Contributor

Choose a reason for hiding this comment

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

sleep is an anti-pattern in tests. Consider using helpers.eventually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @hanshuebner
agree and we actually don't need the sleep function so I removed it.

Do notice that the test will fail until #12903 is merged.

Thanks

@jschmid1 jschmid1 changed the title Feat/counter ai analytics reports feat(ai): improve analytics report Apr 26, 2024
@tysoekong tysoekong force-pushed the feat/counter-ai-analytics-reports branch from af37e70 to 8e3711b Compare April 26, 2024 13:19
Copy link
Contributor

@jschmid1 jschmid1 left a comment

Choose a reason for hiding this comment

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

Approved, granted tests pass.

@hanshuebner hanshuebner merged commit c6a8ef8 into master Apr 26, 2024
25 checks passed
@hanshuebner hanshuebner deleted the feat/counter-ai-analytics-reports branch April 26, 2024 16:22
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants