openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
16.94k stars 3.08k forks source link

Add environment variable to enable access log #2680

Open GavinLin168 opened 5 years ago

GavinLin168 commented 5 years ago

Feature: make zipkin + armeria can enable access log like server.tomcat.accesslog.enabled=true

Prior Art

codefromthecrypt commented 5 years ago

we won't use that property name as we don't actually use tomcat, but we can make a property for this!

GavinLin168 commented 5 years ago

is there any way can make armeria access log active in zipkin 2.12.6 version ?

codefromthecrypt commented 5 years ago

yes but it would be custom, making a java library with some extension loading stuff. Is there a reason you are pinned to 2.12.6?

GavinLin168 commented 5 years ago

@adriancole we are using zipkin 2.12.6 in our uat/prod for several months. I am not so clearly about "a java library with some extension loading stuff" , any guide for this ? thanks!

codefromthecrypt commented 5 years ago

ok in exchange for this workaround please plan to upgrade at some point. deal? :)

https://gist.github.com/adriancole/e47ba194b2559031ae2c3723fdfd5984

GavinLin168 commented 5 years ago

@adriancole thanks very much. it works

codefromthecrypt commented 5 years ago

I suggest we add an env variable to add access logging, which happens to use armeria underneath. This will be agnostic to what is done at the spring boot level. Sound good? cc @fbeaufume

fbeaufume commented 5 years ago

Sounds good indeed @adriancole , but this is different to what I'm most interested in. For various reasons, I need to get a better understanding of the inner workings of Zipkin. This means that I'm interesting in internal Zipkin logs, with Zipkin components class name. Ideally I set the "zipkin2" log level to a massive "TRACE" then pick and choose what I need.

codefromthecrypt commented 5 years ago

@fbeaufume as mentioned on the other issue you commented on, we built "self tracing" for this use case. set SELF_TRACING_ENABLED=true and then you get a trace for each interaction of zipkin in zipkin

fbeaufume commented 5 years ago

Thank you @adriancole for the self tracing suggestion.

Unfortunately it doesn't help in my case since:

  1. It does not help me understand where to put the breakpoints in Zipkin sources
  2. Reading the self traces generates more self traces and this makes the whole process too complicated
  3. A log is easily saved, copy/pasted, emailed, etc while the traces displayed in Lens are not

I found an off behavior in Zipkin and I'm willing to help debug it. For that I need good old logs. Is there a simple way to get some ?

codefromthecrypt commented 5 years ago

It isn't fruitful to guess what sort of logs you might want. It is better to focus on concrete problems. We use gitter for troubleshooting. Please mention what supported use case that you are looking to solve please. We don't use issues for random exploration as it spams all watchers.

fbeaufume commented 5 years ago

Opened a dedicated issue in https://github.com/openzipkin/zipkin/issues/2798

shakuzen commented 4 years ago
  1. A log is easily saved, copy/pasted, emailed, etc while the traces displayed in Lens are not

I would just add that traces can be downloaded in JSON format and passed around about as easy as logs.