Skip to content

Commit

Permalink
remove NewField usage from pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
tbradellis committed Mar 2, 2022
1 parent fa8f200 commit 3c259c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions instrumentation/jedis-4.0.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ verifyInstrumentation {
passes 'redis.clients:jedis:[4.0.0,)'
fails 'redis.clients:jedis:[1.4.0,3.8.0]'
excludeRegex 'redis.clients:jedis:.*-(m|rc|RC|beta)[0-9]*'
exclude 'redis.clients:jedis:3.6.2'

}

site {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
import com.newrelic.api.agent.weaver.Weaver;

@SuppressWarnings({ "ResultOfMethodCallIgnored", "unused" })
@Weave(type = MatchType.BaseClass, originalName = "redis.clients.jedis.JedisPubSub")
@Weave(type = MatchType.ExactClass, originalName = "redis.clients.jedis.JedisPubSub")
public class JedisPubSub_Instrumentation {

private volatile Connection client;

public void proceed(Connection client, String... channels) {
Weaver.callOriginal();
}

public void proceedWithPatterns(Connection client, String... channels) {
Weaver.callOriginal();
}

@Trace
public void onMessage(String channel, String message) {
Weaver.callOriginal();
Expand Down Expand Up @@ -70,5 +78,6 @@ private void reportMethodAsExternal(String commandName) {
.operation(commandName)
.instance(client.getHostAndPort().getHost(), client.getHostAndPort().getPort())
.build());

}
}

0 comments on commit 3c259c2

Please sign in to comment.