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/11/01 06:15:38 UTC

[GitHub] [skywalking-rover] mrproliu opened a new pull request, #57: Support upload slow trace

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

   Following https://github.com/apache/skywalking/issues/9802, Support uploads the slow request with tracing context. 


-- 
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-rover] wu-sheng commented on pull request #57: Support upload slow trace

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

   One question, what are we left for the HTTP content sampling in profiling?
   
   We have
   - [x] HTTP/1 topology
   - [x] HTTP/1 metrics for topology lines and edges
   - [x] Slow trace sampling in this PR.
   
   I think we don't have attachedEvent for span yet. What do I miss?
   
   
   


-- 
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-rover] wu-sheng commented on pull request #57: Support upload slow trace

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

   Please update the relative network profiling documents. 


-- 
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-rover] mrproliu merged pull request #57: Support upload slow trace

Posted by GitBox <gi...@apache.org>.
mrproliu merged PR #57:
URL: https://github.com/apache/skywalking-rover/pull/57


-- 
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-rover] wu-sheng commented on a diff in pull request #57: Support upload slow trace

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


##########
pkg/profiling/task/network/analyze/layer7/protocols/tracing.go:
##########
@@ -0,0 +1,111 @@
+// 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 protocols
+
+import (
+	"encoding/base64"
+	"fmt"
+	"strings"
+)
+
+type TracingContext interface {
+	TraceID() string
+	Provider() string
+}
+
+type SkyWalkingTracingContext struct {
+	TraceID0              string
+	SegmentID             string
+	SpanID                string
+	ParentService         string
+	ParentServiceInstance string
+	ParentEndpoint        string
+	AddressUsedAtClient   string
+}
+
+type ZipkinTracingContext struct {
+	TraceID0 string
+	SpanID   string
+}
+
+func (w *SkyWalkingTracingContext) TraceID() string {
+	return w.TraceID0
+}
+
+func (w *SkyWalkingTracingContext) Provider() string {
+	return "skywalking"
+}
+
+func AnalyzeTracingContext(fetcher func(key string) string) (TracingContext, error) {
+	// skywalking v3
+	if sw8Header := fetcher("sw8"); sw8Header != "" {
+		return analyzeSkyWalking8TracingContext(sw8Header)
+	}
+
+	// zipkin
+	if zipkinTraceID := fetcher("x-b3-traceid"); zipkinTraceID != "" {
+		if spanID := fetcher("x-b3-spanid"); spanID != "" {
+			return analyzeZipkinTracingContext(zipkinTraceID, spanID), nil
+		}
+	}
+	return nil, nil

Review Comment:
   I remember there is another `b3` header format of Zipkin. Could you check?



-- 
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-rover] wu-sheng commented on pull request #57: Support upload slow trace

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

   > After the attached events for the span are implemented, I will extend the L2-L4 event for the tracing span.
   
   OK, once this is done, ebpf relative features in 9.3.0 milestone should be ready, right? Including rover side.


-- 
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-rover] mrproliu commented on pull request #57: Support upload slow trace

Posted by GitBox <gi...@apache.org>.
mrproliu commented on PR #57:
URL: https://github.com/apache/skywalking-rover/pull/57#issuecomment-1298107280

   > > After the attached events for the span are implemented, I will extend the L2-L4 event for the tracing span.
   > 
   > OK, once this is done, ebpf relative features in 9.3.0 milestone should be ready, right? Including rover side.
   
   Yes. The rover side could analyze the HTTP1 metrics, slow traces, and extend the tracing context. The OAP side could set up a new dashboard for HTTP1 in network profiling and query the attached event on the tracing page. 


-- 
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-rover] wu-sheng commented on a diff in pull request #57: Support upload slow trace

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


##########
pkg/profiling/task/network/analyze/layer7/protocols/tracing.go:
##########
@@ -0,0 +1,111 @@
+// 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 protocols
+
+import (
+	"encoding/base64"
+	"fmt"
+	"strings"
+)
+
+type TracingContext interface {
+	TraceID() string
+	Provider() string
+}
+
+type SkyWalkingTracingContext struct {
+	TraceID0              string
+	SegmentID             string
+	SpanID                string
+	ParentService         string
+	ParentServiceInstance string
+	ParentEndpoint        string
+	AddressUsedAtClient   string
+}
+
+type ZipkinTracingContext struct {
+	TraceID0 string
+	SpanID   string
+}
+
+func (w *SkyWalkingTracingContext) TraceID() string {
+	return w.TraceID0
+}
+
+func (w *SkyWalkingTracingContext) Provider() string {
+	return "skywalking"
+}
+
+func AnalyzeTracingContext(fetcher func(key string) string) (TracingContext, error) {
+	// skywalking v3
+	if sw8Header := fetcher("sw8"); sw8Header != "" {
+		return analyzeSkyWalking8TracingContext(sw8Header)
+	}
+
+	// zipkin
+	if zipkinTraceID := fetcher("x-b3-traceid"); zipkinTraceID != "" {
+		if spanID := fetcher("x-b3-spanid"); spanID != "" {
+			return analyzeZipkinTracingContext(zipkinTraceID, spanID), nil
+		}
+	}
+	return nil, nil

Review Comment:
   Check here, https://github.com/openzipkin/b3-propagation#single-header



-- 
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-rover] wu-sheng commented on a diff in pull request #57: Support upload slow trace

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


##########
pkg/profiling/task/network/analyze/layer7/protocols/tracing.go:
##########
@@ -0,0 +1,111 @@
+// 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 protocols
+
+import (
+	"encoding/base64"
+	"fmt"
+	"strings"
+)
+
+type TracingContext interface {
+	TraceID() string
+	Provider() string
+}
+
+type SkyWalkingTracingContext struct {
+	TraceID0              string
+	SegmentID             string
+	SpanID                string
+	ParentService         string
+	ParentServiceInstance string
+	ParentEndpoint        string
+	AddressUsedAtClient   string
+}
+
+type ZipkinTracingContext struct {
+	TraceID0 string
+	SpanID   string
+}
+
+func (w *SkyWalkingTracingContext) TraceID() string {
+	return w.TraceID0
+}
+
+func (w *SkyWalkingTracingContext) Provider() string {
+	return "skywalking"
+}
+
+func AnalyzeTracingContext(fetcher func(key string) string) (TracingContext, error) {
+	// skywalking v3
+	if sw8Header := fetcher("sw8"); sw8Header != "" {
+		return analyzeSkyWalking8TracingContext(sw8Header)
+	}
+
+	// zipkin
+	if zipkinTraceID := fetcher("x-b3-traceid"); zipkinTraceID != "" {
+		if spanID := fetcher("x-b3-spanid"); spanID != "" {
+			return analyzeZipkinTracingContext(zipkinTraceID, spanID), nil
+		}
+	}
+	return nil, nil

Review Comment:
   Both two should be legal.



-- 
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-rover] mrproliu commented on pull request #57: Support upload slow trace

Posted by GitBox <gi...@apache.org>.
mrproliu commented on PR #57:
URL: https://github.com/apache/skywalking-rover/pull/57#issuecomment-1298099766

   Nothing is missing. 
   For the HTTP1 analysis, we now have HTTP1 metrics and top sampled slow traces. but we cannot query the full HTTP content with tracing context(the attached event for the span is not implemented).
   After the attached events for the span are implemented, I will extend the L2-L4 event for the tracing 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