{"id":13522171,"url":"https://github.com/weaveworks-experiments/kspan","last_synced_at":"2025-03-31T22:30:42.703Z","repository":{"id":39166695,"uuid":"306648519","full_name":"weaveworks-experiments/kspan","owner":"weaveworks-experiments","description":"Turning Kubernetes Events into spans","archived":false,"fork":false,"pushed_at":"2023-06-24T11:56:27.000Z","size":345,"stargazers_count":792,"open_issues_count":22,"forks_count":56,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-11-15T00:28:19.944Z","etag":null,"topics":["distributed-tracing","kubernetes","observability"],"latest_commit_sha":null,"homepage":"","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/weaveworks-experiments.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}},"created_at":"2020-10-23T13:40:07.000Z","updated_at":"2024-11-12T20:30:05.000Z","dependencies_parsed_at":"2024-01-13T16:24:04.380Z","dependency_job_id":"82d0a2a4-ec02-4239-b440-31fc050a0501","html_url":"https://github.com/weaveworks-experiments/kspan","commit_stats":null,"previous_names":["bboreham/kspan"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaveworks-experiments%2Fkspan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaveworks-experiments%2Fkspan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaveworks-experiments%2Fkspan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaveworks-experiments%2Fkspan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaveworks-experiments","download_url":"https://codeload.github.com/weaveworks-experiments/kspan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552077,"owners_count":20795759,"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":["distributed-tracing","kubernetes","observability"],"created_at":"2024-08-01T06:00:43.339Z","updated_at":"2025-03-31T22:30:38.845Z","avatar_url":"https://github.com/weaveworks-experiments.png","language":"Go","funding_links":[],"categories":["3. Collect","Go","kubernetes"],"sub_categories":["Events \u0026 Problems"],"readme":"# kspan - Turning Kubernetes Events into spans\n\n## This project is a Work In Progress, under active evolution.\n\nMost Kubernetes components produce Events when something interesting happens.\nThis program turns those Events into OpenTelemetry Spans, joining them up\nby causality and grouping them together into Traces.\n\nExample: rollout of a Deployment of two Pods:\n\n![image](example-2pod.png)\n\nThe picture was generated by `kspan` and Jaeger; it is a visualisation of the\nevents generated from `kubectl apply`. `kspan` has identified five different\nsources of events, and has joined up the events for starting each Pod underneath\nthe ReplicaSet scaling operation that created it.\n\nWe start with this concrete information:\n * Each Event has an Involved Object, e.g. when Kubelet sends a \"Started\" event,\n   the Involved Object is a Pod.\n * Every Kubernetes object can have one or more Owner References. So for instance\n   we can walk from the Pod up to a Deployment that caused it to be created.\n\nComplications:\n * We cannot expect events to arrive in the ideal order; we need to delay handling some until their \"parent\" arrives to make sense.\n\nHeuristics:\n * If we recently saw an event from an owner, that probably caused this event\n   in the owned object. We set the child-of relationship on the new span.\n * A couple of specific events, from ReplicationSet and StatefulSet, are reported on\n   the owner but make more sense as events on the sub-object they mention.\n * An event can be marked in its annotations as the start of a trace.\n * If we have walked the owner chain up to an object with no owner, no recent event,\n   then start a new trace.\n   *  Trace ID is hashed from UID of this object + its generation\n\nFor future consideration:\n * We can match up resourceVersion between event and object.\n   * do we need to?\n\nTo run Jaeger locally:\n```\ndocker run -d --name jaeger -p 16686:16686 -p 55680:55680 jaegertracing/opentelemetry-all-in-one\n```\n\n## \u003ca name=\"join\"\u003e\u003c/a\u003eJoin in the fun!\n\nIf you have any questions about, or feedback on `kspan`:\n\n- Invite yourself to the \u003ca href=\"https://slack.weave.works/\" target=\"_blank\"\u003eWeave Users Slack\u003c/a\u003e.\n- Ask a question on the [#general](https://weave-community.slack.com/messages/general/) slack channel.\n- [File an issue](https://github.com/weaveworks-experiments/kspan/issues/new).\n\nYour feedback is always welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaveworks-experiments%2Fkspan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaveworks-experiments%2Fkspan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaveworks-experiments%2Fkspan/lists"}