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 setup context. This function initializes OpenTelemetry providers and an interceptor for tracing and metrics, creates an internal run service client, and then mounts the EventsProxyService handler to the application's multiplexer.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the setup operation, used for propagating cancellations, deadlines, and other request-scoped values.
sc*app.SetupContextThe application's setup context, which provides access to the multiplexer (Mux) for handling HTTP requests and the base URL for services.

Returns

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