-
Notifications
You must be signed in to change notification settings - Fork 82
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 trace to outgoing payment worker #2876
Comments
mkurapov
changed the title
Add traces to critical paths
Add traces to outgoing payment worker
Aug 20, 2024
mkurapov
changed the title
Add traces to outgoing payment worker
Add trace to outgoing payment worker
Aug 20, 2024
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: