Skip to content

Commit 18eacb1

Browse files
author
springliao
committed
feat: none
1 parent 21dda04 commit 18eacb1

File tree

65 files changed

+1980
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1980
-421
lines changed

Diff for: .gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ applog/
3737
.flattened-pom.xml
3838
dependency-reduced-pom.xml
3939

40-
backup/
40+
backup/
41+
42+
*.tar.gz
43+
*.zip

Diff for: LICENSE

+892
Large diffs are not rendered by default.

Diff for: polaris-agent-adapter/pinpoint/pinpoint-common/src/main/java/cn/polarismesh/pinpoint/common/AbstractAroundInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.pinpoint.common;
219

320
import cn.polarismesh.common.interceptor.AbstractInterceptor;

Diff for: polaris-agent-adapter/pinpoint/pinpoint-common/src/main/java/cn/polarismesh/pinpoint/common/InterceptorFactory.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.pinpoint.common;
219

320
import cn.polarismesh.common.interceptor.AbstractInterceptor;

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/ClassNames.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2;
219

320
public interface ClassNames {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/DubboPlugin.java

+12-7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
2828
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
2929

30+
import com.navercorp.pinpoint.bootstrap.plugin.util.InstrumentUtils;
3031
import java.security.ProtectionDomain;
3132
import java.util.List;
3233
import java.util.Map;
@@ -117,17 +118,21 @@ public static class UrlConstructorTransform implements TransformCallback {
117118

118119
@Override
119120
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className,
120-
Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
121+
Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classFileBuffer)
121122
throws InstrumentException {
122-
final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);
123-
InstrumentMethod constructor = target
124-
.getConstructor(String.class.getCanonicalName(), String.class.getCanonicalName(),
125-
String.class.getCanonicalName(), String.class.getCanonicalName(),
126-
int.class.getCanonicalName(), String.class.getCanonicalName(),
127-
Map.class.getCanonicalName());
123+
124+
final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, protectionDomain, classFileBuffer);
125+
126+
String[] paramTypes = new String[]{String.class.getCanonicalName(), String.class.getCanonicalName(),
127+
String.class.getCanonicalName(), String.class.getCanonicalName(),
128+
int.class.getCanonicalName(), String.class.getCanonicalName(),
129+
Map.class.getCanonicalName()};
130+
131+
InstrumentMethod constructor = InstrumentUtils.findConstructor(target, paramTypes);
128132
if (constructor != null) {
129133
constructor.addInterceptor(DubboUrlInterceptor.class);
130134
}
135+
131136
return target.toBytecode();
132137
}
133138
}

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/AbstractDubboInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
import cn.polarismesh.pinpoint.common.AbstractAroundInterceptor;

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboAbstractDirectoryInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboAbstractDirectoryInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboConfigInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboConfigInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboExporterInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboExporterInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboExtensionLoaderInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboExtensionLoaderInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboInvokeInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboInvokeInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboMetadataInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboMetadataInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboRegistryDirectoryInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboRegistryDirectoryInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboRegistryFactoryInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboRegistryFactoryInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/DubboUrlInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320
public class DubboUrlInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbo2-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbo2/Interceptor/InterceptorBuilder.java

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbo2.Interceptor;
219

320

4-
import cn.polarismesh.agent.plugin.dubbo2.interceptor.*;
21+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboConfigCenterInterceptor;
22+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboCreateURLInterceptor;
23+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboDiscoveryInterceptor;
24+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboLoadBalanceInterceptor;
25+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboMetadataCenterInterceptor;
26+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboRateLimitInterceptor;
27+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboRegistryInterceptor;
28+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboReportInvokeInterceptor;
29+
import cn.polarismesh.agent.plugin.dubbo2.interceptor.DubboRouterInterceptor;
530
import cn.polarismesh.pinpoint.common.InterceptorFactory;
631

732
public class InterceptorBuilder {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbox-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbox/Interceptor/DubboUrlInterceptor.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbox.Interceptor;
219

320
public class DubboUrlInterceptor extends AbstractDubboInterceptor {

Diff for: polaris-agent-adapter/pinpoint/pinpoint-dubbox-plugin/src/main/java/cn/polarismesh/agent/pinpoint/dubbox/Interceptor/InterceptorBuilder.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making Polaris available.
3+
*
4+
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
5+
*
6+
* Licensed under the BSD 3-Clause License (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* https://opensource.org/licenses/BSD-3-Clause
11+
*
12+
* Unless required by applicable law or agreed to in writing, software distributed
13+
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations under the License.
16+
*/
17+
118
package cn.polarismesh.agent.pinpoint.dubbox.Interceptor;
219

320
import cn.polarismesh.agent.plugin.dubbox.interceptor.DubboCreateURLInterceptor;

0 commit comments

Comments
 (0)