{"id":15282521,"url":"https://github.com/odigos-io/offsets-tracker","last_synced_at":"2026-03-27T02:43:37.732Z","repository":{"id":57710520,"uuid":"461739626","full_name":"odigos-io/offsets-tracker","owner":"odigos-io","description":"This project tracks offsets of fields inside of Go structs across versions for achieveing automatic instrumentation using eBPF","archived":false,"fork":false,"pushed_at":"2023-02-04T19:04:53.000Z","size":16,"stargazers_count":31,"open_issues_count":5,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-02T10:57:10.900Z","etag":null,"topics":["ebpf","go","golang","opentelemetry","opentelemetry-go"],"latest_commit_sha":null,"homepage":"https://keyval.dev","language":"Go","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/odigos-io.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":"2022-02-21T06:55:04.000Z","updated_at":"2025-08-02T22:31:40.000Z","dependencies_parsed_at":"2023-02-18T18:45:42.433Z","dependency_job_id":null,"html_url":"https://github.com/odigos-io/offsets-tracker","commit_stats":null,"previous_names":["odigos-io/offsets-tracker","keyval-dev/offsets-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/odigos-io/offsets-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odigos-io%2Foffsets-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odigos-io%2Foffsets-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odigos-io%2Foffsets-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odigos-io%2Foffsets-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odigos-io","download_url":"https://codeload.github.com/odigos-io/offsets-tracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odigos-io%2Foffsets-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ebpf","go","golang","opentelemetry","opentelemetry-go"],"created_at":"2024-09-30T14:26:41.653Z","updated_at":"2026-03-27T02:43:37.702Z","avatar_url":"https://github.com/odigos-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# offsets-tracker\n\nThis project tracks offsets of fields inside of Go structs across versions.\n\nThis tracking is needed in order to create a  [stable eBPF based instrumentation](https://github.com/keyval-dev/opentelemetry-go-instrumentation/blob/master/docs/how-it-works.md#instrumentation-stability).\n\nCalculating offsets is accomplished by creating a binary file containing the relevant struct and analyzing its DWARF information.\n## Tracking targets\n\nThe `main.go` file specifies all the tracking targets.\nEach tracking target has a name which can be either a fully qualified go module name or `go` for tracking parameters in the standard library.\n\nFor example, in order to track the `URL` field inside the `net/http.Request` struct in the Go standard library we register the following target:\n```go\ntarget.New(\"go\").\n  FindOffsets([]*binary.DataMember{\n    {\n      StructName: \"net/http.Request\",\n      Field:      \"URL\",\n    },\n  })\n```\n\n## Output\n\noffsets-tracker writes all the tracked offsets into a file named `offset_results.json`.\nFor example, here is the tracking of `method` field inside `transport.Stream` struct in the `google.golang.org/grpc` module:\n```go\n{\n  \"name\": \"google.golang.org/grpc\",\n  \"data_members\": [\n    {\n      \"struct\": \"google.golang.org/grpc/internal/transport.Stream\",\n      \"field_name\": \"method\",\n      \"offsets\": [\n        {\n          \"offset\": 72,\n          \"version\": \"v1.0.2\"\n        },\n        {\n          \"offset\": 72,\n          \"version\": \"v1.0.3\"\n        },\n        {\n          \"offset\": 72,\n          \"version\": \"v1.0.4\"\n        },\n        {\n          \"offset\": 80,\n          \"version\": \"v1.3.0\"\n        },\n        {\n          \"offset\": 80,\n          \"version\": \"v1.4.0\"\n        },\n```\n\n## Versions Discovery\n\nBy default, offsets-tracker finds availble versions by executing `go list -versions \u003ctarget-name\u003e`.\n\nUnfortunately, Go standard library versions are not discoverable via `go list`. \nIn order to discover Go versions, offsets-tracker can fetch the versions published at `https://go.dev/dl`.\nFetching `go.dev` for discovering versions can be enabled by setting`.FindVersionsBy(target.GoDevFileVersionsStrategy)` when registering a new target.\n\n## Download Strategy\n\noffsets-tracker wraps every Go module version as a Go application that depends on that module.\nThose applications are the result of [generating template files](https://github.com/keyval-dev/offsets-tracker/tree/master/downloader/wrapper) with the appropriate version.\n\nIn the case of the Go standard library, offsets-tracker downloads the published binary for the specified version. \n\n## Version Constraints\n\noffsets-tracker downloads and compiles every version found in the previous step by default.\nSome targets do not require support for very old versions. Add the following to limit the version scope:\n```go\nminimunGoVersion, err := version.NewConstraint(\"\u003e= 1.12\")\n\ntarget.New('go')\n... \nVersionConstraint(\u0026minimunGoVersion)\n```\n\n## Project Status\n\nThis project is currently in Alpha.\nCheck out our [issues section](https://github.com/keyval-dev/offsets-tracker/issues) to learn more about improvements we're working on.\n\n## License\n\nThis project is licensed under the terms of the Apache 2.0 open source license. Please refer to [LICENSE](LICENSE) for the full terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodigos-io%2Foffsets-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodigos-io%2Foffsets-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodigos-io%2Foffsets-tracker/lists"}