You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/12 13:12:02 UTC

[GitHub] [dubbo-go-pixiu] LvBay opened a new pull request #236: [Ftr] tracing

LvBay opened a new pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:Support jaeger tracing
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: traing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r684608592



##########
File path: pkg/context/http/util.go
##########
@@ -84,3 +88,31 @@ func HttpRouteActionMatch(c *HttpContext, ra model.RouteAction) bool {
 
 	return true
 }
+
+// 将request.body写入到span中,并重新放回去
+func ExtractRequestBody(req *http.Request) []byte {
+	isUpload := isUpload(req)
+	if isUpload {
+		return nil
+	}
+	body, err := ioutil.ReadAll(req.Body)
+	if err != nil {
+		return nil
+	}
+	req.Body = ioutil.NopCloser(bytes.NewBuffer(body))
+	return body
+}
+
+// 是否为文件上传 upload方法
+func isUpload(req *http.Request) bool {
+	isUpload := false

Review comment:
       var isUpload bool 就可以了。其默认值就是 false




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r705817766



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,147 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+)
+
+import (
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension/filter"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger    = "jaeger"
+	traceName             = "http-server"
+	spanNamePrefix        = "HTTP SERVER"
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func init() {
+	filter.RegisterHttpFilter(&Plugin{})
+}
+
+// tracerFilter is a filter for tracer
+type Plugin struct {
+}
+
+type TraceFilter struct {
+}
+
+func (ap *Plugin) Kind() string {
+	return constant.TracingFilter
+}
+
+func (ap *Plugin) CreateFilter() (filter.HttpFilter, error) {
+	New()
+	return &TraceFilter{}, nil
+}
+
+func (m *TraceFilter) Config() interface{} {
+	return nil
+}
+
+func (m *TraceFilter) Apply() error {
+	// init
+	New()
+	return nil
+}
+
+func (mf *TraceFilter) PrepareFilterChain(ctx *contexthttp.HttpContext) error {
+	ctx.AppendFilterFunc(mf.Handle)
+	return nil
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() TraceFilter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+		return TraceFilter{}
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return TraceFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f TraceFilter) Handle(hc *contexthttp.HttpContext) {
+	spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path

Review comment:
       一般情况下在网关层spanName直接到method就可以了,不需要把url path作为spanName。这是一个会无限膨胀的字段,会给后期聚合带来非常大的困难。




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] ztelur commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
ztelur commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r686816413



##########
File path: pkg/client/dubbo/dubbo.go
##########
@@ -22,20 +22,20 @@ import (
 	"strings"
 	"sync"
 	"time"
-)
 
-import (
+	"go.opentelemetry.io/otel/trace"
+
 	"github.com/apache/dubbo-go/common/constant"
 	dg "github.com/apache/dubbo-go/config"
 	"github.com/apache/dubbo-go/protocol/dubbo"
-	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/api/config"
-	"github.com/pkg/errors"
-)
+	"go.opentelemetry.io/otel"

Review comment:
       we can use tool like this https://github.com/apache/dubbo-go/pull/1346 later




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] ztelur commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
ztelur commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r686814057



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,120 @@
+package tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))
+		hc.Request = hc.Request.WithContext(ctxWithTid)
+		hc.Next()
+		span.End()

Review comment:
       oh, my fault 




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] ztelur commented on a change in pull request #236: traing

Posted by GitBox <gi...@apache.org>.
ztelur commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r684158020



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,120 @@
+package tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))
+		hc.Request = hc.Request.WithContext(ctxWithTid)
+		hc.Next()
+		span.End()

Review comment:
       immediately end span ?

##########
File path: pkg/client/dubbo/dubbo.go
##########
@@ -22,20 +22,20 @@ import (
 	"strings"
 	"sync"
 	"time"
-)
 
-import (
+	"go.opentelemetry.io/otel/trace"
+
 	"github.com/apache/dubbo-go/common/constant"
 	dg "github.com/apache/dubbo-go/config"
 	"github.com/apache/dubbo-go/protocol/dubbo"
-	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/api/config"
-	"github.com/pkg/errors"
-)
+	"go.opentelemetry.io/otel"

Review comment:
       pls split this import block into three part:
   - first block contains all Go build-in package;
   - second block contains third party package;
   - third block contains package in project




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c9d8c8) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/fa7d18a443acf52f6786e0f2f3629f7e989807a0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa7d18a) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fa7d18a...1c9d8c8](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] cityiron commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
cityiron commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699847138



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       I agree.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] LvBay commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
LvBay commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r700702284



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       那就不记录body了~




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks merged pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9b2a1d9) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/f1836e0f942b7f978db9af17c8cbeea9d88f106f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f1836e0) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f1836e0...9b2a1d9](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: traing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r684608469



##########
File path: pkg/context/http/util.go
##########
@@ -84,3 +88,31 @@ func HttpRouteActionMatch(c *HttpContext, ra model.RouteAction) bool {
 
 	return true
 }
+
+// 将request.body写入到span中,并重新放回去

Review comment:
       agree with u




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c9d8c8) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/fa7d18a443acf52f6786e0f2f3629f7e989807a0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa7d18a) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fa7d18a...1c9d8c8](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699294867



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       我个人觉得没必要去记录请求body 存储比较消耗资源了 也属于比较敏感的数据




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] LvBay commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
LvBay commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r685970689



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,120 @@
+package tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))
+		hc.Request = hc.Request.WithContext(ctxWithTid)
+		hc.Next()
+		span.End()

