Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng merged PR #675:
URL: https://github.com/apache/skywalking-java/pull/675


-- 
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-unsubscr...@skywalking.apache.org

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



(skywalking-java) branch main updated: Support across thread tracing for SOFA-RPC (#675)

2024-03-24 Thread wusheng
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


The following commit(s) were added to refs/heads/main by this push:
 new a751e324f6 Support across thread tracing for SOFA-RPC (#675)
a751e324f6 is described below

commit a751e324f6669f5a1b0507d61b4fef020fe2b264
Author: 张呈熹 
AuthorDate: Mon Mar 25 10:53:40 2024 +0800

Support across thread tracing for SOFA-RPC (#675)
---
 CHANGES.md |   1 +
 .../apm/plugin/sofarpc/InvokeCallbackWrapper.java  |  88 +++
 .../sofarpc/SofaBoltCallbackInstrumentation.java   |  70 +
 .../sofarpc/SofaBoltCallbackInvokeInterceptor.java |  55 +++
 .../src/main/resources/skywalking-plugin.def   |   1 +
 .../plugin/sofarpc/InvokeCallbackWrapperTest.java  | 169 +
 .../SofaBoltCallbackInvokeInterceptorTest.java |  79 ++
 .../sofarpc/SofaRpcConsumerInterceptorTest.java|  40 +++--
 .../sofarpc/SofaRpcProviderInterceptorTest.java|  19 +--
 .../sofarpc-scenario/config/expectedData.yaml  |  48 ++
 .../apm/testcase/sofarpc/SofaRpcApplication.java   |  14 +-
 .../TestCallback.java} |  27 +++-
 .../sofarpc/controller/CaseController.java |  13 ++
 .../sofarpc/interfaces/SofaRpcDemoService.java |   2 +
 .../sofarpc/service/SofaRpcDemoServiceImpl.java|   5 +
 15 files changed, 600 insertions(+), 31 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 11dcc86166..5627ea6ad0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -18,6 +18,7 @@ Release Notes.
 * Archive the expired plugins `impala-jdbc-2.6.x-plugin`.
 * Fix a bug in Spring Cloud Gateway if HttpClientFinalizer#send does not 
invoke, the span created at NettyRoutingFilterInterceptor can not stop.
 * Fix not tracing in HttpClient v5 when HttpHost(arg[0]) is null but 
`RoutingSupport#determineHost` works.
+* Support across thread tracing for SOFA-RPC.
 
  Documentation
 * Update docs to describe `expired-plugins`.
diff --git 
a/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java
 
b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java
new file mode 100644
index 00..cf806cb592
--- /dev/null
+++ 
b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import lombok.AccessLevel;
+import lombok.Getter;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+@Getter(AccessLevel.PACKAGE)
+private ContextSnapshot contextSnapshot;
+@Getter(AccessLevel.PACKAGE)
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+contextSnapshot = null;
+ContextManager.stopSpan();
+}
+
+}
+
+@Override
+public void onException(final Throwable throwable) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() 

Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


OrezzerO commented on PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#issuecomment-2017084573

   > I tried to apply the change, but it seems not work.
   
   Missed `import lombok.AccessLevel;` statement;  added it.
   


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#issuecomment-2017069631

   I tried to apply the change, but it seems not work.


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536975126


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -20,13 +20,16 @@
 
 import com.alipay.remoting.InvokeCallback;
 import java.util.concurrent.Executor;
