{"id":16931064,"url":"https://github.com/issif/sysdigtracers","last_synced_at":"2025-10-17T20:34:19.846Z","repository":{"id":57533731,"uuid":"148599997","full_name":"Issif/sysdigtracers","owner":"Issif","description":"Add sysdig tracers in your Go code easily","archived":false,"fork":false,"pushed_at":"2018-12-03T08:56:23.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T14:21:57.761Z","etag":null,"topics":["golang","sysdig","tracing"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Issif.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}},"created_at":"2018-09-13T07:33:46.000Z","updated_at":"2024-10-01T04:51:44.000Z","dependencies_parsed_at":"2022-09-07T09:32:29.516Z","dependency_job_id":null,"html_url":"https://github.com/Issif/sysdigtracers","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/Issif%2Fsysdigtracers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Fsysdigtracers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Fsysdigtracers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Fsysdigtracers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Issif","download_url":"https://codeload.github.com/Issif/sysdigtracers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458817,"owners_count":21107156,"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":["golang","sysdig","tracing"],"created_at":"2024-10-13T20:43:09.007Z","updated_at":"2025-10-17T20:34:19.754Z","avatar_url":"https://github.com/Issif.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sysdigtracers\nAdd sysdig tracers in your Go code easily\n\n# sysdig tracers documentation \n\nhttps://github.com/draios/sysdig/wiki/Tracers\n\n# usage\n\n* Fetch and install package :\n```\ngo get github.com/Issif/sysdigtracers\n```\n* Import package, add in your code :\n```\nimport github.com/Issif/sysdigtracers\n```\n* Idiomatic way is to add at beginning of each function you want to trace :\n```\nt:= sysdigtracers.Entry(\"id\", \"tags\", \"args\")\ndefer t.Exit(\"args\")\n```\n* With (see https://github.com/draios/sysdig/wiki/Tracers#fields-explanation) :\n    * **id** (required) : a string, can be empty\n    * **tags** (required) : a string, if empty, will be set with name of caller function\n    * **args** (optionnal) : a string, can be empty\n\n* You can also add entry and exit events anywhere in your function :\n```\nfunc myFunction() {\n//... some stuff ...\nt := sysdigtracers.Entry(\"\", \"\")\n//... some stuff ...\nt.Exit()\n//... some stuff ...\n}\n```\n# example\n\nInspired by : https://rosettacode.org/wiki/Mandelbrot_set#Go\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"math/cmplx\"\n\n\t\"github.com/Issif/sysdigtracers\"\n)\n\nfunc mandelbrot(a complex128) (z complex128) {\n\tt := sysdigtracers.Entry(\"\", \"\")\n\tdefer t.Exit(\"\")\n\tfor i := 0; i \u003c 50; i++ {\n\t\tz = z*z + a\n\t}\n\treturn\n}\n\nfunc main() {\n\tfor y := 1.0; y \u003e= -1.0; y -= 0.05 {\n\t\tfor x := -2.0; x \u003c= 0.5; x += 0.0315 {\n\t\t\tif cmplx.Abs(mandelbrot(complex(x, y))) \u003c 2 {\n\t\t\t\tfmt.Print(\"*\")\n\t\t\t} else {\n\t\t\t\tfmt.Print(\" \")\n\t\t\t}\n\t\t}\n\t\tfmt.Println(\"\")\n\t}\n}\n```\n\n```\n~# sysdig evt.type=tracer\n\n330655 11:38:17.059175478 1 mandelbrot (3034) \u003e tracer id=0 tags=main.mandelbrot args=\n330681 11:38:17.059254204 1 mandelbrot (3034) \u003c tracer id=0 tags=main.mandelbrot args=\n330718 11:38:17.059373437 1 mandelbrot (3034) \u003e tracer id=0 tags=main.mandelbrot args=\n330737 11:38:17.059472125 1 mandelbrot (3034) \u003c tracer id=0 tags=main.mandelbrot args=\n330772 11:38:17.059605109 1 mandelbrot (3034) \u003e tracer id=0 tags=main.mandelbrot args=\n330802 11:38:17.059685106 1 mandelbrot (3034) \u003c tracer id=0 tags=main.mandelbrot args=\n330839 11:38:17.059828369 1 mandelbrot (3034) \u003e tracer id=0 tags=main.mandelbrot args=\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissif%2Fsysdigtracers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fissif%2Fsysdigtracers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissif%2Fsysdigtracers/lists"}