Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tracing capability for Webhook #98

Closed
6 tasks
Tracked by #47
thisthat opened this issue Oct 4, 2022 · 0 comments
Closed
6 tasks
Tracked by #47

Add tracing capability for Webhook #98

thisthat opened this issue Oct 4, 2022 · 0 comments
Assignees

Comments

@thisthat
Copy link
Member

thisthat commented Oct 4, 2022

Goal

Instrument the Webhook with the OTel SDK to export traces.

Technical Details

Use OTel Go to manually instrument the code to export the following spans as a single trace:

Image

The Trace Context should be propagated into the CRDs via a common metadata field TraceContext. The context will be propagated using these immutable fields. This struct should look like the following:

type KeptnContext struct {
	TraceID    string `json:"traceparent",omitempty`
	TraceState string `json:"tracestate",omitempty`
}

The webhook shall use keptn/webhook as the component name.
Spans shall be created with the following OTel Attribute:

  • KeptnApp
  • KeptnWorkload
  • KeptnInstance
  • KeptnVersion

The webhook is the one that always starts a trace.

Acceptance Criteria

  • TraceContext contains W3C Trace Headers
  • Webhook creates a Server Span when it starts to handle a request
  • Webhook creates a Producer Span when it creates the Workload CRD
  • Webhook injects the W3C Context into the CRDs
  • Attributes with Keptn information are added to the Span

DoD

  • The Webhook exports traces

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant