You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to be able to narrow down into all of the requests during one of our more important processes in Rafiki:
the outgoing payment lifecycle. Now that we have traces, we can achieve this by manually instrumenting a trace called something like outgoing_payment_worker.
Essentially, we want a trace to cover the handlePaymentLifecycle method in packages/backend/src/open_payments/payment/outgoing/worker.ts.
We can use tracerProvider in the packages/backend/src/telemetry/index.ts which exposes tracerProvider.getTracer(...).startActiveSpan(...) to be able to manually instrument a span.
Context
We want to be able to narrow down into all of the requests during one of our more important processes in Rafiki:
the outgoing payment lifecycle. Now that we have traces, we can achieve this by manually instrumenting a trace called something like
outgoing_payment_worker
.Essentially, we want a trace to cover the
handlePaymentLifecycle
method inpackages/backend/src/open_payments/payment/outgoing/worker.ts
.We can use
tracerProvider
in thepackages/backend/src/telemetry/index.ts
which exposestracerProvider.getTracer(...).startActiveSpan(...)
to be able to manually instrument a span.The docs for the function can be found here.
A consideration: because telemetry is optional, you might need to create the traceProvider outside of
if (Config.enableTelemetryTraces)
conditionalTasks
outgoing_payment_worker
traceThe text was updated successfully, but these errors were encountered: