ndimiduk commented on PR #4572:
URL: https://github.com/apache/hbase/pull/4572#issuecomment-1167374101

   @apurtell 
   
   > I wish we didn't have to pass the scan attribute builder through as an 
extra parameter to methods that don't care about tracing per se, they simply 
exist on the traced path.
   
   The reason that I have to pass this attributes object around is that I'm 
providing context that is eventually annotated to a span "event" -- essentially 
a log line. Otel API lets me stuff arbitrary attributes into a thread local for 
span attributes, not for span event attributes. 
   
   > Is it possible to use threadlocals or some otel notion of thread context 
for these? Or is that an anti-pattern?
   
   I am also not a fan of the current approach. Introducing a `ThreadLocal` for 
this purpose that is inspected at arbitrary code points seems ham-handed to me. 
At the very least, it should somehow be limited in scope to the current 
request, not the current thread. Let me see if I can find a better solution.


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