forked from pinpoint-apm/pinpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pinpoint-apm#3423] add redis cluster.
- Loading branch information
1 parent
0cbc282
commit cf04b97
Showing
20 changed files
with
293 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
plugins/redis/src/main/java/com/navercorp/pinpoint/plugin/redis/CommandContextFormatter.java
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
plugins/redis/src/main/java/com/navercorp/pinpoint/plugin/redis/JedisMethodNameFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright 2017 NAVER Corp. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.navercorp.pinpoint.plugin.redis; | ||
|
||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod; | ||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilter; | ||
|
||
import java.lang.reflect.Modifier; | ||
import java.util.Arrays; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* @author jaehong.kim | ||
*/ | ||
public class JedisMethodNameFilter implements MethodFilter { | ||
|
||
private final Set<String> excludeMethodNames = new HashSet<String>(16); | ||
|
||
public JedisMethodNameFilter() { | ||
// object methods. | ||
this.excludeMethodNames.addAll(Arrays.asList("clone", "equals", "finalize", "getClass", "hashCode", "notify", "notifyAll", "toString", "wait")); | ||
// unnecessary methods. | ||
this.excludeMethodNames.addAll(Arrays.asList("ping", "close", "disconnect", "resetState", "getClient", "setClient", "getDB", "isInMulti", "isInWatch", "clear", "pipelined", "setPassword", "setDb", "setDataSource", "getClusterNodes", "getConnectionFromSlot")); | ||
} | ||
|
||
@Override | ||
public boolean accept(final InstrumentMethod method) { | ||
if (method != null) { | ||
final int modifiers = method.getModifiers(); | ||
// only public. | ||
if (!Modifier.isPublic(modifiers) || Modifier.isStatic(modifiers) || Modifier.isAbstract(modifiers) || Modifier.isNative(modifiers)) { | ||
return false; | ||
} | ||
|
||
final String name = method.getName(); | ||
// skip pinpoint and object methods. | ||
if (!name.startsWith("_$PINPOINT$_") && !this.excludeMethodNames.contains(name)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
190 changes: 0 additions & 190 deletions
190
plugins/redis/src/main/java/com/navercorp/pinpoint/plugin/redis/JedisMethodNames.java
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
...ins/redis/src/main/java/com/navercorp/pinpoint/plugin/redis/JedisPipelineMethodNames.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.