File tree Expand file tree Collapse file tree 4 files changed +198
-44
lines changed Expand file tree Collapse file tree 4 files changed +198
-44
lines changed Original file line number Diff line number Diff line change 11# Example for go-redis OpenTelemetry instrumentation
22
3- This example requires running Redis Server. You can start Redis Server using Docker:
3+ See [ Monitoring performance and errors] ( https://redis.uptrace.dev/guide/tracing.html ) for details.
4+
5+ This example requires Redis Server on port ` :6379 ` . You can start Redis Server using Docker:
46
57``` shell
68docker-compose up -d
79```
810
9- To run this example:
11+ You can run this example with different OpenTelemetry exporters by providing environment variables.
12+
13+ ** Stdout** exporter (default):
1014
1115``` shell
1216go run .
1317```
1418
15- See [ Monitoring performance and errors] ( https://redis.uptrace.dev/guide/tracing.html ) for more
16- details.
19+ ** Jaeger** exporter:
20+
21+ ``` shell
22+ OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces go run .
23+ ```
24+
25+ ** Uptrace** exporter:
26+
27+ ``` shell
28+ UPTRACE_DSN=" https://<token>@uptrace.dev/<project_id>" go run .
29+ ```
30+
31+ ## Links
32+
33+ - [ Find instrumentations] ( https://opentelemetry.uptrace.dev/instrumentations/?lang=go )
34+ - [ OpenTelemetry Tracing API] ( https://opentelemetry.uptrace.dev/guide/go-tracing.html )
Original file line number Diff line number Diff line change @@ -11,8 +11,13 @@ replace github.com/go-redis/redis/extra/rediscmd/v8 => ../../extra/rediscmd
1111require (
1212 github.com/go-redis/redis/extra/redisotel/v8 v8.11.4
1313 github.com/go-redis/redis/v8 v8.11.4
14- go.opentelemetry.io/otel v1.0.0
15- go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.0.0
16- go.opentelemetry.io/otel/sdk v1.0.0
17- golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7 // indirect
14+ github.com/uptrace/opentelemetry-go-extra/otelplay v0.1.3
15+ github.com/uptrace/uptrace-go v1.1.0 // indirect
16+ go.opentelemetry.io/contrib/instrumentation/runtime v0.26.1 // indirect
17+ go.opentelemetry.io/otel v1.1.0
18+ go.opentelemetry.io/proto/otlp v0.10.0 // indirect
19+ golang.org/x/net v0.0.0-20211104170005-ce137452f963 // indirect
20+ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b // indirect
21+ google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
22+ google.golang.org/grpc v1.42.0 // indirect
1823)
You can’t perform that action at this time.
0 commit comments