-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f7ddfc
commit c186476
Showing
37 changed files
with
387 additions
and
116 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
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
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
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
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,5 @@ | ||
/target/ | ||
/.settings/ | ||
/.classpath | ||
/.project | ||
/*.iml |
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,13 @@ | ||
## Redis Lettuce Client. | ||
|
||
Currently supports Lettuce 5.0.0.RELEASE ~ 5.1.2.RELEASE | ||
|
||
### Pinpoint Configuration | ||
pinpoint.config | ||
|
||
#### Set enable options. | ||
~~~ | ||
# Enable/Disable | ||
# Default value is true. | ||
profiler.redis..lettuce.enable=true | ||
~~~ |
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,44 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.navercorp.pinpoint</groupId> | ||
<artifactId>pinpoint</artifactId> | ||
<relativePath>../..</relativePath> | ||
<version>1.8.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>pinpoint-redis-lettuce-plugin</artifactId> | ||
<name>pinpoint-redis-lettuce-plugin</name> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<jdk.home>${env.JAVA_8_HOME}</jdk.home> | ||
<test.jdk.home>${env.JAVA_8_HOME}</test.jdk.home> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.navercorp.pinpoint</groupId> | ||
<artifactId>pinpoint-plugin-bom</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.navercorp.pinpoint</groupId> | ||
<artifactId>pinpoint-bootstrap-core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.lettuce</groupId> | ||
<artifactId>lettuce-core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
22 changes: 22 additions & 0 deletions
22
...s-lettuce/src/main/java/com/navercorp/pinpoint/plugin/redis/lettuce/EndPointAccessor.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,22 @@ | ||
/* | ||
* Copyright 2018 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.lettuce; | ||
|
||
public interface EndPointAccessor { | ||
void _$PINPOINT$_setEndPoint(String endPoint); | ||
String _$PINPOINT$_getEndPoint(); | ||
} |
37 changes: 37 additions & 0 deletions
37
...s-lettuce/src/main/java/com/navercorp/pinpoint/plugin/redis/lettuce/LettuceConstants.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,37 @@ | ||
/* | ||
* Copyright 2018 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.lettuce; | ||
|
||
import static com.navercorp.pinpoint.common.trace.ServiceTypeProperty.*; | ||
|
||
import com.navercorp.pinpoint.common.trace.ServiceType; | ||
import com.navercorp.pinpoint.common.trace.ServiceTypeFactory; | ||
|
||
/** | ||
* | ||
* @author jaehong.kim | ||
* | ||
*/ | ||
public final class LettuceConstants { | ||
private LettuceConstants() { | ||
} | ||
|
||
public static final ServiceType REDIS_LETTUCE = ServiceTypeFactory.of(8201, "REDIS_LETTUCE", "REDIS", TERMINAL, RECORD_STATISTICS); | ||
public static final String REDIS_SCOPE = "redisLettuceScope"; | ||
|
||
public static final String END_POINT_ACCESSOR = "com.navercorp.pinpoint.plugin.redis.lettuce.EndPointAccessor"; | ||
|
||
} |
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
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
41 changes: 41 additions & 0 deletions
41
...ettuce/src/main/java/com/navercorp/pinpoint/plugin/redis/lettuce/LettucePluginConfig.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,41 @@ | ||
/* | ||
* Copyright 2018 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.lettuce; | ||
|
||
import com.navercorp.pinpoint.bootstrap.config.ProfilerConfig; | ||
|
||
/** | ||
* @author jaehong.kim | ||
*/ | ||
public class LettucePluginConfig { | ||
private boolean enable = true; | ||
|
||
public LettucePluginConfig(ProfilerConfig src) { | ||
this.enable = src.readBoolean("profiler.redis.lettuce.enable", true); | ||
} | ||
|
||
public boolean isEnable() { | ||
return enable; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("LettucePluginConfig{"); | ||
sb.append("enable=").append(enable); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...ettuce/src/main/java/com/navercorp/pinpoint/plugin/redis/lettuce/LettuceTypeProvider.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,29 @@ | ||
/* | ||
* Copyright 2018 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.lettuce; | ||
|
||
import com.navercorp.pinpoint.common.trace.AnnotationKey; | ||
import com.navercorp.pinpoint.common.trace.AnnotationKeyMatchers; | ||
import com.navercorp.pinpoint.common.trace.TraceMetadataProvider; | ||
import com.navercorp.pinpoint.common.trace.TraceMetadataSetupContext; | ||
|
||
public class LettuceTypeProvider implements TraceMetadataProvider { | ||
|
||
@Override | ||
public void setup(TraceMetadataSetupContext context) { | ||
context.addServiceType(LettuceConstants.REDIS_LETTUCE, AnnotationKeyMatchers.exact(AnnotationKey.REDIS_IO)); | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.