newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 143 forks source link

[Spike] Investigate Increased Overhead with High Volume Token Linking #1988

Open deleonenriqueta opened 3 months ago

deleonenriqueta commented 3 months ago

Description

When using a Reactor Stack and processing a high volume of requests, we've observed an increase in application overhead (CPU usage and latency).

Acceptance Criteria

Research spike. Investigate whether anything can feasibly be done to optimize performance and reduce this overhead, specifically focusing on token linking.

Additional context

Review the GTSE that references this behavior to gather more information.

workato-integration[bot] commented 3 months ago

https://new-relic.atlassian.net/browse/NR-294464

meiao commented 2 months ago

Another customer noticed some increase in overhead. Given the versions the customer was using, we advised them to disable some classes from being weaved and it decreased the overhead.

The configuration for the exclusions is:

class_transformer:
  excludes: ^reactor/core/publisher/MonoSubscribeOn, ^reactor/core/publisher/MonoSubscribeOn$SubscribeOnSubscriber, ^reactor/core/publisher/FluxMapFuseable, ^reactor/core/publisher/FluxMapFuseable$MapFuseableSubscriber
dvilaverde commented 1 month ago

The $ character in the "excludes" stanza needs to be escaped, so use the following to exclude those classes:

class_transformer:
    excludes: ^reactor/core/publisher/MonoSubscribeOn, ^reactor/core/publisher/MonoSubscribeOn\$SubscribeOnSubscriber, ^reactor/core/publisher/FluxMapFuseable, ^reactor/core/publisher/FluxMapFuseable\$MapFuseableSubscriber