langgraph-runtime-inmem 0.31.0.dev1__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.
Files changed (18) hide show
  1. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/PKG-INFO +1 -1
  2. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/__init__.py +1 -1
  3. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/lifespan.py +31 -0
  4. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/.gitignore +0 -0
  5. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/Makefile +0 -0
  6. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/README.md +0 -0
  7. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/_persistence.py +0 -0
  8. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/checkpoint.py +0 -0
  9. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/database.py +0 -0
  10. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/inmem_stream.py +0 -0
  11. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/metrics.py +0 -0
  12. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/ops.py +0 -0
  13. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/queue.py +0 -0
  14. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/retry.py +0 -0
  15. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/routes.py +0 -0
  16. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/langgraph_runtime_inmem/store.py +0 -0
  17. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/pyproject.toml +0 -0
  18. {langgraph_runtime_inmem-0.31.0.dev1 → langgraph_runtime_inmem-0.31.0.dev2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-runtime-inmem
3
- Version: 0.31.0.dev1
3
+ Version: 0.31.0.dev2
4
4
  Summary: Inmem implementation for the LangGraph API server.
5
5
  Author-email: Will Fu-Hinthorn <will@langchain.dev>
6
6
  License: Elastic-2.0
@@ -10,7 +10,7 @@ from langgraph_runtime_inmem import (
10
10
  store,
11
11
  )
12
12
 
13
- __version__ = "0.31.0.dev1"
13
+ __version__ = "0.31.0.dev2"
14
14
  __all__ = [
15
15
  "ops",
16
16
  "database",
@@ -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: