• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

weaveworks-experiments/kspan: Turning Kubernetes Events into spans

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

weaveworks-experiments/kspan

开源软件地址(OpenSource Url):

https://github.com/weaveworks-experiments/kspan

开源编程语言(OpenSource Language):

Go 97.7%

开源软件介绍(OpenSource Introduction):

kspan - Turning Kubernetes Events into spans

This project is a Work In Progress, under active evolution.

Most Kubernetes components produce Events when something interesting happens. This program turns those Events into OpenTelemetry Spans, joining them up by causality and grouping them together into Traces.

Example: rollout of a Deployment of two Pods:

image

The picture was generated by kspan and Jaeger; it is a visualisation of the events generated from kubectl apply. kspan has identified five different sources of events, and has joined up the events for starting each Pod underneath the ReplicaSet scaling operation that created it.

We start with this concrete information:

  • Each Event has an Involved Object, e.g. when Kubelet sends a "Started" event, the Involved Object is a Pod.
  • Every Kubernetes object can have one or more Owner References. So for instance we can walk from the Pod up to a Deployment that caused it to be created.

Complications:

  • We cannot expect events to arrive in the ideal order; we need to delay handling some until their "parent" arrives to make sense.

Heuristics:

  • If we recently saw an event from an owner, that probably caused this event in the owned object. We set the child-of relationship on the new span.
  • A couple of specific events, from ReplicationSet and StatefulSet, are reported on the owner but make more sense as events on the sub-object they mention.
  • An event can be marked in its annotations as the start of a trace.
  • If we have walked the owner chain up to an object with no owner, no recent event, then start a new trace.
    • Trace ID is hashed from UID of this object + its generation

For future consideration:

  • We can match up resourceVersion between event and object.
    • do we need to?

To run Jaeger locally:

docker run -d --name jaeger -p 16686:16686 -p 55680:55680 jaegertracing/opentelemetry-all-in-one

Join in the fun!

If you have any questions about, or feedback on kspan:

Your feedback is always welcome!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap