You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by 吴晟 Sheng Wu <wu...@foxmail.com> on 2019/02/24 08:38:37 UTC
[Testing Require] Scope refactor done, waiting for reviews and tests.
Hi
Every contributors, especially for Peng, Gao, Jian Tan, Xin Zhang, my pull request[1] of this big refactor has submitted.
The purpose of this refactor is making the project extendibility better, for more new metric integrated.
My tests on ElasticSearch, H2 and MySQL are done and passed.
-----
The reason I am doing this refactoring is, making the extendibility OAP server better.
The core change is **REMOVING Scope enum type restrictions**. As we all known, Enum in Java could be inherited, when could anyone wants to create a new scope, the only choice only changes the source codes, include `enum Scope` and generation-tool.
So I am doing following changes
1. Make Scope(name-id) declaration as annotation, like this `@ScopeDeclaration(id = SERVICE, name = "Service")`. This annotation is Repeatable, so you could declare any new scope in any class in `org.apache.skywalking` package.
2. Scope enum removed.
3. Scope in `@StorageEntity` has been changed to `sourceScopeId`.
Also, I do some changes for OAL generation-tool.
1. Support the above changes.
2. Make `dispatcher template` extendable too. No need to add dispatcher template every time.
-----
Please do the review and tests, and give the feedback on the pull request.
[1] https://github.com/apache/incubator-skywalking/pull/2288
------------------
Sheng Wu
Apache SkyWalking, ShardingSphere, Zipkin
Twitter, wusheng1108