Auto-instrumentation and repackaged dependencies

59 views
Skip to first unread message

Adrian Cole

unread,
Aug 9, 2017, 8:29:06 PM8/9/17
to Distributed Tracing Workgroup
Hi, all. This is a java q, but likely there is similar concerns in different languages.

As discussed in prior meetings, agent based auto instrumentation is ideal in many cases, especially where instrumentation covers the propagation concern.

For example, census' agent carries the trace context for you and watches out for double-instrumentation (not wrapping an executor twice).


There are a lot of java "scheduler" libraries, ones that wrap or create alternatives to base java types. Also, there is a repackaging practice for defence against version conflict: either via a tool like shade or explicit naming conventions, you can end up with multiple copies of a particular type (in different packages)

Does anyone have practice to share on this topic? I'm wondering if folks "snoop the classpath" to figure out if a type is a repackaged copy of another when instrumenting. This isnt limited to schedulers as the same thing can result in multiple anything.. rpc libraries for example.

How do you handle this when auto-instrumenting (if you do)?

-A

wu.shen...@gmail.com

unread,
Sep 15, 2017, 3:59:34 AM9/15/17
to Distributed Tracing Workgroup
OOps, the link(https://github.com/census-instrumentation/opencensus-java/blob/master/contrib/agent/src/main/java/io/opencensus/contrib/agent/ExecutorInstrumentation.java) fails.... (404)

Skywalking(https://github.com/wu-sheng/sky-walking) APM is still using shade to move the classes. I know another way is that, using a new own ClassLoader to load your own libraries, such as rpc libraries. But by doing so, you need to process the Class carefully, otherwise, you have to face IllegalAccessError. Have done this in one commercial product, not skywalking.

And, I don't understand about " I'm wondering if folks "snoop the classpath" to figure out if a type is a repackaged copy of another when instrumenting". Can you explain more?

在 2017年8月10日星期四 UTC+8上午8:29:06,adrian.f.cole写道:
Reply all
Reply to author
Forward
0 new messages