You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "mrproliu (via GitHub)" <gi...@apache.org> on 2023/05/15 10:55:13 UTC

[GitHub] [skywalking-go] mrproliu opened a new pull request, #39: Support plugin exclusion mechanism

mrproliu opened a new pull request, #39:
URL: https://github.com/apache/skywalking-go/pull/39

   (no comment)


-- 
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-go] wu-sheng commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193860124


##########
test/plugins/scenarios/plugin_exclusion/config/excepted.yml:
##########
@@ -0,0 +1,73 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+segmentItems:
+  - serviceName: plugin_exclusion
+    segmentSize: ge 3
+    segments:
+      - segmentId: not null
+        spans:
+          - operationName: GET:/health

Review Comment:
   I think usually we don't check `/health` in Java practice.



-- 
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-go] wu-sheng commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193698531


##########
docs/en/advanced-features/plugin-exclusion.md:
##########
@@ -0,0 +1,11 @@
+# Plugin Exclusion
+
+The plugin exclusion is used during the **compilation phase** to prevent certain plugins, as specified by their names, 
+from being included in the compilation. Consequently, these excluded plugins will not generate corresponding data when the program is running, such as **Tracing**.

Review Comment:
   ```suggestion
   The plugin exclusion is used during the **compilation phase** to exclude specific plugins, through their names.
   Consequently, the codes of these excluded plugins will not be weaved in, then, no relative tracing and metrics.
   ```



-- 
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-go] wu-sheng merged pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #39:
URL: https://github.com/apache/skywalking-go/pull/39


-- 
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-go] mrproliu commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193704913


##########
docs/en/advanced-features/plugin-exclusion.md:
##########
@@ -0,0 +1,19 @@
+# Plugin Exclusion
+
+The plugin exclusion is used during the **compilation phase** to exclude specific plugins, through their names.
+Consequently, the codes of these excluded plugins will not be weaved in, then, no relative tracing and metrics.
+
+## Configuration
+
+
+```yaml
+plugin:
+  # List the names of excluded plugins, multiple plugin names should be splitted by ","
+  # NOTE: This parameter only takes effect during the compilation phase.
+  excluded: ${SW_AGENT_PLUGIN_EXCLUDES:}

Review Comment:
   fixed. 



-- 
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-go] wu-sheng commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193696827


##########
docs/en/advanced-features/plugin-exclusion.md:
##########
@@ -0,0 +1,11 @@
+# Plugin Exclusion
+
+The plugin exclusion is used during the **compilation phase** to prevent certain plugins, as specified by their names, 

Review Comment:
   ```suggestion
   The plugin exclusion is used during the **compilation phase** to exclude specific plugins, through their names, 
   ```



-- 
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-go] mrproliu commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1194471596


##########
test/plugins/scenarios/plugin_exclusion/config/excepted.yml:
##########
@@ -0,0 +1,73 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+segmentItems:
+  - serviceName: plugin_exclusion
+    segmentSize: ge 3
+    segments:
+      - segmentId: not null
+        spans:
+          - operationName: GET:/health

Review Comment:
   I have deleted it in all plugin test cases.



##########
test/plugins/scenarios/plugin_exclusion/config/excepted.yml:
##########
@@ -0,0 +1,73 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+segmentItems:
+  - serviceName: plugin_exclusion
+    segmentSize: ge 3
+    segments:
+      - segmentId: not null
+        spans:
+          - operationName: GET:/health
+            parentSpanId: -1
+            spanId: 0
+            spanLayer: Http
+            startTime: nq 0
+            endTime: nq 0
+            componentId: 5006
+            isError: false
+            spanType: Entry
+            peer: ''
+            skipAnalysis: false
+            tags:
+              - {key: http.method, value: GET}
+              - {key: url, value: 'service:8080/health'}
+              - {key: status_code, value: '200'}
+      - segmentId: not null
+        spans:
+          - operationName: GET:/provider
+            parentSpanId: -1
+            spanId: 0

Review Comment:
   updated.



-- 
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-go] wu-sheng commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193702672


##########
docs/en/advanced-features/plugin-exclusion.md:
##########
@@ -0,0 +1,19 @@
+# Plugin Exclusion
+
+The plugin exclusion is used during the **compilation phase** to exclude specific plugins, through their names.
+Consequently, the codes of these excluded plugins will not be weaved in, then, no relative tracing and metrics.
+
+## Configuration
+
+
+```yaml
+plugin:
+  # List the names of excluded plugins, multiple plugin names should be splitted by ","
+  # NOTE: This parameter only takes effect during the compilation phase.
+  excluded: ${SW_AGENT_PLUGIN_EXCLUDES:}

Review Comment:
   @liuhaoyang I added this, and update the config name(excludes -> excluded), as well as comments. Please update code accordingly.



##########
docs/en/advanced-features/plugin-exclusion.md:
##########
@@ -0,0 +1,19 @@
+# Plugin Exclusion
+
+The plugin exclusion is used during the **compilation phase** to exclude specific plugins, through their names.
+Consequently, the codes of these excluded plugins will not be weaved in, then, no relative tracing and metrics.
+
+## Configuration
+
+
+```yaml
+plugin:
+  # List the names of excluded plugins, multiple plugin names should be splitted by ","
+  # NOTE: This parameter only takes effect during the compilation phase.
+  excluded: ${SW_AGENT_PLUGIN_EXCLUDES:}

Review Comment:
   @mrproliu  I added this, and update the config name(excludes -> excluded), as well as comments. Please update code accordingly.



-- 
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-go] wu-sheng commented on pull request #39: Support plugin exclusion mechanism

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

   Should we have a plugin test for this? Such as Gin + Dubbo case, but only Gin spans are detected? Could you verify if is that possible and verified correctly?
   About `verified correctly`, I mean, if excluded mechanism doesn't work properly, the gin + dubbo segment could trigger the test failing.


-- 
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-go] mrproliu commented on pull request #39: Support plugin exclusion mechanism

Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#issuecomment-1547693479

   Sure, I could add a plugin test for the plugin exclusion mechanism. HTTP and Gin as one test case, if ignore the HTTP framework, It should only have the Gin(server) (entry)span.  


-- 
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-go] wu-sheng commented on a diff in pull request #39: Support plugin exclusion mechanism

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #39:
URL: https://github.com/apache/skywalking-go/pull/39#discussion_r1193861812


##########
test/plugins/scenarios/plugin_exclusion/config/excepted.yml:
##########
@@ -0,0 +1,73 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+segmentItems:
+  - serviceName: plugin_exclusion
+    segmentSize: ge 3
+    segments:
+      - segmentId: not null
+        spans:
+          - operationName: GET:/health
+            parentSpanId: -1
+            spanId: 0
+            spanLayer: Http
+            startTime: nq 0
+            endTime: nq 0
+            componentId: 5006
+            isError: false
+            spanType: Entry
+            peer: ''
+            skipAnalysis: false
+            tags:
+              - {key: http.method, value: GET}
+              - {key: url, value: 'service:8080/health'}
+              - {key: status_code, value: '200'}
+      - segmentId: not null
+        spans:
+          - operationName: GET:/provider
+            parentSpanId: -1
+            spanId: 0

Review Comment:
   I think we should indicate `ref` is null here to avoid the client doesn't propagate anything?



-- 
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