Review comment:
       先执行hc.Next(),再span.End()




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699227264



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"

Review comment:
       split 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-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699294867



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       我个人觉得没必要去记录请求body 存储比较消耗资源了 也属于比较敏感的数据




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699227264



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"

Review comment:
       split 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-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e3b8d64) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/1052eaab1f774db0b828b18e130dabd59c6db72d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1052eaa) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.18%   39.65%   -0.54%     
   ===========================================
     Files           50       50              
     Lines         2541     2575      +34     
   ===========================================
     Hits          1021     1021              
   - Misses        1410     1444      +34     
     Partials       110      110              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1052eaa...e3b8d64](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r705818820



##########
File path: pkg/context/http/util.go
##########
@@ -60,3 +64,31 @@ func HttpRouteActionMatch(c *HttpContext, ra model.RouteAction) bool {
 
 	return true
 }
+
+// ExtractRequestBody extract body of http request
+func ExtractRequestBody(req *http.Request) []byte {

Review comment:
       我还是建议不要采集body了,如果这是个上传文件的请求,或是敏感请求,不是很合适




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: traing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r684608518



##########
File path: pkg/context/http/util.go
##########
@@ -84,3 +88,31 @@ func HttpRouteActionMatch(c *HttpContext, ra model.RouteAction) bool {
 
 	return true
 }
+
+// 将request.body写入到span中,并重新放回去
+func ExtractRequestBody(req *http.Request) []byte {
+	isUpload := isUpload(req)
+	if isUpload {
+		return nil
+	}
+	body, err := ioutil.ReadAll(req.Body)
+	if err != nil {
+		return nil
+	}
+	req.Body = ioutil.NopCloser(bytes.NewBuffer(body))
+	return body
+}
+
+// 是否为文件上传 upload方法

Review comment:
       using english comment, pls.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (386ca4b) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/32c6ba5a48e7f4e261c51e3b217849159d1713f8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (32c6ba5) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [32c6ba5...386ca4b](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf01aa9) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/e88f22115bc91c029e0ae56f49ec16930f7a19fa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e88f221) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.18%   39.65%   -0.54%     
   ===========================================
     Files           50       50              
     Lines         2541     2575      +34     
   ===========================================
     Hits          1021     1021              
   - Misses        1410     1444      +34     
     Partials       110      110              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e88f221...cf01aa9](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699227264



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"

Review comment:
       split 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-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (386ca4b) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/32c6ba5a48e7f4e261c51e3b217849159d1713f8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (32c6ba5) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [32c6ba5...386ca4b](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] LvBay closed pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
LvBay closed pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter commented on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c9d8c8) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/fa7d18a443acf52f6786e0f2f3629f7e989807a0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa7d18a) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fa7d18a...1c9d8c8](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6defd6c) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/e88f22115bc91c029e0ae56f49ec16930f7a19fa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e88f221) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 6defd6c differs from pull request most recent head cf01aa9. Consider uploading reports for the commit cf01aa9 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.18%   39.65%   -0.54%     
   ===========================================
     Files           50       50              
     Lines         2541     2575      +34     
   ===========================================
     Hits          1021     1021              
   - Misses        1410     1444      +34     
     Partials       110      110              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e88f221...cf01aa9](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] cityiron commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
cityiron commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699847138



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       I agree.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r699294867



