skywalking icon indicating copy to clipboard operation
skywalking copied to clipboard

[Feature] Upgrade Armeria apm-sdk-plugin from 0.98.x to 1.21.x

Open gglzf4 opened this issue 3 years ago • 11 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

The latest version supported by the apm-sdk-plugin of Skywalking is 0.98. Upgrade the apm-sdk-plugin to armeria-1.21.x.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

gglzf4 avatar Jan 14 '23 03:01 gglzf4

The plugin is designed for specific versions. Basically, when we face incompatible new version, we should create a new plugin for newer versions, rather than bumping up version.

wu-sheng avatar Jan 14 '23 03:01 wu-sheng

https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/java-plugin-development-guide/#implement-plugin

Witness class and methods could be used to help plugin identifying versions.

Set up witnessClasses and/or witnessMethods if the instrumentation has to be activated in specific versions.

wu-sheng avatar Jan 14 '23 03:01 wu-sheng

OK,I'm sorry I'm not accurate, I mean by creating a new version plugin to adapt to the new version.

gglzf4 avatar Jan 14 '23 03:01 gglzf4

For maven module management under the apm-sdk-plugin directory, I have the following ideas:

  1. SDK main module naming format: apm - {sdk_name} - plugins, where {sdk_name} is the real name of the sdk, for example: apm-armeria-plugins

  2. The naming format of the sub-module under the main module of the SDK: apm - {sdk_name} - {version} - plugins, where {sdk_name} is the real name of the sdk, and {version} is the adaptive version of the SDK, for example: apm-armeria-0.99.x-plugin

  3. The directory name of Maven module is consistent withandin pom.xml.

To sum up, take "armeria" as an example to show the structure of maven module as shown below:

image

gglzf4 avatar Jan 18 '23 18:01 gglzf4

According to the previous idea, I am going to move the original two modules (armeria-0.84.x-plugin and armeria-0.85.x-plugin) to the apm-armeria-plugins module, and change the module directory name to (apm-armeria-0.84.x-plugin and apm-armeria-0.85.x-plugin) respectively: image Please give suggestions!

gglzf4 avatar Jan 18 '23 18:01 gglzf4

I think this is not an issue about changing the folder structure. You are better to submit a pull request to add apm-armeria-plugins and move the existing two into it, then send another pull request for the new feature.

This could avoid too many changes in one PR.

wu-sheng avatar Jan 19 '23 00:01 wu-sheng

That's a good idea.

gglzf4 avatar Jan 19 '23 02:01 gglzf4

Are you still working on this?

wu-sheng avatar Feb 18 '23 03:02 wu-sheng

Yes, I will submit it this weekend

gglzf4 avatar Feb 19 '23 03:02 gglzf4

@zhangrm New feature has been merged. Please follow up the discussion, and move the existing two plugins into the new created folder.

wu-sheng avatar Feb 26 '23 13:02 wu-sheng

This issue has been resolved

gglzf4 avatar Feb 26 '23 14:02 gglzf4