weaveworks-experiments / kspan

Turning Kubernetes Events into spans
Apache License 2.0
792 stars 56 forks source link

Lease.LeaderElection spans get too-long service name #24

Open bboreham opened 3 years ago

bboreham commented 3 years ago

Example: image

I think this is really a bug in Kubernetes where the source field is set, but we probably have to deal with it in Kspan anyway.

Event details for the example above.

apiVersion: v1
count: 1
eventTime: null
firstTimestamp: "2021-04-13T16:24:32Z"
involvedObject:
  apiVersion: coordination.k8s.io/v1
  kind: Lease
  name: controller-leader-election-capd
  namespace: capd-system
  resourceVersion: "19454"
  uid: 1ac51a57-853b-4474-b9ef-3fc23f7bbce2
kind: Event
lastTimestamp: "2021-04-13T16:24:32Z"
message: capd-controller-manager-6db95854cf-ckcxq_032c7a7b-280e-4532-8e59-1548a9966519
  became leader
metadata:
  creationTimestamp: "2021-04-13T16:24:32Z"
  name: controller-leader-election-capd.167577893b81befb
  namespace: capd-system
  resourceVersion: "19456"
  selfLink: /api/v1/namespaces/capd-system/events/controller-leader-election-capd.167577893b81befb
  uid: a82df180-63af-46cf-a8da-4c565cfc4c05
reason: LeaderElection
reportingComponent: ""
reportingInstance: ""
source:
  component: capd-controller-manager-6db95854cf-ckcxq_032c7a7b-280e-4532-8e59-1548a9966519
type: Normal