--- title: "ADR 0062: Provider event ID taken from delivery headers" --- * Status: accepted * Code: [`pkg/adapter/adapter.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/adapter/adapter.go) ## Context Each request handled by the listener is logged with an `event-id`, taken from a provider header before the provider itself is detected, so it can be used even when detection fails. ## Decision `getProviderEventIDFromHeader` returns the first non-empty value of these headers, in this order: * `X-GitHub-Delivery` * `X-Gitea-Delivery` (Gitea and Forgejo) * `X-Gitlab-Event-UUID` * `X-Request-UUID` (Bitbucket Cloud) * `X-Request-Id` (Bitbucket Data Center) If none is present it returns the nil UUID `00000000-0000-0000-0000-000000000000`, which stands for an unknown git provider. ## Consequences * A request from an unrecognised provider is logged with the nil UUID, and all such requests share the same ID. * `X-Request-Id` is a generic header name that proxies commonly add; the code does not distinguish a proxy value from a Bitbucket Data Center one, and the order puts it last. * Supporting a new provider means adding a header to this list; nothing else derives the ID.