langgraph-runtime-inmem 0.30.0rc2__tar.gz → 0.31.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_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/PKG-INFO +1 -1
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/__init__.py +1 -1
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/lifespan.py +31 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/.gitignore +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/Makefile +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/README.md +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/_persistence.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/checkpoint.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/database.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/inmem_stream.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/metrics.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/ops.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/queue.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/retry.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/routes.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/store.py +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/pyproject.toml +0 -0
- {langgraph_runtime_inmem-0.30.0rc2 → langgraph_runtime_inmem-0.31.0.dev2}/uv.lock +0 -0
|
@@ -66,6 +66,16 @@ async def lifespan(
|
|
|
66
66
|
await api_checkpointer.start_checkpointer()
|
|
67
67
|
await start_ui_bundler()
|
|
68
68
|
|
|
69
|
+
if config.DATADOG_METRICS_ENABLED or config.LSD_PROM_METRICS_ENABLED:
|
|
70
|
+
from langgraph_api.metrics_otlp import ( # noqa: PLC0415
|
|
71
|
+
COUNTER_SERVER_STARTED,
|
|
72
|
+
get_otlp_metrics_reporter,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
reporter = get_otlp_metrics_reporter()
|
|
76
|
+
reporter.initialize()
|
|
77
|
+
reporter.inc_counter(COUNTER_SERVER_STARTED)
|
|
78
|
+
|
|
69
79
|
async def _log_graph_load_failure(err: graph.GraphLoadError) -> None:
|
|
70
80
|
cause = err.__cause__ or err.cause
|
|
71
81
|
log_fields = err.log_fields()
|
|
@@ -134,6 +144,17 @@ async def lifespan(
|
|
|
134
144
|
except asyncio.CancelledError:
|
|
135
145
|
pass
|
|
136
146
|
finally:
|
|
147
|
+
otlp_reporter = None
|
|
148
|
+
if config.DATADOG_METRICS_ENABLED or config.LSD_PROM_METRICS_ENABLED:
|
|
149
|
+
from langgraph_api.metrics_otlp import ( # noqa: PLC0415
|
|
150
|
+
COUNTER_SERVER_REQUESTED_TO_STOP,
|
|
151
|
+
get_otlp_metrics_reporter,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
# Shutdown has been requested; teardown is starting.
|
|
155
|
+
otlp_reporter = get_otlp_metrics_reporter()
|
|
156
|
+
otlp_reporter.inc_counter(COUNTER_SERVER_REQUESTED_TO_STOP)
|
|
157
|
+
|
|
137
158
|
await api_store.exit_store()
|
|
138
159
|
await api_checkpointer.exit_checkpointer()
|
|
139
160
|
await stop_ui_bundler()
|
|
@@ -142,6 +163,16 @@ async def lifespan(
|
|
|
142
163
|
await stop_webhook_http_client()
|
|
143
164
|
await stop_pool()
|
|
144
165
|
|
|
166
|
+
if otlp_reporter is not None:
|
|
167
|
+
from langgraph_api.metrics_otlp import ( # noqa: PLC0415
|
|
168
|
+
COUNTER_SERVER_STOPPED,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
# Teardown completed successfully. Emit before shutting down the
|
|
172
|
+
# reporter so the final OTLP export includes this counter.
|
|
173
|
+
otlp_reporter.inc_counter(COUNTER_SERVER_STOPPED)
|
|
174
|
+
otlp_reporter.shutdown()
|
|
175
|
+
|
|
145
176
|
|
|
146
177
|
async def queue_with_signal():
|
|
147
178
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|