mirror of https://github.com/hyperledger/besu
Add tracing agent to the build and default parameters in Dockerfiles (#1410)
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>pull/1453/head
parent
50a49e42c6
commit
dbc3fee7bb
@ -0,0 +1,21 @@ |
|||||||
|
# Tracing |
||||||
|
|
||||||
|
Hyperledger Besu integrates with the [open-telemetry](https://open-telemetry.io) project to integrate tracing reporting. |
||||||
|
|
||||||
|
This allows to report all JSON-RPC traffic as traces. |
||||||
|
|
||||||
|
To try out this example, start the Open Telemetry Collector and the Zipkin service with: |
||||||
|
|
||||||
|
`$> docker-compose up` |
||||||
|
|
||||||
|
Start besu with: |
||||||
|
|
||||||
|
`$> ./gradlew run --args="--network=dev --rpc-http-enabled"` |
||||||
|
|
||||||
|
Try interacting with the JSON-RPC API. Here is a simple example using cURL: |
||||||
|
|
||||||
|
`$> curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":53}' http://localhost:8545` |
||||||
|
|
||||||
|
Open the Zipkin UI by browsing to http://localhost:9411/ |
||||||
|
|
||||||
|
You will be able to see the detail of your traces. |
@ -0,0 +1,22 @@ |
|||||||
|
version: "3" |
||||||
|
services: |
||||||
|
otel-collector: |
||||||
|
image: otel/opentelemetry-collector-contrib:0.11.0 |
||||||
|
command: ["--config=/etc/otel-collector-config.yml"] |
||||||
|
volumes: |
||||||
|
- ./otel-collector-config.yml:/etc/otel-collector-config.yml |
||||||
|
ports: |
||||||
|
- "1888:1888" # pprof extension |
||||||
|
- "8888:8888" # Prometheus metrics exposed by the collector |
||||||
|
- "8889:8889" # Prometheus exporter metrics |
||||||
|
- "13133:13133" # health_check extension |
||||||
|
- "55680:55680" # zpages extension |
||||||
|
depends_on: |
||||||
|
- zipkin |
||||||
|
|
||||||
|
#Zipkin |
||||||
|
zipkin: |
||||||
|
image: openzipkin/zipkin |
||||||
|
container_name: zipkin |
||||||
|
ports: |
||||||
|
- 9411:9411 |
@ -0,0 +1,25 @@ |
|||||||
|
receivers: |
||||||
|
otlp: |
||||||
|
protocols: |
||||||
|
grpc: |
||||||
|
http: |
||||||
|
|
||||||
|
exporters: |
||||||
|
zipkin: |
||||||
|
endpoint: "http://zipkin:9411/api/v2/spans" |
||||||
|
|
||||||
|
processors: |
||||||
|
batch: |
||||||
|
|
||||||
|
extensions: |
||||||
|
health_check: |
||||||
|
pprof: |
||||||
|
zpages: |
||||||
|
|
||||||
|
service: |
||||||
|
extensions: [pprof, zpages, health_check] |
||||||
|
pipelines: |
||||||
|
traces: |
||||||
|
receivers: [otlp] |
||||||
|
exporters: [zipkin] |
||||||
|
processors: [batch] |
Loading…
Reference in new issue