{"id":20679117,"url":"https://github.com/contractshark/besu-tracing","last_synced_at":"2025-06-13T07:32:51.363Z","repository":{"id":103265122,"uuid":"341009405","full_name":"contractshark/besu-tracing","owner":"contractshark","description":"Hyperledger Besu RPC Tracing Zipkin config","archived":false,"fork":false,"pushed_at":"2021-02-21T21:42:24.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T19:35:02.055Z","etag":null,"topics":["besu","debug","enterprise","ethereum","hyperledger","instrument","otel","rpc","statediff","tracing","vmtrace","zipkin"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contractshark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-21T21:36:39.000Z","updated_at":"2021-02-21T21:42:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"43d50bcd-5247-4b57-88a7-0a858bcded7a","html_url":"https://github.com/contractshark/besu-tracing","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/contractshark/besu-tracing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contractshark%2Fbesu-tracing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contractshark%2Fbesu-tracing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contractshark%2Fbesu-tracing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contractshark%2Fbesu-tracing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contractshark","download_url":"https://codeload.github.com/contractshark/besu-tracing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contractshark%2Fbesu-tracing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259602244,"owners_count":22882946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["besu","debug","enterprise","ethereum","hyperledger","instrument","otel","rpc","statediff","tracing","vmtrace","zipkin"],"created_at":"2024-11-16T21:24:02.780Z","updated_at":"2025-06-13T07:32:51.331Z","avatar_url":"https://github.com/contractshark.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPC Tracing\n\nHyperledger Besu integrates with the [open-telemetry](https://open-telemetry.io)\nproject to integrate tracing reporting.\n\nThis allows to report all JSON-RPC traffic as traces.\n\nTo try out this example, start the Open Telemetry Collector and the Zipkin\nservice with:\n\n`$\u003e docker-compose up`\n\nStart besu with:\n\n`$\u003e OTEL_RESOURCE_ATTRIBUTES=\"service.name=besu-dev\"\nOTEL_EXPORTER_OTLP_METRIC_INSECURE=true OTEL_EXPORTER_OTLP_SPAN_INSECURE=true\n./gradlew run --args=\"--network=dev --rpc-http-enabled --metrics-enabled\n--metrics-protocol=opentelemetry\"`\n\nTry interacting with the JSON-RPC API. Here is a simple example using cURL:\n\n`$\u003e curl -X POST --data\n'{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":53}'\nhttp://localhost:8545`\n\nOpen the Zipkin UI by browsing to http://localhost:9411/\n\nYou will be able to see the detail of your traces.\n\nReferences:\n* [OpenTelemetry Environment Variable\nSpecification](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-environment-variables.md)\n\n\n## Trace RPC API Notes\n\nThis document outlines major differences for `trace_replayBlockTransactions` \ncompared to other implementations.\n\n## `stateDiff` \n\nNo major differences were observed in the `stateDiff` field.\n\n## `trace`\n\nBesu reports `gasUsed` after applying the effects of gas refunds.  Future\nimplementations of Besu might track gas refunds separately.\n\n## `vmTrace`\n\n### Returned Memory from Calls\n\nIn the `vmTrace` `ope.ex.mem` fields Besu only reports actual data returned\nfrom a `RETURN` opcode.  Other implementations return the contents of the \nreserved output space for the call operations.  Note two major differences:\n\n1. Besu reports `null` when a call operation ends because of a `STOP`,  `HALT`, \n   `REVERT`, running out of instructions, or any exceptional halts.\n2. When a `RETURN` operation returns data of a different length than the space\n   reserved by the call only the data passed to the `RETURN` operation is \n   reported.  Other implementations will include pre-existing memory data or \n   trim the returned data.\n\n### Precompiled Contracts Calls\n\nBesu reports only the actual cost of the precompiled contract call in the \n`cost` field. \n\n### Out of Gas \n\nBesu reports the operation that causes out fo gas exceptions, including \ncalculated gas cost.  The operation is not executed so no `ex` values are \nreported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontractshark%2Fbesu-tracing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontractshark%2Fbesu-tracing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontractshark%2Fbesu-tracing/lists"}