-
Notifications
You must be signed in to change notification settings - Fork 10
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
[merge] feat/metrics_lua_interface #591
Conversation
b320512
to
7306ebb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
===================================================
- Coverage 90.61814% 90.24501% -0.37314%
===================================================
Files 49 51 +2
Lines 10936 10979 +43
===================================================
- Hits 9910 9908 -2
- Misses 1026 1071 +45
... and 6 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
Thank you for improving the PR, @thibaultcha! I left comments about error handling, locking/unlocking in (get/set)_kv when already locked and a note on optional arguments for |
2b9d31b
to
6afd373
Compare
This makes custom blocks injected into `wasm{}` take effect even when `--- wasm_modules` isn't specified (e.g. `--- shm_kv`).
This corrects metrics code to properly use ngx_wasm_shm facilities for shm zone handling.
Previously `ngx_wa_metrics_get` would refuse to return a histogram and return an NGX_ABORT instead. This was due to Proxy-Wasm not supporting histogram retrieval. However, the upcoming FFI interface to shms will allow histograms to be retrieved. Also merges `ngx_wa_metrics_histogram.h` into `ngx_wa_metrics.h` as histogram declaration was already in `ngx_wa_metrics.h` and removing `ngx_wa_metrics_histogram.h` simplifies usage of the lib.
Iterating a tree in batches without knowing the number of elements in it implies an additional traversal through its elements after the last batch is retrieved. This last traversal returns no elements which signals the end of the iteration. Knowing the number of entries in the tree renders the additional traverse unnecessary, when the last batch is retrieved it can be verified that the tree has been fully iterated.
371e169
to
cbe072f
Compare
Co-authored-by: Thibault Charbonnier <[email protected]>
cbe072f
to
9e74d2f
Compare
@casimiro Please have a look especially at the
wip()
commit and let me know if everything is still looking good. I ended up moving the document back todocs/
but not linking anything to it as it's so minor.