Skip to main content

Setup

Registers the EventsProxyService handler, configuring OpenTelemetry tracing and metrics, and setting up the internal RunServiceClient for event proxying.

def Setup(
ctx: context.Context,
sc: *app.SetupContext
) - > error

Registers the EventsProxyService handler with the application's mux, enabling it to handle incoming requests. This function initializes OpenTelemetry providers and an interceptor for tracing and metrics, and sets up the necessary client to communicate with the Run Service.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and carrying request-scoped values.
sc*app.SetupContextThe application setup context, providing access to the application's mux and base URL for service registration.

Returns

TypeDescription
errorReturns an error if OpenTelemetry providers or interceptor cannot be registered or created, or if any other setup step fails.