Two updates 1. Ming Wen's PR has been reverted immediately, as it breaks the codes. Waiting for his update, and re-send the PR 2. E2E test has been established by Haochao Zhuang, SkyWalking committer. It will check the spans' fields one by one in a real case, like all plugins tested in the Javaagent.
Once APISIX team feels the codes are ready, I could initialize the release of the process. Sheng Wu 吴晟 Twitter, wusheng1108 Sheng Wu <[email protected]> 于2020年2月26日周三 下午2:31写道: > To APISIX team > > A PR(https://github.com/apache/skywalking-nginx-lua/pull/4) from > SkyWalking committer has been starting about the e2e tests. > This is an official and traditional test, in which the SkyWalking > community is required and highly recommended. > This one will set up a simulator backend, and verify the segment/span > whether match the expected data. > > Another PR will be updated in SkyWalking main repo, > https://github.com/apache/skywalking/pull/4399. > Another SkyWalking PMC leads that part, it will test OpenResty + agent > working with Java Apps with javaagent case, the backend this time will be > the real, latest, master branch code SkyWalking. > It will check the data through official GraphQL API. > > This is just an update, SkyWalking community will keep eyes on the > integration/e2e test results. All key release features in SkyWalking have > to pass those tests. Feel free to add Apisix e2e case, after all there > releases finished. > > Sheng Wu 吴晟 > Twitter, wusheng1108 > > > YuanSheng Wang <[email protected]> 于2020年2月26日周三 下午2:15写道: > >> > My test cases and pure LUA concept are mostly related to the core part. >> >> I agree with you. >> >> For the core part, we really should only use standard Lua 5.1 syntax. >> This makes it easier to support other Lua use cases. >> >> >> On Wed, Feb 26, 2020 at 2:01 PM Sheng Wu <[email protected]> >> wrote: >> >> > YuanSheng Wang <[email protected]> 于2020年2月26日周三 下午1:52写道: >> > >> > > > Could you explain why we need native nginx LUA? What is the >> difference? >> > > >> > > Unlike Java, Golang, and other languages, Lua is an embedded language. >> > > >> > > It will have completely different API functions depending on the host >> > > program. >> > > >> > > In addition, Lua, like Python, has several different versions, such as >> > Lua >> > > 5.1, Lua 5.3, and LuaJIT. >> > > Due to LuaJIT's high performance and better compatibility with the >> > standard >> > > Lua 5.1 and Lua 5.2, >> > > currently, OpenResty only supports LuaJIT. >> > > >> > > And I found out that we are using `lua-resty-http` to send HTTP >> requests, >> > > it is already bound to the local Nginx Lua. >> > > >> > >> > For that part, yes, it is bound to Nginx/Resty. But that is also not the >> > tracing core. Tracing core ends when `local status, segment = ngx.ctx. >> > tracingContext:drainAfterFinished()`. >> > The user could use gRPC, HTTP or several months later, >> > SkyWalking-forwarder(write in rust maybe). >> > My test cases and pure LUA concept are mostly related to the core part. >> > >> > To Ming >> > I think at the performance perspective, it is easy to balance, you could >> > inject timestamp/split funcions as an util to help. In default with >> `nil`, >> > use the LUA lib's version. >> > >> > Sheng Wu 吴晟 >> > Twitter, wusheng1108 >> > >> > >> > > >> > > I prefer to use native Nginx LUA ^_^. >> > > >> > > >> > > >> > > On Wed, Feb 26, 2020 at 11:58 AM Ming Wen <[email protected]> wrote: >> > > >> > > > 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 >> > > > > > >> > > > > >> > > > >> > > >> > > >> > > -- >> > > >> > > *MembPhis* >> > > My github: https://github.com/membphis >> > > Apache APISIX: https://github.com/apache/incubator-apisix >> > > >> > >> >> >> -- >> >> *MembPhis* >> My github: https://github.com/membphis >> Apache APISIX: https://github.com/apache/incubator-apisix >> >
