Skip to content

Register WeakMapProvider earlier in AgentInstaller#1480

Merged
tylerbenson merged 1 commit into
masterfrom
tyler/weak-map
May 26, 2020
Merged

Register WeakMapProvider earlier in AgentInstaller#1480
tylerbenson merged 1 commit into
masterfrom
tyler/weak-map

Conversation

@tylerbenson
Copy link
Copy Markdown
Contributor

Specifically it is used statically by FieldBackedProvider which was likely called before the AgentTooling class was initialized.

Specifically it is used statically by `FieldBackedProvider` which was likely called before the `AgentTooling` class was initialized.
@tylerbenson tylerbenson requested a review from a team as a code owner May 20, 2020 20:54
@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.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to lower the logging level? I'd actually like to know readily if this happens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this callsite still needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it in as a fallback... it isn't hurting anything for the time being.

@tylerbenson tylerbenson merged commit 704da3f into master May 26, 2020
@tylerbenson tylerbenson deleted the tyler/weak-map branch May 26, 2020 16:42
@github-actions github-actions Bot added this to the 0.53.0 milestone May 26, 2020
iNikem pushed a commit to open-telemetry/opentelemetry-java-instrumentation that referenced this pull request Jun 2, 2020
* 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>
ghost pushed a commit to kiva/guardian-bio-auth that referenced this pull request May 26, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants