{"id":22959559,"url":"https://github.com/probe-lab/tracecatcher","last_synced_at":"2025-08-13T05:32:08.953Z","repository":{"id":65903893,"uuid":"602036625","full_name":"probe-lab/tracecatcher","owner":"probe-lab","description":"A utility that listens to pubsub traces produced by Lotus and records them in a Postgresql database. ","archived":false,"fork":false,"pushed_at":"2024-08-26T10:26:38.000Z","size":61,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-27T12:59:36.925Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/probe-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2023-02-15T11:13:07.000Z","updated_at":"2024-08-26T10:26:41.000Z","dependencies_parsed_at":"2024-06-21T05:25:49.452Z","dependency_job_id":"31d81502-1f65-4256-93f5-cdce6053647f","html_url":"https://github.com/probe-lab/tracecatcher","commit_stats":null,"previous_names":["probe-lab/tracecatcher","iand/tracecatcher"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-lab%2Ftracecatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-lab%2Ftracecatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-lab%2Ftracecatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-lab%2Ftracecatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probe-lab","download_url":"https://codeload.github.com/probe-lab/tracecatcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229737915,"owners_count":18116536,"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":[],"created_at":"2024-12-14T18:19:15.604Z","updated_at":"2024-12-14T18:20:22.767Z","avatar_url":"https://github.com/probe-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tracecatcher\n\nTraceCatcher is a utility that listens to pubsub traces produced by [Lotus](https://github.com/filecoin-project/lotus) and records them in a Postgresql database. \n\n## Overview\n\nTraceCatcher can be run alongside a Lotus node to capture pubsub traces. \nIt emulates the ElasticSearch API expected by Lotus and writes each trace to a Postgresql database. \nEach event type is recorded in a separate table.\n\nThe following trace events are supported:\n\n| Event type         | Database tables                    |\n| ------------------ | ---------------------------------- |\n| publish_message    | publish_message_event              |\n| reject_message     | reject_message_event               |\n| duplicate_message  | duplicate_message_event            |\n| deliver_message    | deliver_message_event              |\n| add_peer           | add_peer_event                     |\n| remove_peer        | remove_peer_event                  |\n| join               | join_event                         |\n| leave              | leave_event                        |\n| graft              | graft_event                        |\n| prune              | prune_event                        |\n| peer_score         | peer_score_event, peer_score_topic |   \n\nThe following event types are not yet supported:\n\n - recv_rpv\n - send_rpc\n - drop_rpc\n\n## Getting Started\n\nAs of Go 1.19, install the latest tracecatcher executable using:\n\n\tgo install github.com/probe-lab/tracecatcher@latest\n\nThis will download and build an ipfsfiled binary in `$GOBIN`\n\nRun the daemon by executing `$GOBIN/tracecatcher` and use command line options to configure its operation:\n\n - `--addr` - the address to listen for traces on (default: \":5151\")\n - `--db-host` - hostname/address of the database server in which to write traces\n - `--db-port` - port number of the database server (default: 5432)\n - `--db-name` - name of the database to use\n - `--db-password` - password to use when connecting the the database\n - `--db-user`- user to use when connecting the the database\n - `--db-sslmode` - sslmode to use when connecting the the database (default: \"prefer\")\n - `--batch-size` - set the size of query batches to use when inserting into the database (default: 100)\n\nRun `$GOBIN/tracecatcher --help` to see the full list of options. \nEach option may also be set using environment variables. These are shown in the help.\n\n### Setting up Postgresql\n\nEnsure that TraceCatcher is supplied with a user that has permissions to create tables and indexes.\nWhen TraceCatcher runs it creates the necessary tables for each event type.\n\n### Configuring Lotus\n\nLotus has two configuration settings that control the destination of pubsub traces. \nSet `ElasticSearchTracer` to the address of TraceCatcher. \n`ElasticSearchIndex` must be set to `traces`.\n\n```toml\n[Pubsub]\nElasticSearchTracer = \"http://localhost:5151/\"\nElasticSearchIndex = \"traces\"\n```\n\nThese settings can also be specified using environment variables:\n\n```\nLOTUS_PUBSUB_ELASTICSEARCHTRACER=http://localhost:5151/\nLOTUS_PUBSUB_ELASTICSEARCHINDEX=traces\n```\n\n## License\n\nThis software is dual-licensed under Apache 2.0 and MIT terms:\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](https://github.com/probe-lab/tracecatcher/blob/master/LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](https://github.com/fprobe-lab/tracecatcher/blob/master/LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobe-lab%2Ftracecatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobe-lab%2Ftracecatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobe-lab%2Ftracecatcher/lists"}