Register WeakMapProvider earlier in AgentInstaller#1480
Conversation
Specifically it is used statically by `FieldBackedProvider` which was likely called before the `AgentTooling` class was initialized.
| @Override | ||
| public <K, V> WeakMap<K, V> get() { | ||
| log.warn("WeakMap.Supplier not registered. Returning a synchronized WeakHashMap."); | ||
| log.debug("WeakMap.Supplier not registered. Returning a synchronized WeakHashMap."); |
There was a problem hiding this comment.
Why do we want to lower the logging level? I'd actually like to know readily if this happens.
There was a problem hiding this comment.
I felt like this isn't a great reason to alert users. The main side effect would be worse performance, but that may or may not be noticeable depending on where it is applied. I can revert if you think it's important.
There was a problem hiding this comment.
Agreed that this shouldn't log to users in the default configuration. I think users should only see things that are actionable by them in the default configuration, other than version numbers
| @Override | ||
| public <K, V> WeakMap<K, V> get() { | ||
| log.warn("WeakMap.Supplier not registered. Returning a synchronized WeakHashMap."); | ||
| log.debug("WeakMap.Supplier not registered. Returning a synchronized WeakHashMap."); |
There was a problem hiding this comment.
Agreed that this shouldn't log to users in the default configuration. I think users should only see things that are actionable by them in the default configuration, other than version numbers
| @@ -20,7 +20,7 @@ public class AgentTooling { | |||
| registerWeakMapProvider(); | |||
There was a problem hiding this comment.
Is this callsite still needed?
There was a problem hiding this comment.
I left it in as a fallback... it isn't hurting anything for the time being.
* Add time in queue (DataDog/dd-trace-java#1481) * Minor upgrades (DataDog/dd-trace-java#1495) * Allow user to disable kafka time in queue tag (DataDog/dd-trace-java#1487) * Replace Set<Integer> with BitSet for HTTP statuses (DataDog/dd-trace-java#1496) * Register WeakMapProvider earlier in AgentInstaller (DataDog/dd-trace-java#1480) * Update codenarc (DataDog/dd-trace-java#1500) Co-authored-by: Tyler Benson <tyler.benson@datadoghq.com> Co-authored-by: Nikolay Martynov <mar.kolya@gmail.com> Co-authored-by: Richard Startin <richard.startin@datadoghq.com>
Bio Auth Service --- * Send traces on HTTP Routes * Added a .env file that can be used during development to control the behavior of the datadog agent. * Only output logs at the INFO level and above * Output logs as a json-formatted single-line * When receiving a request with no request ID header, generate a UUID to use in subsequent requests. * Add default headers to requests received by Bio Auth Service * Specifically, this means adding a `Server` and a `Date` header * E.g. `Server: ktor-server-core/1.5.4` and `Date: Tue, 25 May 2021 23:20:14 GMT` Bioanalyzer Service --- * Upgrade datadog java agent to remove an extraneous warning (DataDog/dd-trace-java#1480) Signed-off-by: Jeff Kennedy <jeffk@kiva.org>
Specifically it is used statically by
FieldBackedProviderwhich was likely called before theAgentToolingclass was initialized.