I cerated a small PR[1] for that. for example, the nginx lua has `split`, `timestamp` APIs which not need to implement by lua again, and with better performance.
I know what you mean. This library can not only be used by nginx Lua, but also be reused by programs written by pure Lua. I will try to compatible with nginx lua and standard Lua in the code. [1] https://github.com/apache/skywalking-nginx-lua/pull/3 Thanks, Ming Wen, Apache APISIX Twitter: _WenMing Sheng Wu <[email protected]> 于2020年2月26日周三 上午11:44写道: > Ming Wen <[email protected]> 于2020年2月26日周三 上午11:37写道: > > > hello, skywalking dev team, > > > > I am adding CI and test cases for nginx lua to this project[1]. I found > > that most of the code was implemented using Lua code instead of the > native > > nginx lua API. > > > > I am trying to refactor in the way of nginx lua, and now there are two > > issues that need to be discussed with you: > > > > 1. Does this project is only for the nginx lua environment? This is the > > case from the naming of the project, and I want to confirm it again > > here. Because > > I can use native nginx lua APIs for many optimizations if only for nginx > > lua. > > > > I wrote these codes in pure LUA intentionally as they actually don't > require any Nignx dependency. > Today, I haven't the case we need the pure LUA use case, but I am > thinking it is also harmless and better for the further. > You could see this kind of design nearly in Java, go and will be in the > next Rust agents. > Tracing code could be lightweight and widely used, integration is a plugin > system, such as targeting any Java lib/ecosystem or Nginx. > Like in java agent, there are three parts, instrumentation core, tracing > core and plugin system. > > The only links between tracing core and Nginx are tracer.lua and > client.lua. > > Ming, > Could you explain why we need native nginx LUA? What is the difference? > > Sheng Wu 吴晟 > Twitter, wusheng1108 > > > > > > > 2. After I performed the above step, the test cases of the original > luaunit > > method will not works well. Of course, I will add test cases for nginx > lua > > to complete coverage. > > > > What do you think? > > > > To Apache APISIX dev: > > I will upload this project to the package manager `luarocks` later, and > add > > the Apache APISIX plug-in, which requires the help of the Apache APISIX > > community. > > > > [1] https://github.com/apache/skywalking-nginx-lua > > Thanks, > > Ming Wen, Apache APISIX > > Twitter: _WenMing > > >
