Skip to content

feat(metrics-es): allow logging metrics to JSON file with write-to option #2293

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

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

msavy
Copy link
Member

@msavy msavy commented Sep 1, 2022

To facilitate scrape-based metrics, this commit allows Apiman's ES metrics (as JSON) to be written
to a log file. The specific behaviour is controlled via whatever logging framework is used.

It is possible to write to any of: remote (ES server), log

The configuration provided in this commit calls the output metrics.log, but we the user can change
this, as per their preferences. Async logging is used, where possible, to mitigate the impact on
performance, as this is likely to generate a considerable number of log writes.

Thanks again to Terry, Russel, Joe, Colin, LN, Shivraj, and the rest of the team.

Fixes: #2100

@msavy msavy added SC: Metrics Subcomponent: Metrics Sponsored-Contribution labels Sep 1, 2022
@msavy msavy self-assigned this Sep 1, 2022
@msavy
Copy link
Member Author

msavy commented Sep 1, 2022

Will likely wait for 3.1 to merge this, but let's see.

@cypress
Copy link

cypress bot commented Sep 1, 2022



Test summary

17 0 0 0


Run details

Project Apiman
Status Passed
Commit 8a0b73f ℹ️
Started Sep 1, 2022 5:06 PM
Ended Sep 1, 2022 5:08 PM
Duration 01:54 💡
OS Linux Ubuntu - 20.04
Browser Electron 102

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@msavy msavy changed the title feat(metrics-es): allow logging to file with write-to option feat(metrics-es): allow logging metrics to JSON file with write-to option Sep 1, 2022
@msavy msavy removed the SC: Metrics Subcomponent: Metrics label Sep 1, 2022
To facilitate scrape-based metrics, this commit allows Apiman's ES metrics (as JSON) to be written
to a log file. The specific behaviour is controlled via whatever logging framework is used.

It is possible to write to any of: `remote` (ES server), `log`

The configuration provided in this commit calls the output `metrics.log`, but we the user can change
this, as per their preferences. Async logging is used, where possible, to mitigate the impact on
performance, as this is likely to generate a considerable number of log writes.

Fixes: #2100
Copy link
Member Author

@msavy msavy left a comment

Choose a reason for hiding this comment

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

ready

@msavy msavy merged commit dabb5af into master Dec 1, 2022
@msavy msavy deleted the es-log-to-file-2 branch December 1, 2022 20:47
@msavy msavy added this to the Apiman 3.1 milestone Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow logging of metrics into file (for scraping into metrics platforms)
1 participant