##########
File path: pkg/filter/tracing/tracing.go
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 tracing
+
+import (
+	"context"
+	"log"
+	"net/http"
+	"time"
+
+	"go.opentelemetry.io/otel/trace"
+)
+
+import (
+	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/context"
+	"github.com/dubbogo/dubbo-go-pixiu-filter/pkg/filter"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/attribute"
+	"go.opentelemetry.io/otel/exporters/jaeger"
+	"go.opentelemetry.io/otel/sdk/resource"
+	tracesdk "go.opentelemetry.io/otel/sdk/trace"
+	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
+	"github.com/apache/dubbo-go-pixiu/pkg/config"
+	contexthttp "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+)
+
+const (
+	TracingType_Jaeger = "jaeger"
+
+	traceName      = "http-server"
+	spanNamePrefix = "HTTP SERVER"
+	spanTagBody    = "body"
+
+	jaegerTraceIDInHeader = "uber-trace-id"
+)
+
+// nolint
+func Init() {
+	extension.SetFilterFunc(constant.TracingFilter, tracerFilterFunc())
+}
+
+// tracerFilter is a filter for tracer
+type tracerFilter struct {
+	// global tracer
+	waitTime time.Duration
+}
+
+func tracerFilterFunc() fc.FilterFunc {
+	return New().Do()
+}
+
+func newTracerProvider(url string) (*tracesdk.TracerProvider, error) {
+	// Create the Jaeger exporter
+	exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
+	if err != nil {
+		return nil, err
+	}
+	tp := tracesdk.NewTracerProvider(
+		// Always be sure to batch in production.
+		tracesdk.WithBatcher(exp),
+		// Record information about this application in an Resource.
+		tracesdk.WithResource(resource.NewWithAttributes(
+			semconv.SchemaURL,
+			semconv.ServiceNameKey.String("pixiu"),
+		)),
+	)
+
+	return tp, nil
+}
+
+// New create tracer filter.
+func New() filter.Filter {
+	tc := config.GetBootstrap().Tracing
+	switch tc.Type {
+	case "":
+	case TracingType_Jaeger:
+		tp, err := newTracerProvider(tc.URL)
+		if err != nil {
+			log.Fatal(err)
+		}
+		otel.SetTracerProvider(tp)
+	default:
+		panic("unsupported tracing")
+	}
+
+	return tracerFilter{}
+}
+
+// Do execute tracerFilter filter logic.
+func (f tracerFilter) Do() fc.FilterFunc {
+	return func(c fc.Context) {
+		hc := c.(*contexthttp.HttpContext)
+		spanName := spanNamePrefix + hc.Request.Method + " " + hc.Request.URL.Path
+		tr := otel.Tracer(traceName)
+		ctx := extractTraceCtxRequest(hc.Request)
+		ctxWithTid, span := tr.Start(ctx, spanName)
+
+		body := contexthttp.ExtractRequestBody(hc.Request)
+		span.SetAttributes(attribute.Key(spanTagBody).String(string(body)))

Review comment:
       我个人觉得没必要去记录请求body 存储比较消耗资源了 也属于比较敏感的数据




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] tydhot commented on a change in pull request #236: traing

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r684593288



##########
File path: pkg/context/http/util.go
##########
@@ -84,3 +88,31 @@ func HttpRouteActionMatch(c *HttpContext, ra model.RouteAction) bool {
 
 	return true
 }
+
+// 将request.body写入到span中,并重新放回去

Review comment:
       I think we should avoid Chinese




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#issuecomment-912301957


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#236](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3b4a8e9) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/f1836e0f942b7f978db9af17c8cbeea9d88f106f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f1836e0) will **decrease** coverage by `0.53%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 3b4a8e9 differs from pull request most recent head 9b2a1d9. Consider uploading reports for the commit 9b2a1d9 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #236      +/-   ##
   ===========================================
   - Coverage    40.93%   40.40%   -0.54%     
   ===========================================
     Files           51       51              
     Lines         2587     2621      +34     
   ===========================================
     Hits          1059     1059              
   - Misses        1415     1449      +34     
     Partials       113      113              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/client/dubbo/dubbo.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9kdWJiby9kdWJiby5nbw==) | `21.48% <0.00%> (-1.36%)` | :arrow_down: |
   | [pkg/client/http/http.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NsaWVudC9odHRwL2h0dHAuZ28=) | `43.20% <0.00%> (-4.74%)` | :arrow_down: |
   | [pkg/context/http/util.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbnRleHQvaHR0cC91dGlsLmdv) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f1836e0...9b2a1d9](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/236?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] LvBay commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
LvBay commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r685982281



##########
File path: pkg/client/dubbo/dubbo.go
##########
@@ -22,20 +22,20 @@ import (
 	"strings"
 	"sync"
 	"time"
-)
 
-import (
+	"go.opentelemetry.io/otel/trace"
+
 	"github.com/apache/dubbo-go/common/constant"
 	dg "github.com/apache/dubbo-go/config"
 	"github.com/apache/dubbo-go/protocol/dubbo"
-	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/api/config"
-	"github.com/pkg/errors"
-)
+	"go.opentelemetry.io/otel"

Review comment:
       One extra question, why not use goimports or goreturn of the go community?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] LvBay commented on a change in pull request #236: [Ftr] tracing

Posted by GitBox <gi...@apache.org>.
LvBay commented on a change in pull request #236:
URL: https://github.com/apache/dubbo-go-pixiu/pull/236#discussion_r685979747



##########
File path: pkg/client/dubbo/dubbo.go
##########
@@ -22,20 +22,20 @@ import (
 	"strings"
 	"sync"
 	"time"
-)
 
-import (
+	"go.opentelemetry.io/otel/trace"
+
 	"github.com/apache/dubbo-go/common/constant"
 	dg "github.com/apache/dubbo-go/config"
 	"github.com/apache/dubbo-go/protocol/dubbo"
-	fc "github.com/dubbogo/dubbo-go-pixiu-filter/pkg/api/config"
-	"github.com/pkg/errors"
-)
+	"go.opentelemetry.io/otel"

Review comment:
       okay




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org