You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/15 01:48:30 UTC

[GitHub] [skywalking] fgksgf opened a new pull request, #8881: Add layer field to event

fgksgf opened a new pull request, #8881:
URL: https://github.com/apache/skywalking/pull/8881

   <!--
       ⚠️ Please make sure to read this template first, pull requests that don't accord with this template
       maybe closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
   ### Fix <bug description or the bug issue number or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly why the bug exists and how to fix it.
        ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->
   
   <!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
        ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->
   
   <!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
        ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Related #8825.
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/changelog/docs/en/changes/changes.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] sonatype-lift[bot] commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852621006


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   I've recorded this as ignored for this pull request. If you change your mind, just comment `@sonatype-lift unignore`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] fgksgf merged pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
fgksgf merged PR #8881:
URL: https://github.com/apache/skywalking/pull/8881


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] sonatype-lift[bot] commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852574951


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   *ShellCheck:*  Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
   
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=193494122&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=193494122&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=193494122&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=193494122&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=193494122&lift_comment_rating=5) ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] fgksgf commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
fgksgf commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852621400


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   ignore



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852657675


##########
oap-server/server-receiver-plugin/skywalking-event-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/event/rest/EventRestServiceHandler.java:
##########
@@ -41,27 +44,35 @@ public class EventRestServiceHandler {
 
     public EventRestServiceHandler(final ModuleManager manager) {
         final MetricsCreator metricsCreator = manager.find(TelemetryModule.NAME)
-                                                     .provider()
-                                                     .getService(MetricsCreator.class);
+                .provider()
+                .getService(MetricsCreator.class);
 
         eventAnalyzerService = manager.find(EventAnalyzerModule.NAME)
-                                      .provider()
-                                      .getService(EventAnalyzerService.class);
+                .provider()
+                .getService(EventAnalyzerService.class);
 
         histogram = metricsCreator.createHistogramMetric(
-            "event_in_latency", "The process latency of event data",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_in_latency", "The process latency of event data",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );
         errorCounter = metricsCreator.createCounter(
-            "event_error_count", "The error number of event analysis",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_error_count", "The error number of event analysis",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );

Review Comment:
   I think only `second format` would change this, at least my IDEA acts in this way.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] fgksgf commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
fgksgf commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852614880


##########
docs/en/changes/changes.md:
##########
@@ -19,6 +19,7 @@
 * Fix OAP Self-Observability metric `GC Time` calculation.
 * Set `SW_QUERY_MAX_QUERY_COMPLEXITY` default value to `1000`
 * Webapp module (for UI) enabled compression.
+* [Breaking Change] Add layer field to event, report an event without layer will not be allowed.

Review Comment:
   make sense to me



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] fgksgf commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
fgksgf commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852652442


##########
oap-server/server-receiver-plugin/skywalking-event-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/event/rest/EventRestServiceHandler.java:
##########
@@ -41,27 +44,35 @@ public class EventRestServiceHandler {
 
     public EventRestServiceHandler(final ModuleManager manager) {
         final MetricsCreator metricsCreator = manager.find(TelemetryModule.NAME)
-                                                     .provider()
-                                                     .getService(MetricsCreator.class);
+                .provider()
+                .getService(MetricsCreator.class);
 
         eventAnalyzerService = manager.find(EventAnalyzerModule.NAME)
-                                      .provider()
-                                      .getService(EventAnalyzerService.class);
+                .provider()
+                .getService(EventAnalyzerService.class);
 
         histogram = metricsCreator.createHistogramMetric(
-            "event_in_latency", "The process latency of event data",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_in_latency", "The process latency of event data",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );
         errorCounter = metricsCreator.createCounter(
-            "event_error_count", "The error number of event analysis",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_error_count", "The error number of event analysis",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );

Review Comment:
   Ok, it seems IDEA formats it automatically.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] sonatype-lift[bot] commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852621439


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   I've recorded this as ignored for this pull request. If you change your mind, just comment `@sonatype-lift unignore`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852651186


##########
oap-server/server-receiver-plugin/skywalking-event-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/event/rest/EventRestServiceHandler.java:
##########
@@ -41,27 +44,35 @@ public class EventRestServiceHandler {
 
     public EventRestServiceHandler(final ModuleManager manager) {
         final MetricsCreator metricsCreator = manager.find(TelemetryModule.NAME)
-                                                     .provider()
-                                                     .getService(MetricsCreator.class);
+                .provider()
+                .getService(MetricsCreator.class);
 
         eventAnalyzerService = manager.find(EventAnalyzerModule.NAME)
-                                      .provider()
-                                      .getService(EventAnalyzerService.class);
+                .provider()
+                .getService(EventAnalyzerService.class);
 
         histogram = metricsCreator.createHistogramMetric(
-            "event_in_latency", "The process latency of event data",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_in_latency", "The process latency of event data",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );
         errorCounter = metricsCreator.createCounter(
-            "event_error_count", "The error number of event analysis",
-            new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
+                "event_error_count", "The error number of event analysis",
+                new MetricsTag.Keys("protocol"), new MetricsTag.Values("http")
         );

Review Comment:
   Consider reverting these re-formats?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add layer field to event [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#issuecomment-1763945501

   @fgksgf This PR brings some issues to the codebase. @wankai123 fixed them through https://github.com/apache/skywalking/pull/11413


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#issuecomment-1100007231

   Please fix the CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852602048


##########
docs/en/changes/changes.md:
##########
@@ -19,6 +19,7 @@
 * Fix OAP Self-Observability metric `GC Time` calculation.
 * Set `SW_QUERY_MAX_QUERY_COMPLEXITY` default value to `1000`
 * Webapp module (for UI) enabled compression.
+* [Breaking Change] Add layer field to event, report an event without layer will not be allowed.

Review Comment:
   ```suggestion
   * [Breaking Change] Add layer field to event, report an event without layer is be allowed.
   ```
    Future tense in the change log is strange.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] sonatype-lift[bot] commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852574372


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   *ShellCheck:*  Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
   
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=5) ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] fgksgf commented on a diff in pull request #8881: Add layer field to event

Posted by GitBox <gi...@apache.org>.
fgksgf commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852620978


##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
 BASE_DIR=$1
 BIN_DIR=$2
 
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
   mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
   curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
   tar -zxf skywalking-cli.tar.gz --strip=1
-  make install DESTDIR=$BIN_DIR
+  VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+  echo "swctl is not installed"
+  install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then

Review Comment:
   ignore



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org