Conversation
The self-hosted runner doesn't have npm in PATH, causing cloudflare/wrangler-action@v3 to fail when trying to install wrangler. Add actions/setup-node@v4 with Node 20 before the deploy step, matching the pattern used by other workflows in this repo. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ains (#261) - api.dev.litprotocol.com → api.chipotle.litprotocol.com - dashboard.dev.litprotocol.com → dashboard.chipotle.litprotocol.com - docs.dev.litprotocol.com → developer.litprotocol.com - Fix broken swagger-ui path (/swagger-ui/ → /core/v1/swagger-ui) - Remove broken Support navbar link - Fix broken SDK link in encryption migration doc Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: migrate README URLs from dev.litprotocol.com to new domains Same migration as the docs/ directory (PR #261): - api.dev.litprotocol.com → api.chipotle.litprotocol.com - dashboard.dev.litprotocol.com → dashboard.chipotle.litprotocol.com - docs.dev.litprotocol.com → developer.litprotocol.com Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update "dev API" to "API" in README quickstart Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add usage API key step to README quickstart Adds step 2 showing how to create a scoped usage API key before using the API, reinforcing the best practice of not embedding the account key in apps. Renumbers subsequent steps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: reorder quickstart — add funds before usage API key Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace localhost:8000 and api.dev.litprotocol.com references in curl examples across MDX docs with https://api.chipotle.litprotocol.com. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…-204) Add debug-level tracing spans and events across the full lit_action request lifecycle to measure actual latency before optimizing. Covers billing guard, Stripe API calls, on-chain authorization, gRPC connection pool, per-op handling with op type visibility, and wallet permission cache hit/miss tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds debug-level tracing spans/events across the POST /core/v1/lit_action request lifecycle to improve observability of billing, authorization, client setup, gRPC connectivity, and per-op execution behavior.
Changes:
- Instrumented billing/Stripe flow (wallet resolution, customer lookup, balance check, charges) with debug logs/spans.
- Added debug spans around
can_execute_action, client config build, andexecute_jsexecution. - Instrumented gRPC connection pool reuse/wait behavior and added per-op handling + wallet permission cache hit/miss telemetry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lit-api-server/src/stripe.rs | Adds debug logs around wallet/customer/balance resolution and Lit Action time charging. |
| lit-api-server/src/core/v1/guards/billing.rs | Wraps Lit Action credit check in a debug span and simplifies error flow. |
| lit-api-server/src/core/core_features.rs | Adds debug spans for authorization, client config build, and JS execution steps. |
| lit-api-server/src/actions/grpc.rs | Adds a debug span for connection creation/reuse and extra debug logs while waiting for permits. |
| lit-api-server/src/actions/client/op_code_helpers/mod.rs | Adds debug instrumentation + cache hit/miss field recording for wallet permission checks. |
| lit-api-server/src/actions/client/handle_ops.rs | Adds per-op debug event with op type and running op count (without logging secrets). |
| lit-api-server/src/actions/client/execution.rs | Adds debug logs around Stripe flush charging and gRPC channel/stream setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let span = tracing::debug_span!( | ||
| "grpc_pool::create_or_get_connection", | ||
| addr, | ||
| reused = tracing::field::Empty | ||
| ); |
There was a problem hiding this comment.
create_or_get_connection logs at debug on every loop iteration ("Connecting…") and also logs every 50ms while waiting for permits. Under load with debug enabled this can generate very high log volume and make traces noisy. Consider lowering these to trace, or only logging on state transitions (first attempt / first NoPermits) with a counter/backoff so it remains usable in production debugging.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
|
@GTC6244 I'm unable to start working on this because of repository rules that prevent me from pushing to the branch:
See the documentation for more details. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move per-loop-iteration log to trace, only log permit wait on first occurrence, and log connection creation at debug instead of every lookup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
POST /core/v1/lit_actionrequest lifecycle (CPL-204)can_execute_actionauthorization, client config build, gRPC connection pool (with reuse tracking), per-op handling (with op type + count), wallet permission cache (hit/miss), Stripe charge calls, and billing flushdebuglevel with zero overhead when not enabledTest plan
cargo +stable checkpassescargo +stable test --libpasses (3 pre-existing platform-specific failures unrelated to this change)cargo +stable test --no-runcompiles all test targets successfullyRUST_LOG=debug🤖 Generated with Claude Code