+import lombok.Getter;
 import org.apache.skywalking.apm.agent.core.context.ContextManager;
 import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
 import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
 
 public class InvokeCallbackWrapper implements InvokeCallback {
 
+@Getter

Review Comment:
   ```suggestion
   @Getter(AccessLevel.PACKAGE)
   ```



##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import lombok.Getter;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+@Getter
+private ContextSnapshot contextSnapshot;
+@Getter

Review Comment:
   ```suggestion
   @Getter(AccessLevel.PACKAGE)
   ```



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Supporting http headers collection for Gin [skywalking-go]

2024-03-24 Thread via GitHub


wu-sheng commented on PR #178:
URL: https://github.com/apache/skywalking-go/pull/178#issuecomment-2017054187

   There is nothing we can do about your network environment. And it is common 
for go dev, we don't add anything new.


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536969177


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -20,13 +20,16 @@
 
 import com.alipay.remoting.InvokeCallback;
 import java.util.concurrent.Executor;
+import lombok.Getter;
 import org.apache.skywalking.apm.agent.core.context.ContextManager;
 import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
 import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
 
 public class InvokeCallbackWrapper implements InvokeCallback {
 
+@Getter

Review Comment:
   I think you should keep it in the `default` scope? This getter is generating 
public method.



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


OrezzerO commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536964700


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;
+}
+
+}
+
+@Override
+public void onException(final Throwable throwable) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onException");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+if (throwable != null) {
+AbstractSpan abstractSpan = ContextManager.activeSpan();
+if (abstractSpan != null) {
+abstractSpan.log(throwable);
+}
+}
+try {
+invokeCallback.onException(throwable);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;
+}
+}
+
+@Override
+public Executor getExecutor() {
+return invokeCallback.getExecutor();
+}
+
+protected ContextSnapshot getContextSnapshot() {
+return contextSnapshot;
+}
+
+protected InvokeCallback getInvokeCallback() {
+return invokeCallback;
+}

Review Comment:
   Fixed it.



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Supporting http headers collection for Gin [skywalking-go]

2024-03-24 Thread via GitHub


IceSoda177 commented on PR #178:
URL: https://github.com/apache/skywalking-go/pull/178#issuecomment-2017041463

   > UT is just a small thing, it is not very useful in agent mode. We have 
specific plugin test, 
https://skywalking.apache.org/docs/skywalking-go/next/en/development-and-contribution/write-plugin-testing/
   > 
   > The existing one is at here, 
https://github.com/apache/skywalking-go/tree/main/test/plugins/scenarios/gin
   > 
   > You should enhance it, verify locally, and update.
   
   The wall is making me crazy...


-- 
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-unsubscr...@skywalking.apache.org

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



(skywalking-banyandb) 01/01: Add a cursor to sort index scan

2024-03-24 Thread hanahmily
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch sort
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit c9dbd96147c03c98a642df37efc9a93ded167741
Author: Gao Hongtao 
AuthorDate: Sun Mar 24 23:45:27 2024 +

Add a cursor to sort index scan

Signed-off-by: Gao Hongtao 
---
 banyand/stream/iter_builder.go  |  9 +--
 pkg/index/inverted/inverted.go  | 16 +++--
 pkg/index/inverted/sort.go  | 98 +
 pkg/iter/sort/sort.go   |  8 +--
 test/stress/trace/Makefile  | 11 +++-
 test/stress/trace/trace-duration/data.csv   | 29 +
 test/stress/trace/trace-duration/result.csv |  2 +
 test/stress/trace/trace_suite_test.go   |  1 -
 8 files changed, 153 insertions(+), 21 deletions(-)

diff --git a/banyand/stream/iter_builder.go b/banyand/stream/iter_builder.go
index 8c7a9d7b..f5363bce 100644
--- a/banyand/stream/iter_builder.go
+++ b/banyand/stream/iter_builder.go
@@ -94,14 +94,7 @@ func buildSeriesByIndex(s *iterBuilder) (series 
[]*searcherIterator, err error)
IndexRuleID: 
s.indexRuleForSorting.GetMetadata().GetId(),
Analyzer:s.indexRuleForSorting.GetAnalyzer(),
}
-   switch s.indexRuleForSorting.GetType() {
-   case databasev1.IndexRule_TYPE_TREE:
-   inner, err = tw.Table().Index().Iterator(fieldKey, 
rangeOpts, s.order)
-   case databasev1.IndexRule_TYPE_INVERTED:
-   inner, err = tw.Table().Index().Iterator(fieldKey, 
rangeOpts, s.order)
-   case databasev1.IndexRule_TYPE_UNSPECIFIED:
-   return nil, 
errors.WithMessagef(errUnspecifiedIndexType, "index rule:%v", 
s.indexRuleForSorting)
-   }
+   inner, err = tw.Table().Index().Iterator(fieldKey, rangeOpts, 
s.order)
if err != nil {
return nil, err
}
diff --git a/pkg/index/inverted/inverted.go b/pkg/index/inverted/inverted.go
index 9f4c6cc5..2dd0a887 100644
--- a/pkg/index/inverted/inverted.go
+++ b/pkg/index/inverted/inverted.go
@@ -206,12 +206,15 @@ func (s *store) Iterator(fieldKey index.FieldKey, 
termRange index.RangeOpts, ord
if order == modelv1.Sort_SORT_DESC {
sortedKey = "-" + sortedKey
}
-   documentMatchIterator, err := reader.Search(context.Background(), 
bluge.NewTopNSearch(math.MaxInt64, query).SortBy([]string{sortedKey}))
-   if err != nil {
-   return nil, multierr.Combine(err, reader.Close())
+   result := {
+   query:query,
+   reader:   reader,
+   sortedKey:sortedKey,
+   fk:   fk,
+   shouldDecodeTerm: shouldDecodeTerm,
+   size: 5,
}
-   result := newBlugeMatchIterator(documentMatchIterator, fk, 
shouldDecodeTerm, reader)
-   return , nil
+   return result, nil
 }
 
 func (s *store) MatchField(fieldKey index.FieldKey) (list posting.List, err 
error) {
@@ -520,5 +523,8 @@ func (bmi *blugeMatchIterator) Val() *index.PostingValue {
 
 func (bmi *blugeMatchIterator) Close() error {
bmi.closed = true
+   if bmi.closer == nil {
+   return bmi.err
+   }
return errors.Join(bmi.err, bmi.closer.Close())
 }
diff --git a/pkg/index/inverted/sort.go b/pkg/index/inverted/sort.go
new file mode 100644
index ..7aa3dfa5
--- /dev/null
+++ b/pkg/index/inverted/sort.go
@@ -0,0 +1,98 @@
+// Licensed to 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. Apache Software Foundation (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.
+
+// Package inverted implements a inverted index repository.
+package inverted
+
+import (
+   "context"
+   "errors"
+   "io"
+   "strings"
+
+   "github.com/apache/skywalking-banyandb/pkg/index"
+   "github.com/blugelabs/bluge"
+)
+
+type sortIterator struct {
+   querybluge.Query
+   reader   *bluge.Reader
+   sortedKeystring
+   fk   string
+   shouldDecodeTerm bool
+   

(skywalking-banyandb) branch sort created (now c9dbd961)

2024-03-24 Thread hanahmily
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a change to branch sort
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


  at c9dbd961 Add a cursor to sort index scan

This branch includes the following new commits:

 new c9dbd961 Add a cursor to sort index scan

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(skywalking-website) branch master updated: Release swck 0.9.0 (#695)

2024-03-24 Thread wusheng
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-website.git


The following commit(s) were added to refs/heads/master by this push:
 new 94d2995af8c Release swck 0.9.0 (#695)
94d2995af8c is described below

commit 94d2995af8c70d7f9b59e7f4897800e41beeb1a1
Author: Ye Cao 
AuthorDate: Sun Mar 24 22:53:09 2024 +0800

Release swck 0.9.0 (#695)
---
 .../index.md   | 24 ++
 data/docs.yml  |  6 +++---
 data/releases.yml  | 20 +-
 3 files changed, 37 insertions(+), 13 deletions(-)

diff --git 
a/content/events/release-apache-skywalking-cloud-on-kubernetes-0-9-0/index.md 
b/content/events/release-apache-skywalking-cloud-on-kubernetes-0-9-0/index.md
new file mode 100644
index 000..55223ac9c2e
--- /dev/null
+++ 
b/content/events/release-apache-skywalking-cloud-on-kubernetes-0-9-0/index.md
@@ -0,0 +1,24 @@
+---
+title: Release Apache SkyWalking Cloud on Kubernetes 0.9.0
+date: 2024-03-24
+author: SkyWalking Team
+description: "Release Apache SkyWalking Cloud on Kubernetes 0.9.0"
+---
+
+SkyWalking Cloud on Kubernetes 0.9.0 is released. Go to 
[downloads](https://skywalking.apache.org/downloads) page to find release tars.
+
+0.9.0
+--
+
+### Features
+- Add a getting started document about how to deploy swck on the kubernetes 
cluster.
+
+### Bugs
+
+- Fix the bug that the java agent is duplicated injected when update the pod.
+
+### Chores
+
+- Bump up custom-metrics-apiserver
+- Bump up golang to v1.22
+- Bump up controller-gen to v0.14.0
diff --git a/data/docs.yml b/data/docs.yml
index 5ec31a46cba..9371e3e523c 100644
--- a/data/docs.yml
+++ b/data/docs.yml
@@ -290,9 +290,9 @@
 - version: Latest
   link: /docs/skywalking-swck/latest/readme/
   commitId: 502610b1cc71940cb36107ec335bd47aa829a781
-- version: v0.8.0
-  link: /docs/skywalking-swck/v0.8.0/readme/
-  commitId: 502610b1cc71940cb36107ec335bd47aa829a781
+- version: v0.9.0
+  link: /docs/skywalking-swck/v0.9.0/readme/
+  commitId: 77a22047a37e974b7a12535f9d3b7667261c3a7a
 
 
 - type: Protocol
diff --git a/data/releases.yml b/data/releases.yml
index c68b1e6e118..84bf72b258a 100644
--- a/data/releases.yml
+++ b/data/releases.yml
@@ -561,25 +561,25 @@
   icon: kubernetes
   description: A bridge project between Apache SkyWalking and Kubernetes.
   source:
-- version: v0.8.0
-  date: Aug. 1st, 2023
+- version: v0.9.0
+  date: Mar. 4th, 2024
   downloadLink:
 - name: src
-  link: 
https://www.apache.org/dyn/closer.cgi/skywalking/swck/0.8.0/skywalking-swck-0.8.0-src.tgz
+  link: 
https://www.apache.org/dyn/closer.cgi/skywalking/swck/0.9.0/skywalking-swck-0.9.0-src.tgz
 - name: asc
-  link: 
https://downloads.apache.org/skywalking/swck/0.8.0/skywalking-swck-0.8.0-src.tgz.asc
+  link: 
https://downloads.apache.org/skywalking/swck/0.9.0/skywalking-swck-0.9.0-src.tgz.asc
 - name: sha512
-  link: 
https://downloads.apache.org/skywalking/swck/0.8.0/skywalking-swck-0.8.0-src.tgz.sha512
+  link: 
https://downloads.apache.org/skywalking/swck/0.9.0/skywalking-swck-0.9.0-src.tgz.sha512
   distribution:
-- version: v0.8.0
-  date: Aug. 1st, 2023
+- version: v0.9.0
+  date: Mar. 4th, 2024
   downloadLink:
 - name: tar
-  link: 
https://www.apache.org/dyn/closer.cgi/skywalking/swck/0.8.0/skywalking-swck-0.8.0-bin.tgz
+  link: 
https://www.apache.org/dyn/closer.cgi/skywalking/swck/0.9.0/skywalking-swck-0.9.0-bin.tgz
 - name: asc
-  link: 
https://downloads.apache.org/skywalking/swck/0.8.0/skywalking-swck-0.8.0-bin.tgz.asc
+  link: 
https://downloads.apache.org/skywalking/swck/0.9.0/skywalking-swck-0.9.0-bin.tgz.asc
 - name: sha512
-  link: 
https://downloads.apache.org/skywalking/swck/0.8.0/skywalking-swck-0.8.0-bin.tgz.sha512
+  link: 
https://downloads.apache.org/skywalking/swck/0.9.0/skywalking-swck-0.9.0-bin.tgz.sha512
 
 - type: Database
   description:



Re: [PR] Release swck 0.9.0 [skywalking-website]

2024-03-24 Thread via GitHub


wu-sheng merged PR #695:
URL: https://github.com/apache/skywalking-website/pull/695


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Release swck 0.9.0 [skywalking-website]

2024-03-24 Thread via GitHub


netlify[bot] commented on PR #695:
URL: 
https://github.com/apache/skywalking-website/pull/695#issuecomment-2016834249

   ###  Deploy Preview for 
*skywalking-website-preview* processing.
   
   
   |  Name | Link |
   |:-:||
   | Latest commit | 
6ed8e58026100f19ff3dd11c6758562bc2e5f794 |
   | Latest deploy log | 
https://app.netlify.com/sites/skywalking-website-preview/deploys/66003def4afd460008e5c25f
 |


-- 
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-unsubscr...@skywalking.apache.org

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



[PR] Release swck 0.9.0 [skywalking-website]

2024-03-24 Thread via GitHub


dashanji opened a new pull request, #695:
URL: https://github.com/apache/skywalking-website/pull/695

   As titled.


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#issuecomment-2016788534

   Generally, this PR is good, just some nits. Please fix them, then it is good 
to merge.


-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536799607


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;

Review Comment:
   ```suggestion
   contextSnapshot = null;
   ContextManager.stopSpan();
   ```



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536799816


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;
+}
+
+}
+
+@Override
+public void onException(final Throwable throwable) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onException");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+if (throwable != null) {
+AbstractSpan abstractSpan = ContextManager.activeSpan();
+if (abstractSpan != null) {
+abstractSpan.log(throwable);
+}
+}
+try {
+invokeCallback.onException(throwable);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;
+}
+}
+
+@Override
+public Executor getExecutor() {
+return invokeCallback.getExecutor();
+}
+
+protected ContextSnapshot getContextSnapshot() {
+return contextSnapshot;
+}
+
+protected InvokeCallback getInvokeCallback() {
+return invokeCallback;
+}

Review Comment:
   These could be replaced by annotations.



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536799757


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;
+}
+
+}
+
+@Override
+public void onException(final Throwable throwable) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onException");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+if (throwable != null) {
+AbstractSpan abstractSpan = ContextManager.activeSpan();
+if (abstractSpan != null) {
+abstractSpan.log(throwable);
+}
+}
+try {
+invokeCallback.onException(throwable);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;

Review Comment:
   ```suggestion
   contextSnapshot = null;
   ContextManager.stopSpan();
   ```



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536799707


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+
+}
+
+@Override
+public void onResponse(final Object o) {
+ContextManager.createLocalSpan("Thread/" + 
invokeCallback.getClass().getName() + "/onResponse");
+if (contextSnapshot != null) {
+ContextManager.continued(contextSnapshot);
+}
+try {
+invokeCallback.onResponse(o);
+} catch (Throwable t) {
+ContextManager.activeSpan().log(t);
+throw t;
+} finally {
+ContextManager.stopSpan();
+contextSnapshot = null;

Review Comment:
   `contextSnapshot = null` is 100% safe operation. The `stop Span` could throw 
exceptions. 



-- 
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-unsubscr...@skywalking.apache.org

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



Re: [PR] Support across thread tracing for SOFA-RPC [skywalking-java]

2024-03-24 Thread via GitHub


wu-sheng commented on code in PR #675:
URL: https://github.com/apache/skywalking-java/pull/675#discussion_r1536799488


##
apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/InvokeCallbackWrapper.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.sofarpc;
+
+import com.alipay.remoting.InvokeCallback;
+import java.util.concurrent.Executor;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.ContextSnapshot;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+
+public class InvokeCallbackWrapper implements InvokeCallback {
+
+private ContextSnapshot contextSnapshot;
+private final InvokeCallback invokeCallback;
+
+public InvokeCallbackWrapper(InvokeCallback invokeCallback) {
+if (ContextManager.isActive()) {
+this.contextSnapshot = ContextManager.capture();
+}
+this.invokeCallback = invokeCallback;
+

Review Comment:
   ```suggestion
   ```



-- 
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-unsubscr...@skywalking.apache.org

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