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/05/23 14:23:36 UTC

[GitHub] [dubbo-go-samples] PhilYue opened a new pull request #119: Feature/openzipkin

PhilYue opened a new pull request #119:
URL: https://github.com/apache/dubbo-go-samples/pull/119


   Topic: Zipkin & Prometheus in Dubbo-go Example
   Description:
   - full call chain tracing implementation
   - .run config
   - environment is based on Docker
   - two versions of README


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

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-samples] AlexStocks commented on a change in pull request #119: Feature/openzipkin

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



##########
File path: openzipkin/README.md
##########
@@ -0,0 +1,174 @@
+# Zipkin in Dubbo-go Example
+
+## Backend
+
+Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.

Review comment:
       改为后面内容即可:Zipkin is a distributed tracing system. It helps dubbo-go gathering timing data which is used to troubleshoot latency problems in service architectures. 




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

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-samples] AlexStocks merged pull request #119: Feature/openzipkin

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


   


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

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-samples] AlexStocks commented on a change in pull request #119: Feature/openzipkin

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



##########
File path: openzipkin/README.md
##########
@@ -0,0 +1,174 @@
+# Zipkin in Dubbo-go Example
+
+## Backend
+
+Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.
+
+## Introduction
+
+```markdown
+.
+├── README.md
+├── README_zh.md
+├── docker-compose.yml
+├── go-client
+├── go-server-a
+├── go-server-b
+└── prometheus
+```
+
+- go-client :The Service Consumer
+- go-server-a :The Service Provider A
+- go-server-b :The Service Provider B
+
+Client calls ProviderA , and then calls ProviderB,
+ProviderA also makes a request to ProviderB!
+
+依赖关系:

Review comment:
       dependency hierarchy:




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

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-samples] AlexStocks commented on a change in pull request #119: Feature/openzipkin

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



##########
File path: openzipkin/README.md
##########
@@ -0,0 +1,174 @@
+# Zipkin in Dubbo-go Example
+
+## Backend
+
+Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.
+
+## Introduction
+
+```markdown
+.
+├── README.md
+├── README_zh.md
+├── docker-compose.yml
+├── go-client
+├── go-server-a
+├── go-server-b
+└── prometheus
+```
+
+- go-client :The Service Consumer
+- go-server-a :The Service Provider A
+- go-server-b :The Service Provider B
+
+Client calls ProviderA , and then calls ProviderB,
+ProviderA also makes a request to ProviderB!
+
+依赖关系:
+![dependency.png](doc/app_dependency.png)
+
+## Code
+
+register Zipkin. Reporter,Endpoint,Tracer,default sample `AlwaysSample` 
+
+```go
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-a", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+    // set sampler , default AlwaysSample
+    // sampler := zipkin.NewModuloSampler(1)
+
+	// initialize our tracer
+	// nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint), zipkin.WithSampler(sampler))
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
+```
+
+## Config
+
+Provider config filter:
+
+```yaml
+
+services:
+  ...
+filter: "tracing"
+
+```
+
+## Filter
+
+Dubbo-go support `opentrace filter` 实现,基于简单配置即可

Review comment:
       Dubbo-go supports `opentrace filter`.




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

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-samples] zhaoyunxing92 commented on a change in pull request #119: Feature/openzipkin

Posted by GitBox <gi...@apache.org>.
zhaoyunxing92 commented on a change in pull request #119:
URL: https://github.com/apache/dubbo-go-samples/pull/119#discussion_r637556483



##########
File path: openzipkin/README.md
##########
@@ -0,0 +1,174 @@
+# Zipkin in Dubbo-go Example
+
+## Backend
+
+Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.
+
+## Introduction
+
+```markdown
+.
+├── README.md
+├── README_zh.md
+├── docker-compose.yml
+├── go-client
+├── go-server-a
+├── go-server-b
+└── prometheus
+```
+
+- go-client :The Service Consumer
+- go-server-a :The Service Provider A
+- go-server-b :The Service Provider B
+
+Client calls ProviderA , and then calls ProviderB,
+ProviderA also makes a request to ProviderB!
+
+依赖关系:
+![dependency.png](doc/app_dependency.png)
+
+## Code
+
+register Zipkin. Reporter,Endpoint,Tracer,default sample `AlwaysSample` 
+
+```go
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-a", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+    // set sampler , default AlwaysSample
+    // sampler := zipkin.NewModuloSampler(1)
+
+	// initialize our tracer
+	// nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint), zipkin.WithSampler(sampler))
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
+```
+
+## Config
+
+Provider config filter:
+
+```yaml
+
+services:
+  ...
+filter: "tracing"
+
+```
+
+## Filter
+
+Dubbo-go support `opentrace filter` 实现,基于简单配置即可

Review comment:
       换成英语




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

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