| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
|
||
| package org.apache.skywalking.apm.plugin.solon; | ||
|
|
||
| public class FastPathMatcher { |
There was a problem hiding this comment.
What is this? I think we didn't discuss about this part.
Sorry, something went wrong.
There was a problem hiding this comment.
Controlling which paths require plugins through environment variables, so I used this class, which comes from this project https://github.com/apache/skywalking-java/blob/main/apm-sniffer/optional-plugins/trace-ignore-plugin/src/main/java/org/apache/skywalking/apm/plugin/trace/ignore/matcher/FastPathMatcher.java
Sorry, something went wrong.
There was a problem hiding this comment.
Ignore plugin is reading configurations from the agent folder, why do ou need that for Solon?
Sorry, something went wrong.
There was a problem hiding this comment.
solon 不需要他,是我自己想添加这样一个功能。尽管有 trace-ignore-plugin 这个插件,但我认为这个插件是在链路追踪后写入数据时阻止忽略的数据写入,而我希望的是插件在生效时,直接过滤排除的 url 请求地址
Sorry, something went wrong.
There was a problem hiding this comment.
这个类用 进行 URL 地址匹配,从而实现排除某些不需要链路追踪 URL 的目的
Sorry, something went wrong.
There was a problem hiding this comment.
Please keep in English in GH discussion.
I don't think ignoring should be implemented by a specific plugin of a specific framework.
Please remove this part.
AFAIK, the existing ignore plugin could collaborate with your plugin automatically.
Sorry, something went wrong.
|
Also, I can see you didn't follow the document to add relative plugin tests. Notice, as we are only hosting your codes, to guarantee it works for end users, we need you to finish plugin tests and verify the data. |
Sorry, something went wrong.
抱歉,我没有linux和mac环境来运行自动化测试,但我编写了我提交插件的测试文件,请问有其他的办法可以进行测试吗? |
Sorry, something went wrong.
|
Please use English on Github. You could use VM or something to run the tests. |
Sorry, something went wrong.
|
Please add it into CI control file to make sure it runnable, and attach your local test results. Meanwhile please be clear about supported versions in docs and test supported list. |
Sorry, something went wrong.
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| 2.8.3 No newline at end of file |
There was a problem hiding this comment.
We should not support only one version. You could verify all supported versions(patch versions), and list all minor versions, one patch version per minor version(such as 2.8.3 for 2.8.x, 2.7.3 for 2.7.x).
Sorry, something went wrong.
| spanLayer: Http | ||
| startTime: not null | ||
| endTime: not null | ||
| componentId: 14 |
There was a problem hiding this comment.
There is no Solon component related. What is the meaning of your tests?
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, this isn't the final code, I just wanted to get a different computer to continue with the code
Sorry, something went wrong.
Sorry, something went wrong.
|
Please follow other comments to fix these
|
Sorry, something went wrong.
|
Any update? |
Sorry, something went wrong.
Sorry, it's been a busy day. I'll take care of it tomorrow. |
Sorry, something went wrong.
I have submitted the appropriate documents as per your instructions, please help me to confirm whether it is correct or not, thank you! |
Sorry, something went wrong.
|
Resolve the conflicts, then I could make CI works to verify. |
Sorry, something went wrong.
|
Please run tests locally, rather than costing us too much on running repeatedly. |
Sorry, something went wrong.
| 2.7.0 | ||
| 2.7.1 | ||
| 2.7.2 | ||
| 2.7.3 | ||
| 2.7.4 | ||
| 2.7.5 | ||
| 2.7.6 | ||
| 2.8.0 | ||
| 2.8.1 | ||
| 2.8.2 | ||
| 2.8.3 | ||
| 2.8.4 No newline at end of file |
There was a problem hiding this comment.
I didn't follow my comments. 2.7(per minor version) and 2.8 should keep one version only.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, my English is really bad and I have to rely on translation software, which leads to a lot of places that I can't fully understand.
Sorry, something went wrong.
There was a problem hiding this comment.
CN slack is there. If you have doubts, ask there.
Sorry, something went wrong.
| - {key: url, value: not null} | ||
| - {key: http.method, value: GET} | ||
| skipAnalysis: 'false' | ||
| - operationName: 'Solon:GET:/testcase/error' |
There was a problem hiding this comment.
None of entry spans have reference verifications, this test scenarios can't prove the tracing continues.
Solon is a RPC framework AFAIK, your test doesn't cover an important part.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, I can't fully understand the meaning of automated test scripts. I wrote this script with reference to spring. From the results I get from running it, I think I can get the link tracing information
Sorry, something went wrong.
There was a problem hiding this comment.
If no reference, I can't see how it links.
You should check the segments of traces, and understand the data.
As I have explained, we don't maintain the plugins, but host for you(for example). After this, I can't ask you every time when someone submitted an issue/discussion. So, the best way is, test scenarios themselves can prove it works as expected.
Sorry, something went wrong.
| plugin.rocketmqclient.collect_message_tags=${SW_PLUGIN_ROCKETMQCLIENT_COLLECT_MESSAGE_TAGS:false} | ||
| # How many parameter characters to keep and send to the OAP backend, -1 save all, 0 save nothing, >0 save specified length of parameter string to the tag. default is 0. | ||
| plugin.solon.http_params_length_threshold=${SW_PLUGIN_SOLON_HTTP_PARAMS_LENGTH_THRESHOLD:0} | ||
| # How many header characters to keep and send to the OAP backend, -1 save all, 0 save nothing, >0 save specified length of header string to the tag. default is 0. |
There was a problem hiding this comment.
The comments/descriptions should be polished. Refer to the above one.
Sorry, something went wrong.
| Object ret) { | ||
| Context ctx = (Context) allArguments[0]; | ||
| if (afterExceptionHandling) { | ||
| if (SolonPluginConfig.Plugin.Solon.AFTER_EXCEPTION_HANDLING) { |
There was a problem hiding this comment.
Why do you accept the error unprocessed? I think that is far away of the purpose of tracing. Error codes are important.
Sorry, something went wrong.
There was a problem hiding this comment.
I have no control over when the user handles exceptions
Sorry, something went wrong.
There was a problem hiding this comment.
My question is about this config. Why do we need this config?
Sorry, something went wrong.
There was a problem hiding this comment.
This configuration is where I need the user to tell me if he handled the exception, and if he did, I'll set up exception logging for him and use the status code after he handled it
Sorry, something went wrong.
There was a problem hiding this comment.
If you want to process that, why don't you create an interceptor for filter(s)? It should be easy too.
Sorry, something went wrong.
There was a problem hiding this comment.
I spoke with the solon author and he thinks that adding a filter customised for tracking doesn't make sense in the framework and that there should be plugins for that. But I want to make tracking available to users using solon without having to change any code.
Sorry, something went wrong.
Add plugin configuration and instructions
| # Define the max length of collected HTTP header. The default value(=0) means not collecting. | ||
| plugin.solon.http_headers_length_threshold=${SW_PLUGIN_SOLON_HTTP_HEADERS_LENGTH_THRESHOLD:0} |
There was a problem hiding this comment.
This config field doesn't exist in the codes. Why it is here?
Sorry, something went wrong.
| # It controls what header data should be collected, values must be in lower case, if empty, collect all. default is empty. | ||
| plugin.solon.include_http_headers=${SW_PLUGIN_SOLON_INCLUDE_HTTP_HEADERS:} |
There was a problem hiding this comment.
Again, you should not collect all headers. All collected things should be very specific.
Header usually carries auth token, this is auto collecting is dangerous and could cause sensitive data leak.
Sorry, something went wrong.
| # Intercept method name, default is invoke | ||
| plugin.solon.intercept_method_name=${SW_PLUGIN_SOLON_INTERCEPT_METHOD_NAME:invoke} |
There was a problem hiding this comment.
Inceptor method should not be defined by the configurations. This is a kind of config abuse.
Sorry, something went wrong.
| | `plugin.jedis.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Jedis agent. | SW_PLUGIN_JEDIS_TRACE_REDIS_PARAMETERS | `false` | | ||
| | `plugin.jedis.redis_parameter_max_length` | If set to positive number and `plugin.jedis.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length. | SW_PLUGIN_JEDIS_REDIS_PARAMETER_MAX_LENGTH | `128` | | ||
| | `plugin.jedis.operation_mapping_write` | Specify which command should be converted to `write` operation | SW_PLUGIN_JEDIS_OPERATION_MAPPING_WRITE | | | ||
| | property key | Description | **System Environment Variable** | Default | |
There was a problem hiding this comment.
You are changing the whole file? Please don't do this.
Sorry, something went wrong.
| /** | ||
| * intercept method name, default is invoke | ||
| */ | ||
| public static String INTERCEPT_METHOD_NAME = "invoke"; | ||
| /** | ||
| * is after exception handling, default is false, if true, the plugin will intercept the method after the exception handling | ||
| */ |
There was a problem hiding this comment.
These two don't make sense. And the comments are not helpful.
Even you are not good at English, there are many AI tools could help you polish that.
Sorry, something went wrong.
There was a problem hiding this comment.
Besides the comments, I am highly concerned about these two configurations. Please explain more clearly.
I never saw a framework plugin did this. The error code process should be very simple and straight forward.
Sorry, something went wrong.
Add plugin configuration and instructions
|
Please use v2 plugin APIs for better performance, and don't use runtime context to collaborate inside an interceptor. |
Sorry, something went wrong.
Modified to V2 version of the interceptor
Remove the code that collects all headers by default
| next = next.next(); | ||
| next.setHeadValue(ctx.header(next.getHeadKey())); | ||
| } | ||
| String operationName = "Solon:" + ctx.method() + ":" + ctx.path(); |
There was a problem hiding this comment.
| String operationName = "Solon:" + ctx.method() + ":" + ctx.path(); | |
| String operationName = ctx.method() + ":" + ctx.path(); |
The operation name of the span should be framework stack irrelevant. And you need to change test cases accordingly.
Sorry, something went wrong.
| if (SolonPluginConfig.Plugin.Solon.HTTP_HEADERS_LENGTH_THRESHOLD > 0 && headerStr.length() > SolonPluginConfig.Plugin.Solon.HTTP_HEADERS_LENGTH_THRESHOLD) { | ||
| headerStr = headerStr.substring(0, SolonPluginConfig.Plugin.Solon.HTTP_HEADERS_LENGTH_THRESHOLD); |
There was a problem hiding this comment.
You should control header by key list, because every key has a length limitation by HTTP. Once the number of keys is limited, we don't need to worry about overload.
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm, thanks for your patience.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add an agent plugin to support