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 trace to outgoing payment worker #2876

Closed
1 task
Tracked by #2777
mkurapov opened this issue Aug 20, 2024 · 0 comments · Fixed by #2884
Closed
1 task
Tracked by #2777

Add trace to outgoing payment worker #2876

mkurapov opened this issue Aug 20, 2024 · 0 comments · Fixed by #2884
Assignees

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Aug 20, 2024

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 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.

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) conditional

Tasks

  • Manually instrument a outgoing_payment_worker trace
@mkurapov mkurapov mentioned this issue Aug 20, 2024
11 tasks
@mkurapov mkurapov changed the title Add traces to critical paths Add traces to outgoing payment worker Aug 20, 2024
@mkurapov mkurapov changed the title Add traces to outgoing payment worker Add trace to outgoing payment worker Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants