{"id":19282487,"url":"https://github.com/aesiniath/tracer","last_synced_at":"2025-02-23T22:23:21.025Z","repository":{"id":149675719,"uuid":"502223409","full_name":"aesiniath/tracer","owner":"aesiniath","description":"Instrument shell scripts with traces and spans.","archived":false,"fork":false,"pushed_at":"2022-12-04T23:25:48.000Z","size":14,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-05T17:13:27.696Z","etag":null,"topics":["haskell","observability"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aesiniath.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":"2022-06-11T01:38:43.000Z","updated_at":"2023-01-09T09:30:49.000Z","dependencies_parsed_at":"2023-08-31T10:30:42.532Z","dependency_job_id":null,"html_url":"https://github.com/aesiniath/tracer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Ftracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Ftracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Ftracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Ftracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aesiniath","download_url":"https://codeload.github.com/aesiniath/tracer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240386625,"owners_count":19793208,"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":["haskell","observability"],"created_at":"2024-11-09T21:27:07.015Z","updated_at":"2025-02-23T22:23:20.986Z","avatar_url":"https://github.com/aesiniath.png","language":"Haskell","readme":"Add traces and spans to shell scripts\n=====================================\n\nUsage\n-----\n\n### Setup\n\nThe _tracer_ program has three commands, _init_, _exec_, and _send_.\n\nTo begin recording a trace of a set of programs or scripts, first call _init_\nsupplying `honeycomb` as the telemetry exporter and providing the name of the\ndataset these events will be sent to:\n\n```\n$ tracer --telemetry=honeycomb --dataset=builder init\n```\n\nThis writes a temporary file (defaulting to _.trace_) along the following\nlines:\n\n```json\n{\n    \"start\": 1654910414568468483,\n    \"trace\": \"fd531dbf96ecdc6ff156482aec6c24f7\",\n    \"parent\": \"1d1e9d1234ec4649\"\n}\n```\n\n### Run steps\n\nThis file is then used by the other two commands _exec_ and _send_ to enable\nthem to know what trace they are a part of. Use _exec_ to execute a step:\n\n```\n$ tracer --telemetry=honeycomb --dataset=builder exec \"label-one\" command1 ...\n$ tracer --telemetry=honeycomb --dataset=builder exec \"label-two\" command2 ...\n$ tracer --telemetry=honeycomb --dataset=builder exec \"label-three\" command3 ...\n```\n\nBy convention the \"`label`\" used as the name of the step you are executing is\nthe name of the program, script, or function your are executing, rather than\nsomething particularly descriptive.\n\n### Finalize\n\nWhen the sequence of steps is complete, the trace is finished off by creating\na root span to be the parent of the previously created leaves and to represent\nthe total duration of the process:\n\n```\n$ tracer --telemetry=honeycomb --dataset=builder send \"label\"\n```\n\n\u003c!--\nMight help:\n```\n$ alias trace=tracer --telemetry=honeycomb --dataset=builder\n```\n--\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faesiniath%2Ftracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faesiniath%2Ftracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faesiniath%2Ftracer/lists"}