-
Notifications
You must be signed in to change notification settings - Fork 231
[Backport to 0.34] Configuration do not cache sender instance #686
[Backport to 0.34] Configuration do not cache sender instance #686
Conversation
870d8d7
to
0f67468
Compare
Codecov Report
@@ Coverage Diff @@
## release-0.34 #686 +/- ##
==================================================
- Coverage 89.13% 89.12% -0.02%
Complexity 540 540
==================================================
Files 68 68
Lines 1952 1950 -2
Branches 252 251 -1
==================================================
- Hits 1740 1738 -2
Misses 135 135
Partials 77 77
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is not an acceptable change. It is changing the semantics of the Configuration class by removing the caching behavior.
@yurishkuro see the comment in #685 (comment) My idea is to cache the tracer but the |
@yurishkuro so changing the configuration will return the cached tracer and not a tracer in sync with the configuration you are calling the getTracer from ? I find this counter intuitive. Also that means that you can get a closed tracer or as i found out a tracer with an underlying closed sender. |
@pavolloffay the @ehsavoie this configuration mechanism was not designed to be "changed" after the tracer is created. Generally, a tracer is created only once per application. I don't understand what use case you have in mind in the ticket. "Reloading" the application would create a new Config object anyway. |
@yurishkuro the sender is being cached once it is resolved |
@yurishkuro tbh I can leave the cached tracer in place if that's your concern, as long as the sender is not cached I can live with it since I'm using a tracerBuilder |
Shouldn't each application have a distinct service name, which necessitates a separate config? And couldn't you simply clone the config object from a shared one before calling getTracer()? |
I'm ok with removing caching of the sender, it looks like the comment
is misleading, since there is no setter for that private field. |
I am saying that tracer instance returned by |
This allows the new instance to be up-to-date with of configuration changes. Resolves jaegertracing#684 * Adding a closed attribute on sender * Sender configuration is resolving again is sender is closed. Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
0f67468
to
82a2686
Compare
@yurishkuro could you please have a look? It looks good to go. |
Backport #685
Issue: #684
Signed-off-by: Emmanuel Hugonnet ehugonne@redhat.com