Skip to content

Commit

Permalink
chore: change opentelemetry readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Sep 20, 2024
1 parent 1399b2d commit 3117dc5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ kubectl port-forward svc/jaeger-collector -n default 4317:4317 > jaeger.out &
kubectl port-forward svc/jaeger-query -n default 16686:16686 > jaeger.out &
```

## Running the Example
## Example
Enable opentelemetry in the configuration:
```go
cfg := greptime.NewConfig(host).WithDatabase(database).
WithTraceProvider(tracerProvider).WithTracesEnabled(true).
WithMeterProvider(meterProvider).WithMetricsEnabled(true)
```

Running the example:
```go
go run main.go
```
Expand Down

0 comments on commit 3117dc5

Please sign in to comment.