joshelser commented on a change in pull request #3762:
URL: https://github.com/apache/hbase/pull/3762#discussion_r742299395



##########
File path: conf/hbase-env.sh
##########
@@ -143,10 +143,32 @@
 # export GREP="${GREP-grep}"
 # export SED="${SED-sed}"
 
-# Uncomment to enable trace, you can change the options to use other exporters 
such as jaeger or
-# zipkin. See 
https://github.com/open-telemetry/opentelemetry-java-instrumentation on how to
+# Tracing
+# Uncomment some combination of these lines to enable tracing. You should 
change the options to use
+# the exporters appropriate to your environment. See
+# https://github.com/open-telemetry/opentelemetry-java-instrumentation for 
details on how to
 # configure exporters and other components through system properties.
-# export HBASE_TRACE_OPTS="-Dotel.resource.attributes=service.name=HBase 
-Dotel.traces.exporter=logging -Dotel.metrics.exporter=none"
+#
+# The presence HBASE_TRACE_OPTS indicates that tracing should be enabled, and 
serves as site-wide
+# settings.
+# export HBASE_TRACE_OPTS="-Dotel.traces.exporter=none 
-Dotel.metrics.exporter=none"
+#
+# Per-process configuration variables allow for fine-grained configuration 
control.
+# export HBASE_SHELL_OPTS="${HBASE_SHELL_OPTS} ${HBASE_TRACE_OPTS} 
-Dotel.resource.attributes=service.name=hbase-shell"

Review comment:
       > the operator has likely configured the service.name for a region 
server in cluster A differently than for a region serve cluster B. I think it's 
better to not make assumptions for the operator -- this approach gives them 
complete control, while also providing a reasonable default that available by 
simply uncommenting a few extra lines.
   
   Ah, that is a great point I hadn't considered. I was assuming that I would 
want all RegionServers to always be named "hbase-regionserver". To be more 
explicitly, my original line of thinking was that we could put additions into 
hbase-config.sh (or similar "internal" shell script which is automatically 
source by `bin/hbase`) which do..
   
   ```
   export HBASE_TRACE_OPTS="-Dotel.traces.exporter=none 
-Dotel.metrics.exporter=none"
   export HBASE_JSHELL_OPTS="${HBASE_JSHELL_OPTS} 
-Dotel.resource.attributes=service.name=hbase-jshell"
   export HBASE_HBCK_OPTS="${HBASE_HBCK_OPTS} 
-Dotel.resource.attributes=service.name=hbase-hbck"
   export HBASE_MASTER_OPTS="${HBASE_MASTER_OPTS} 
-Dotel.resource.attributes=service.name=hbase-master"
   export HBASE_REGIONSERVER_OPTS="${HBASE_REGIONSERVER_OPTS} 
-Dotel.resource.attributes=service.name=hbase-regionserver"
   ...
   ```
   
   Which would simplify the user-provide configs to be (assuming I only care 
about master/regionserver tracing)
   ```
   export HBASE_TRACE_OPTS="-Dotel.traces.exporter=none 
-Dotel.metrics.exporter=none"
   export HBASE_MASTER_OPTS="${HBASE_MASTER_OPTS} ${HBASE_TRACE_OPTS}"
   export HBASE_REGIONSERVER_OPTS="${HBASE_REGIONSERVER_OPTS} 
${HBASE_TRACE_OPTS}"
   ```
   
   That said, your counter-argument is excellent and leave users to "undo" 
additions we automatically add to environment variables is way worse than 
verbose hbase-env.sh additions. I fully agree with your point about not making 
assumptions. Will resolve this as such :). Better to revisit this after getting 
some "real feedback"




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to