open-telemetry / community

OpenTelemetry community content
https://opentelemetry.io
Apache License 2.0
776 stars 233 forks source link

Lua SIG: current level of interest? #1276

Open codeboten opened 2 years ago

codeboten commented 2 years ago

Hello OTel community. This issue is to gauge interest in maintaining a Lua implementation.

Since newcomers may be reading this issue, here's brief overview of the components that an OpenTelemetry client is composed of:

All of the nitty-gritty details can be found in the OpenTelemetry Specification.

At minimum, this group would need to do the following:

The group would also need to pick one of two approaches to maintaining an SDK implementation:

The bridge approach may be attractive, as maintaining a production ready SDK represents a lot of work. But I'm not a Lua expert and I don't know what kinds of disadvantages this comes with.

If anyone has interest in contributing to this effort, please introduce yourself! Questions are welcome.

codeboten commented 2 years ago

A quick google search turned up at least one implementation: https://github.com/yangxikun/opentelemetry-lua

plantfansam commented 1 year ago

đź‘‹ I work on the Ruby SDK and also have been contributing to @yangxikun's opentelemetry-lua repo, linked above. yangxikun/opentelemetry orients itself towards the OpenResty runtime. I've done a bit of work to make it more agnostic to other Lua contexts, but there's likely more work to do.

I'm not sure if @yangxikun is interested in making the library fully OpenTelemetry spec compliant, but maybe @yangxikun will reply to this thread with more details.

@codeboten to your point about building a bridge vs. SDK, It's possible @rnburn might have some lessons from implementing a bridge in OpenTracing, so I've tagged @rnburn here. I'm no Lua expert, so would love to have someone with deeper expertise comment on the issue.

Regardless of what route makes sense, I'm interested in helping contribute towards an officially supported OpenTelemetry Lua library, whether it ends up being yangxikun/opentelemetry or a new repo. I'm going to keep working in yangxikun/opentelemetry, but will keep an eye on this issue.

plantfansam commented 1 year ago

I made #otel-lua in CNCF slack if anyone wants to chat synchronously.

yangxikun commented 1 year ago

Hello, I'm glad to contribute opentelemetry-lua to open-telemetry community. In my opinion, implement in pure Lua is easy to develop/debug/maintain and maybe more simply to use in different runtime not only openresty.

The opentelemetry-lua has implemented the tracing spec, and used in https://github.com/apache/apisix/issues/3891. Generally people don't use Lua to implement complex business logic, so Metrics and Logs are not consider to implement yet.

But I also not a Lua expert, I'm glad to see someone with deeper expertise comment on the issue.

plantfansam commented 1 year ago

Upon reflection, the spec's clear API/SDK separation should make it easy for us to publish a compliant API and allow the community to implement/use both 1. pure Lua implementation and 2. a C++ bridge-like implementation (or 3. something else!). Writing a spec-adherent API won't be wasted work.

mxwlf commented 8 months ago

Following. I have a gateway that uses Lua for scripting and I'm interested in it starting a distributed trace if not already in the caller's context