Skip to content
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

Plugin interaction and SkyWalking native log format with trace context #4232

Open
wu-sheng opened this issue May 12, 2021 · 8 comments
Open
Labels
discuss enhancement New feature or request

Comments

@wu-sheng
Copy link
Member

@dmsolr @moonming I want to discuss an enhancement feature for APISIX ecosystem about observability.

SkyWalking built its native tracer implementation for Nginx and APISIX, so we have this, http://apisix.apache.org/docs/apisix/plugins/skywalking/. Which supports tracing and backed by OAP's analysis capability, we have topology with metrics about traffic.

Now, with the latest SkyWalking's log analyzer, we should consider looping logs in. So 2 questions should be answered

  1. Could 2 plugins interact with each other? If so, how.
  2. Does APISIX want to adopt SkyWalking native log format? https://github.com/apache/skywalking-data-collect-protocol/blob/master/logging/Logging.proto Although APISIX is only good at HTTP+JSON, so we could leverage satellite to forward, but it is better to add a native gRPC reporter into satellite

If you feel interests, let's work on this together.

@wu-sheng wu-sheng added enhancement New feature or request discuss labels May 12, 2021
@wu-sheng
Copy link
Member Author

I know we talked about ALS, which could be another separate feature. As general logs are more flexible, ALS is focusing on topology and traffic metrics analysising.

@dmsolr
Copy link
Member

dmsolr commented May 13, 2021

  1. plugins interact means passing trace context in the scope of a request. We can use ngx.ctx to propagate it.
  2. I think it is good to adopt SkyWalking native log format when skywalking tracer plugin was enabled.

@wu-sheng
Copy link
Member Author

plugins interact means passing trace context in the scope of a request. We can use ngx.ctx to propagate it.

Yes, it could be, but we should take care of the priority and execution sequence.

@wu-sheng
Copy link
Member Author

I think it is good to adopt SkyWalking native log format when skywalking tracer plugin was enabled.

I think we could include it in skywalking-nginx-lua repo if that makes senses to APISIX community.

@dmsolr
Copy link
Member

dmsolr commented Feb 24, 2022

APISIX has supported reporting access-log with trace context and error-log to SkyWalking by #5478 and #4633.
So, I think this issue could be closed.

@wu-sheng
Copy link
Member Author

I think (1) is not supported? Do we skip it?

@dmsolr
Copy link
Member

dmsolr commented Feb 25, 2022

We can get tracing_context in other plugins by ngx.ctx.tracing_context. So I think (1) is supported as well.
I will submit a PR to add some explanations to the related document.

@wu-sheng
Copy link
Member Author

Thanks, look forward to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants