ramkrish86 commented on a change in pull request #1202: HBASE-23756.
[OpenTracing] Add OpenTracing dependency and helper methods.
URL: https://github.com/apache/hbase/pull/1202#discussion_r383765241
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/trace/TraceUtil.java
##########
@@ -34,17 +51,24 @@
private static HTraceConfiguration conf;
private static Tracer tracer;
+ private static io.opentracing.Tracer otTracer;
+
+ private static final Logger LOG =
LoggerFactory.getLogger(TraceUtil.class.getName());
+
+
private TraceUtil() {
}
- public static void initTracer(Configuration c) {
- if (c != null) {
- conf = new HBaseHTraceConfiguration(c);
- }
+ public static void initTracer(Configuration c, String serviceName) {
+ if (!GlobalTracer.isRegistered()) {
+ io.jaegertracing.Configuration conf =
io.jaegertracing.Configuration.fromEnv(serviceName);
+ io.opentracing.Tracer tracer = conf.getTracerBuilder().build();
- if (tracer == null && conf != null) {
- tracer = new Tracer.Builder("Tracer").conf(conf).build();
+ GlobalTracer.register(tracer);
Review comment:
More of a question - This happens at the init time - means the server start
up time right? If the user wants to use jaeger tracing he can do it by setting
some env variables. But if the same has to be unset what needs to be done? And
also after the server starts up and then he needs to introduce jaeger tracing
how can that be done?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services