langgraph-api 0.11.0.dev10__tar.gz → 0.12.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/PKG-INFO +2 -2
- langgraph_api-0.12.0.dev2/langgraph_api/__init__.py +1 -0
- langgraph_api-0.12.0.dev2/langgraph_api/api/meta.py +122 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/config/__init__.py +8 -4
- langgraph_api-0.12.0.dev2/langgraph_api/metrics_collector.py +184 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/metrics_otlp.py +326 -85
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/middleware/http_logger.py +24 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/queue_entrypoint.py +13 -36
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/self_hosted_metrics.py +1 -1
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/pyproject.toml +1 -1
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/uv.lock +1 -1
- langgraph_api-0.11.0.dev10/langgraph_api/__init__.py +0 -1
- langgraph_api-0.11.0.dev10/langgraph_api/api/meta.py +0 -233
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/.gitignore +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/LICENSE +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/Makefile +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/README.md +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/.gitignore +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/Makefile +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/README.md +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/assistant.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/benchmark-runner.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/benchmark_profiles.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/benchmarks.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/cancel_first_second_completes.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/enqueued_runs_order.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/log-failure.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/meta_workload.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/stream_write.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/thread.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/thread_runs_metadata_search.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/threads_search_metadata.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/types.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/benchmark-runners/wait_write.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/capacity_dd_report.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/capacity_k6.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/capacity_runner.mjs +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/capacity_slack_report.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/capacity_urls.mjs +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/clean-cli.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/clean.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/continuous/README.md +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/continuous/pyproject.toml +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/continuous/runner.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/continuous/uv.lock +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/graphs.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/mixed_workload_k6.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/mixed_workload_runner.mjs +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/package.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/ramp.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/reporting/dd_reporting.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/reporting/slack_slowest_runs.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/reporting/slack_summary.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/run_local.sh +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/staircase.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/staircase_step_k6.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/tsconfig.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/update-revision.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/benchmark/weather.js +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/constraints.txt +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/custom_store.sql +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/forbidden.txt +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/hatch_build.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/healthcheck.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph-cloud-debugging-20260210132856.zip +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/_checkpointer/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/_checkpointer/_adapter.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/_checkpointer/protocol.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/_factory_utils.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/a2a.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/assistants.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/event_streaming.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/_constants.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/_handlers.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/_models.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/_routes.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/mcp/_sanitizers.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/openapi.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/profile.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/runs.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/store.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/threads.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/api/ui.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/asgi_transport.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/asyncio.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/custom.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/errors.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/langsmith/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/langsmith/backend.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/langsmith/client.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/middleware.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/noop.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/auth/studio_user.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/cache.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/cli.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/command.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/config/_parse.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/config/schemas.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/cron_scheduler.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/aes_json.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/context.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/custom.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/middleware.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/encryption/shared.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/errors.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/capabilities.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/constants.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/event_normalizers.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/namespace.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/service.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/session.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/state_normalizers.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/event_streaming/types.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/feature_flags.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/graph.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/client.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/generated/core_api_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/assistants.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/cache.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/crons.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/runs.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/ops/threads.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/server.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/servicers/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/servicers/checkpointer.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/grpc/servicers/encryption.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/http.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/http_metrics.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/http_metrics_utils.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/.gitignore +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/.prettierrc +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/base.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/build.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/client.http.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/client.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/errors.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/global.d.ts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/package.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/remote.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/schema.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/graph.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/load.hooks.mjs +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/preload.mjs +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/utils/experiment-tracing.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/utils/files.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/utils/importMap.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/utils/pythonSchemas.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/src/utils/serde.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/sse.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/traceblock.mts +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/tsconfig.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/ui.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/js/yarn.lock +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/lc_security/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/lc_security/exceptions.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/lc_security/policy.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/lc_security/transport.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/logging.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/metadata.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/middleware/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/middleware/ensure_store.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/middleware/private_network.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/middleware/request_id.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/models/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/models/run.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/otel_context.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/patch.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/release_tags.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/route.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/schema.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/self_hosted_logs.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/serde.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/server.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/sse.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/state.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/store.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/stream.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/stream_v2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/timing/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/timing/profiler.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/timing/timer.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/traceblock.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/tunneling/cloudflare.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/cache.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/config.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/errors.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/extract.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/future.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/headers.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/network.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/retriable_client.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/stream_codec.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/utils/uuids.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/validation.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/webhook.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_api/worker.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/checkpointer.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/_compat.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/checkpoint.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/config.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/durability.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/struct.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/conversion/value.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/checkpointer_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/checkpointer_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/checkpointer_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/checkpointer_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/core_api_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/core_api_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/core_api_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/core_api_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/encryption_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/encryption_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/encryption_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/encryption_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/engine_common_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/engine_common_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/engine_common_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/engine_common_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cancel_run_action_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cancel_run_action_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cancel_run_action_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cancel_run_action_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_control_signal_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_control_signal_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_control_signal_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_control_signal_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cron_on_run_completed_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cron_on_run_completed_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cron_on_run_completed_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_cron_on_run_completed_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_durability_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_durability_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_durability_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_durability_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_multitask_strategy_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_multitask_strategy_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_multitask_strategy_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_multitask_strategy_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_run_status_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_run_status_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_run_status_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_run_status_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_stream_mode_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_stream_mode_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_stream_mode_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_stream_mode_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_status_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_status_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_status_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_status_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_stream_mode_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_stream_mode_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_stream_mode_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/enum_thread_stream_mode_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/errors_pb2.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/errors_pb2.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/errors_pb2_grpc.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/proto/errors_pb2_grpc.pyi +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_grpc_common/serde.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_license/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_license/validation.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/__init__.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/checkpoint.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/database.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/lifespan.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/metrics.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/ops.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/queue.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/retry.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/routes.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/langgraph_runtime/store.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/logging.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/openapi.json +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/scripts/build_wheel.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/scripts/create_license.py +0 -0
- {langgraph_api-0.11.0.dev10 → langgraph_api-0.12.0.dev2}/scripts/run_a2a_tck.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0.dev2
|
|
4
4
|
Author-email: Will Fu-Hinthorn <will@langchain.dev>, Josh Rogers <josh@langchain.dev>, Parker Rule <parker@langchain.dev>
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -16,7 +16,7 @@ Requires-Dist: jsonschema-rs<0.45,>=0.20.0
|
|
|
16
16
|
Requires-Dist: langchain-core>=0.3.64
|
|
17
17
|
Requires-Dist: langchain-protocol<0.1,>=0.0.16
|
|
18
18
|
Requires-Dist: langgraph-checkpoint<5,>=3.0.1
|
|
19
|
-
Requires-Dist: langgraph-runtime-inmem<0.
|
|
19
|
+
Requires-Dist: langgraph-runtime-inmem<0.32.0.dev0,>=0.31.0.dev0
|
|
20
20
|
Requires-Dist: langgraph-sdk>=0.3.5
|
|
21
21
|
Requires-Dist: langgraph<2,>=0.4.10
|
|
22
22
|
Requires-Dist: langsmith[otel]>=0.6.3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.12.0.dev2"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import langgraph.version
|
|
2
|
+
import structlog
|
|
3
|
+
from prometheus_client import CONTENT_TYPE_LATEST, generate_latest
|
|
4
|
+
from starlette.responses import JSONResponse, PlainTextResponse
|
|
5
|
+
|
|
6
|
+
from langgraph_api import __version__, config, metadata
|
|
7
|
+
from langgraph_api.feature_flags import IS_POSTGRES_OR_GRPC_BACKEND
|
|
8
|
+
from langgraph_api.http_metrics import HTTP_METRICS_COLLECTOR
|
|
9
|
+
from langgraph_api.route import ApiRequest
|
|
10
|
+
from langgraph_api.schema import PoolStats, PostgresPoolStats, RedisPoolStats
|
|
11
|
+
from langgraph_runtime.database import connect, pool_stats
|
|
12
|
+
from langgraph_runtime.metrics import get_metrics
|
|
13
|
+
|
|
14
|
+
if IS_POSTGRES_OR_GRPC_BACKEND:
|
|
15
|
+
from langgraph_api.grpc.ops import Runs
|
|
16
|
+
else:
|
|
17
|
+
from langgraph_runtime.ops import Runs
|
|
18
|
+
|
|
19
|
+
METRICS_FORMATS = {"prometheus", "json"}
|
|
20
|
+
|
|
21
|
+
logger = structlog.stdlib.get_logger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _merge_pool_stats(local: PoolStats, remote: PoolStats) -> PoolStats:
|
|
25
|
+
"""Merge local and remote pool stats by summing numeric values. Used to aggregate Python + Go pool metrics."""
|
|
26
|
+
merged: PoolStats = {}
|
|
27
|
+
if "postgres" in local or "postgres" in remote:
|
|
28
|
+
lp = local.get("postgres") or {}
|
|
29
|
+
rp = remote.get("postgres") or {}
|
|
30
|
+
merged["postgres"] = PostgresPoolStats(
|
|
31
|
+
pool_max=lp.get("pool_max", 0) + rp.get("pool_max", 0),
|
|
32
|
+
pool_size=lp.get("pool_size", 0) + rp.get("pool_size", 0),
|
|
33
|
+
pool_available=lp.get("pool_available", 0) + rp.get("pool_available", 0),
|
|
34
|
+
requests_queued=lp.get("requests_queued", 0) + rp.get("requests_queued", 0),
|
|
35
|
+
requests_errors=lp.get("requests_errors", 0) + rp.get("requests_errors", 0),
|
|
36
|
+
)
|
|
37
|
+
if "redis" in local or "redis" in remote:
|
|
38
|
+
lr = local.get("redis") or {}
|
|
39
|
+
rr = remote.get("redis") or {}
|
|
40
|
+
merged["redis"] = RedisPoolStats(
|
|
41
|
+
idle_connections=lr.get("idle_connections", 0)
|
|
42
|
+
+ rr.get("idle_connections", 0),
|
|
43
|
+
in_use_connections=lr.get("in_use_connections", 0)
|
|
44
|
+
+ rr.get("in_use_connections", 0),
|
|
45
|
+
max_connections=lr.get("max_connections", 0) + rr.get("max_connections", 0),
|
|
46
|
+
)
|
|
47
|
+
return merged
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
async def _grpc_pool_stats() -> PoolStats:
|
|
51
|
+
"""Fetch connection pool stats from the Core API (Go) via gRPC for metrics aggregation. Returns {} on error."""
|
|
52
|
+
if not IS_POSTGRES_OR_GRPC_BACKEND:
|
|
53
|
+
return {}
|
|
54
|
+
try:
|
|
55
|
+
return await Runs.pool_stats()
|
|
56
|
+
except Exception as e:
|
|
57
|
+
await logger.awarning(
|
|
58
|
+
"Failed to fetch Core API pool stats for aggregation", exc_info=e
|
|
59
|
+
)
|
|
60
|
+
return {}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
async def meta_pool_stats() -> PoolStats:
|
|
64
|
+
local_pool_stats: PoolStats = pool_stats()
|
|
65
|
+
|
|
66
|
+
# Aggregate with Core API (Go) pool stats when using gRPC backend
|
|
67
|
+
grpc_pool_stats = await _grpc_pool_stats()
|
|
68
|
+
return _merge_pool_stats(local_pool_stats, grpc_pool_stats)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
async def meta_info(request: ApiRequest):
|
|
72
|
+
return JSONResponse(
|
|
73
|
+
{
|
|
74
|
+
"version": __version__,
|
|
75
|
+
"langgraph_py_version": langgraph.version.__version__,
|
|
76
|
+
"flags": {
|
|
77
|
+
"assistants": True,
|
|
78
|
+
"crons": True,
|
|
79
|
+
"langsmith": bool(config.LANGSMITH_CONTROL_PLANE_API_KEY)
|
|
80
|
+
and bool(config.TRACING),
|
|
81
|
+
"langsmith_tracing_replicas": True,
|
|
82
|
+
},
|
|
83
|
+
"host": {
|
|
84
|
+
"kind": metadata.HOST,
|
|
85
|
+
"project_id": metadata.PROJECT_ID,
|
|
86
|
+
"host_revision_id": metadata.HOST_REVISION_ID,
|
|
87
|
+
"revision_id": metadata.REVISION,
|
|
88
|
+
"tenant_id": metadata.TENANT_ID,
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
async def meta_metrics(request: ApiRequest):
|
|
95
|
+
# determine output format
|
|
96
|
+
metrics_format = request.query_params.get("format", "prometheus")
|
|
97
|
+
if metrics_format not in METRICS_FORMATS:
|
|
98
|
+
metrics_format = "prometheus"
|
|
99
|
+
|
|
100
|
+
if metrics_format == "prometheus":
|
|
101
|
+
# Served straight from the OTLP Prometheus client's registry (see
|
|
102
|
+
# metrics_otlp._LSDPrometheusReader).
|
|
103
|
+
return PlainTextResponse(generate_latest(), media_type=CONTENT_TYPE_LATEST)
|
|
104
|
+
|
|
105
|
+
# JSON: hand-built snapshot of workers, queue depth, HTTP, and pool stats.
|
|
106
|
+
worker_metrics = get_metrics()["workers"]
|
|
107
|
+
http_metrics = HTTP_METRICS_COLLECTOR.get_metrics(
|
|
108
|
+
metadata.PROJECT_ID,
|
|
109
|
+
metadata.HOST_REVISION_ID,
|
|
110
|
+
metrics_format,
|
|
111
|
+
metadata.DEPLOYMENT_TYPE,
|
|
112
|
+
)
|
|
113
|
+
merged_pool_stats = await meta_pool_stats()
|
|
114
|
+
async with connect() as conn:
|
|
115
|
+
resp = {
|
|
116
|
+
**merged_pool_stats,
|
|
117
|
+
"queue": await Runs.stats(conn),
|
|
118
|
+
**http_metrics,
|
|
119
|
+
}
|
|
120
|
+
if config.N_JOBS_PER_WORKER > 0:
|
|
121
|
+
resp["workers"] = worker_metrics
|
|
122
|
+
return JSONResponse(resp)
|
|
@@ -577,8 +577,13 @@ METRIC_MAX_EMITTING_TIER = env(
|
|
|
577
577
|
"METRIC_MAX_EMITTING_TIER", cast=int, default=_METRIC_MAX_EMITTING_TIER_DEFAULT
|
|
578
578
|
)
|
|
579
579
|
DATADOG_METRICS_ENABLED = bool(LSD_DD_API_KEY)
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
# When true, the Prometheus scrape (/metrics) exposes ALL metrics, not just the
|
|
581
|
+
# lsd_web_metric (Deployment-UI) set. Record-time tier filtering
|
|
582
|
+
# (METRIC_MAX_EMITTING_TIER) still applies, so internal metrics must be within the
|
|
583
|
+
# max emitting tier to be recorded at all.
|
|
584
|
+
EXPOSE_INTERNAL_METRICS_PROMETHEUS = env(
|
|
585
|
+
"EXPOSE_INTERNAL_METRICS_PROMETHEUS", cast=bool, default=False
|
|
586
|
+
)
|
|
582
587
|
LANGGRAPH_LOGS_ENDPOINT = env("LANGGRAPH_LOGS_ENDPOINT", cast=str, default=None)
|
|
583
588
|
LANGGRAPH_LOGS_ENABLED = env("LANGGRAPH_LOGS_ENABLED", cast=bool, default=False)
|
|
584
589
|
|
|
@@ -635,6 +640,7 @@ __all__ = [
|
|
|
635
640
|
"CRON_SCHEDULER_SLEEP_TIME",
|
|
636
641
|
"DATABASE_URI",
|
|
637
642
|
"DATADOG_METRICS_ENABLED",
|
|
643
|
+
"EXPOSE_INTERNAL_METRICS_PROMETHEUS",
|
|
638
644
|
"FF_CRONS_ENABLED",
|
|
639
645
|
"FF_LOG_DROPPED_EVENTS",
|
|
640
646
|
"FF_LOG_QUERY_AND_PARAMS",
|
|
@@ -672,8 +678,6 @@ __all__ = [
|
|
|
672
678
|
"LSD_GRPC_SERVER_ADDRESS",
|
|
673
679
|
"LSD_GRPC_SERVER_MAX_RECV_MSG_BYTES",
|
|
674
680
|
"LSD_GRPC_SERVER_MAX_SEND_MSG_BYTES",
|
|
675
|
-
"LSD_PROM_METRICS_ENABLED",
|
|
676
|
-
"LSD_PROM_METRICS_PORT",
|
|
677
681
|
"MAX_STREAM_CHUNK_SIZE_BYTES",
|
|
678
682
|
"METRIC_MAX_EMITTING_TIER",
|
|
679
683
|
"METRIC_PREFIX",
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"""Periodic collector that pushes snapshot/state metrics to the OTLP client.
|
|
2
|
+
|
|
3
|
+
This background task samples the same sources every ``STATS_INTERVAL_SECS`` and records them via the reporter.
|
|
4
|
+
|
|
5
|
+
The loop runs in **every** process (on postgres both the API server and the
|
|
6
|
+
dedicated queue worker share the same lifespan; inmem is a single process). Each
|
|
7
|
+
metric group self-gates so it lands on the right process:
|
|
8
|
+
|
|
9
|
+
- **worker gauges** — recorded wherever workers run (``N_JOBS_PER_WORKER > 0``):
|
|
10
|
+
the queue worker, or a combined single-process deployment. A distributed API
|
|
11
|
+
process (``N_JOBS_PER_WORKER == 0``) has no workers and skips them.
|
|
12
|
+
- **queue depth** (``num_pending_runs``/``num_running_runs``) — a single global
|
|
13
|
+
value from ``Runs.stats`` (a gRPC call to the Go core). Emitted by the **API
|
|
14
|
+
process only** (``not IS_QUEUE_ENTRYPOINT``) on the **postgres** runtime; inmem
|
|
15
|
+
skips the DB round-trip entirely.
|
|
16
|
+
- **Postgres + Redis pool stats** — recorded on **both** processes (postgres
|
|
17
|
+
runtime only), each reporting its own pools via ``meta_pool_stats()``, which
|
|
18
|
+
merges the local Python pools with the Go-core pools. Redis stats in particular
|
|
19
|
+
come from the local Python pool — the Go core omits them unless it has a
|
|
20
|
+
non-cluster redis client — so a Go-core-only source would drop them. inmem has
|
|
21
|
+
no real Postgres/Redis pools, so nothing is reported.
|
|
22
|
+
|
|
23
|
+
The two pool request counters are cumulative, so we push the delta since the
|
|
24
|
+
previous sample (OTLP counters are additive).
|
|
25
|
+
|
|
26
|
+
The loop also logs the same samples (``Worker stats``, ``Postgres pool stats``,
|
|
27
|
+
``Redis pool stats``) — folding in what the legacy per-process ``stats_loop``
|
|
28
|
+
functions used to log.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
from __future__ import annotations
|
|
32
|
+
|
|
33
|
+
import asyncio
|
|
34
|
+
|
|
35
|
+
import structlog
|
|
36
|
+
|
|
37
|
+
from langgraph_api import config
|
|
38
|
+
from langgraph_api.api.meta import meta_pool_stats
|
|
39
|
+
from langgraph_api.feature_flags import IS_POSTGRES_OR_GRPC_BACKEND
|
|
40
|
+
from langgraph_api.metrics_otlp import (
|
|
41
|
+
COUNTER_PG_POOL_REQUESTS_ERRORS,
|
|
42
|
+
COUNTER_PG_POOL_REQUESTS_QUEUED,
|
|
43
|
+
GAUGE_NUM_PENDING_RUNS,
|
|
44
|
+
GAUGE_NUM_RUNNING_RUNS,
|
|
45
|
+
GAUGE_PG_POOL_AVAILABLE,
|
|
46
|
+
GAUGE_PG_POOL_MAX,
|
|
47
|
+
GAUGE_PG_POOL_SIZE,
|
|
48
|
+
GAUGE_REDIS_POOL_AVAILABLE,
|
|
49
|
+
GAUGE_REDIS_POOL_MAX,
|
|
50
|
+
GAUGE_REDIS_POOL_SIZE,
|
|
51
|
+
GAUGE_WORKERS_ACTIVE,
|
|
52
|
+
GAUGE_WORKERS_AVAILABLE,
|
|
53
|
+
GAUGE_WORKERS_MAX,
|
|
54
|
+
get_otlp_metrics_reporter,
|
|
55
|
+
)
|
|
56
|
+
from langgraph_runtime.database import connect
|
|
57
|
+
from langgraph_runtime.metrics import get_metrics
|
|
58
|
+
|
|
59
|
+
if IS_POSTGRES_OR_GRPC_BACKEND:
|
|
60
|
+
from langgraph_api.grpc.ops import Runs
|
|
61
|
+
else:
|
|
62
|
+
from langgraph_runtime.ops import Runs
|
|
63
|
+
|
|
64
|
+
logger = structlog.stdlib.get_logger(__name__)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
async def _collect_queue_and_workers(reporter) -> None:
|
|
68
|
+
"""Worker gauges (where workers run) + queue depth (API process only).
|
|
69
|
+
|
|
70
|
+
Worker counts are local to the process running this loop and emitted wherever
|
|
71
|
+
workers run (``N_JOBS_PER_WORKER > 0``) — the queue worker or a combined
|
|
72
|
+
single-process deployment; a distributed API process (N_JOBS == 0) skips them.
|
|
73
|
+
|
|
74
|
+
Queue depth is a single global value (from the run table, via ``Runs.stats`` —
|
|
75
|
+
a gRPC call to the Go core) and is emitted by the **API process only**
|
|
76
|
+
(``not IS_QUEUE_ENTRYPOINT``) on **postgres**: inmem skips the DB round-trip,
|
|
77
|
+
and the dedicated queue worker leaves it to the API process so the global value
|
|
78
|
+
is not double-reported across the queue/API split.
|
|
79
|
+
"""
|
|
80
|
+
if config.N_JOBS_PER_WORKER > 0:
|
|
81
|
+
workers = get_metrics()["workers"]
|
|
82
|
+
reporter.record_gauge(GAUGE_WORKERS_MAX, workers["max"])
|
|
83
|
+
reporter.record_gauge(GAUGE_WORKERS_ACTIVE, workers["active"])
|
|
84
|
+
reporter.record_gauge(GAUGE_WORKERS_AVAILABLE, workers["available"])
|
|
85
|
+
await logger.ainfo(
|
|
86
|
+
"Worker stats",
|
|
87
|
+
max=workers["max"],
|
|
88
|
+
active=workers["active"],
|
|
89
|
+
available=workers["available"],
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Queue depth is read from the run table via Runs.stats (a gRPC call to the
|
|
93
|
+
# Go core on postgres). Emitted by the API process only — the queue worker
|
|
94
|
+
# (IS_QUEUE_ENTRYPOINT) skips it. inmem skips the DB round-trip and reports
|
|
95
|
+
# nothing.
|
|
96
|
+
if IS_POSTGRES_OR_GRPC_BACKEND and not config.IS_QUEUE_ENTRYPOINT:
|
|
97
|
+
async with connect() as conn:
|
|
98
|
+
stats = await Runs.stats(conn)
|
|
99
|
+
reporter.record_gauge(GAUGE_NUM_PENDING_RUNS, stats["n_pending"])
|
|
100
|
+
reporter.record_gauge(GAUGE_NUM_RUNNING_RUNS, stats["n_running"])
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
async def _collect_pool(reporter, prev_counters: dict[str, int]) -> None:
|
|
104
|
+
"""Postgres + Redis pool gauges + cumulative request counters.
|
|
105
|
+
|
|
106
|
+
Postgres runtime only, recorded on **both** processes (API server and queue
|
|
107
|
+
worker) — each reports its own pools. Uses ``meta_pool_stats()``, which merges
|
|
108
|
+
the local Python pools with the Go-core pools — matching the legacy /metrics.
|
|
109
|
+
Redis stats come from the local Python pool (the Go core omits them unless it
|
|
110
|
+
has a non-cluster redis client), so a Go-core-only source would drop them.
|
|
111
|
+
"""
|
|
112
|
+
# Limitation: under BG_JOB_ISOLATED_LOOPS each worker runs in its own thread with its own
|
|
113
|
+
# thread-local pg pool and redis client. This collector runs on the main
|
|
114
|
+
# thread, so meta_pool_stats() -> _get_pool()/redis_stats() only sees the main
|
|
115
|
+
# thread's pool (redis_stats() reads the global client unconditionally), and
|
|
116
|
+
# the per-thread isolated pools are NOT aggregated — so pg/redis pool gauges
|
|
117
|
+
# and the pg request counters under-report in isolated-loop mode.
|
|
118
|
+
stats = await meta_pool_stats()
|
|
119
|
+
|
|
120
|
+
pg = stats.get("postgres") or {}
|
|
121
|
+
if pg:
|
|
122
|
+
reporter.record_gauge(GAUGE_PG_POOL_MAX, pg.get("pool_max", 0))
|
|
123
|
+
reporter.record_gauge(GAUGE_PG_POOL_SIZE, pg.get("pool_size", 0))
|
|
124
|
+
reporter.record_gauge(GAUGE_PG_POOL_AVAILABLE, pg.get("pool_available", 0))
|
|
125
|
+
# Cumulative counters: record the delta since the last sample. Emit on a
|
|
126
|
+
# non-negative delta (>= 0) so the counter is created and reported from the
|
|
127
|
+
# first sample even when it is 0 — the legacy /metrics always reported
|
|
128
|
+
# these. Negative deltas (Go-core pool counter resets) are skipped to keep
|
|
129
|
+
# the OTLP counter monotonic.
|
|
130
|
+
for key, metric in (
|
|
131
|
+
("requests_queued", COUNTER_PG_POOL_REQUESTS_QUEUED),
|
|
132
|
+
("requests_errors", COUNTER_PG_POOL_REQUESTS_ERRORS),
|
|
133
|
+
):
|
|
134
|
+
current = pg.get(key, 0)
|
|
135
|
+
delta = current - prev_counters.get(key, 0)
|
|
136
|
+
if delta >= 0:
|
|
137
|
+
reporter.inc_counter(metric, delta)
|
|
138
|
+
prev_counters[key] = current
|
|
139
|
+
await logger.ainfo("Postgres pool stats", **pg)
|
|
140
|
+
|
|
141
|
+
redis = stats.get("redis") or {}
|
|
142
|
+
if redis:
|
|
143
|
+
reporter.record_gauge(
|
|
144
|
+
GAUGE_REDIS_POOL_AVAILABLE, redis.get("idle_connections", 0)
|
|
145
|
+
)
|
|
146
|
+
reporter.record_gauge(GAUGE_REDIS_POOL_SIZE, redis.get("in_use_connections", 0))
|
|
147
|
+
reporter.record_gauge(GAUGE_REDIS_POOL_MAX, redis.get("max_connections", 0))
|
|
148
|
+
await logger.ainfo("Redis pool stats", **redis)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
async def _collect_once(prev_counters: dict[str, int]) -> None:
|
|
152
|
+
reporter = get_otlp_metrics_reporter()
|
|
153
|
+
if not reporter.enabled:
|
|
154
|
+
return
|
|
155
|
+
|
|
156
|
+
# Worker gauges are emitted wherever workers run; _collect_queue_and_workers
|
|
157
|
+
# adds queue depth on the API process only (postgres; inmem skips the DB
|
|
158
|
+
# round-trip).
|
|
159
|
+
try:
|
|
160
|
+
await _collect_queue_and_workers(reporter)
|
|
161
|
+
except Exception as exc:
|
|
162
|
+
await logger.awarning(
|
|
163
|
+
"metrics collector: queue/worker sample failed", exc_info=exc
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
# Postgres/Redis pools live in the Go core (no real pools on inmem).
|
|
167
|
+
if IS_POSTGRES_OR_GRPC_BACKEND:
|
|
168
|
+
try:
|
|
169
|
+
await _collect_pool(reporter, prev_counters)
|
|
170
|
+
except Exception as exc:
|
|
171
|
+
await logger.awarning("metrics collector: pool sample failed", exc_info=exc)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
async def collector_loop() -> None:
|
|
175
|
+
"""Sample snapshot metrics into the OTLP client every STATS_INTERVAL_SECS."""
|
|
176
|
+
interval = config.STATS_INTERVAL_SECS
|
|
177
|
+
prev_counters: dict[str, int] = {}
|
|
178
|
+
await logger.ainfo("Starting OTLP metrics collector loop", interval_secs=interval)
|
|
179
|
+
try:
|
|
180
|
+
while True:
|
|
181
|
+
await _collect_once(prev_counters)
|
|
182
|
+
await asyncio.sleep(interval)
|
|
183
|
+
except asyncio.CancelledError:
|
|
184
|
+
pass
|