langgraph-runtime-inmem 0.31.0.dev9__py3-none-any.whl → 0.32.0.dev2__py3-none-any.whl

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.
@@ -10,7 +10,7 @@ from langgraph_runtime_inmem import (
10
10
  store,
11
11
  )
12
12
 
13
- __version__ = "0.31.0.dev9"
13
+ __version__ = "0.32.0.dev2"
14
14
  __all__ = [
15
15
  "ops",
16
16
  "database",
@@ -66,15 +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
- )
69
+ # OTLP metrics are always exported (Prometheus via /metrics; Datadog when a
70
+ # DD API key is set). The reporter no-ops if OTel deps are unavailable.
71
+ from langgraph_api.metrics_otlp import ( # noqa: PLC0415
72
+ COUNTER_SERVER_STARTED,
73
+ get_otlp_metrics_reporter,
74
+ )
74
75
 
75
- reporter = get_otlp_metrics_reporter()
76
- reporter.initialize()
77
- reporter.inc_counter(COUNTER_SERVER_STARTED)
76
+ reporter = get_otlp_metrics_reporter()
77
+ reporter.initialize()
78
+ reporter.inc_counter(COUNTER_SERVER_STARTED)
78
79
 
79
80
  async def _log_graph_load_failure(err: graph.GraphLoadError) -> None:
80
81
  cause = err.__cause__ or err.cause
@@ -97,6 +98,11 @@ async def lifespan(
97
98
  taskgroup_name="Lifespan",
98
99
  ) as tg:
99
100
  tg.create_task(metadata_loop())
101
+ from langgraph_api.metrics_collector import ( # noqa: PLC0415
102
+ collector_loop,
103
+ )
104
+
105
+ tg.create_task(collector_loop())
100
106
  await api_store.collect_store_from_env()
101
107
  store_instance = await api_store.get_store()
102
108
  if not api_store.CUSTOM_STORE:
@@ -144,16 +150,14 @@ async def lifespan(
144
150
  except asyncio.CancelledError:
145
151
  pass
146
152
  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
+ from langgraph_api.metrics_otlp import ( # noqa: PLC0415
154
+ COUNTER_SERVER_REQUESTED_TO_STOP,
155
+ get_otlp_metrics_reporter,
156
+ )
153
157
 
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)
158
+ # Shutdown has been requested; teardown is starting.
159
+ otlp_reporter = get_otlp_metrics_reporter()
160
+ otlp_reporter.inc_counter(COUNTER_SERVER_REQUESTED_TO_STOP)
157
161
 
158
162
  await api_store.exit_store()
159
163
  await api_checkpointer.exit_checkpointer()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-runtime-inmem
3
- Version: 0.31.0.dev9
3
+ Version: 0.32.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
@@ -1,15 +1,15 @@
1
- langgraph_runtime_inmem/__init__.py,sha256=wiQKMYOj-8jjVtuBECww-S_D7jvU6as40NE0Zt7HAq8,342
1
+ langgraph_runtime_inmem/__init__.py,sha256=81ial-u5vFctq1RClfHmirCCj-p4h0gHX39RKOlANtA,342
2
2
  langgraph_runtime_inmem/_persistence.py,sha256=0h_HLXc079TG0rXoiQjICPZLhhBpTsmZ2PG8UbB5YY4,1879
3
3
  langgraph_runtime_inmem/checkpoint.py,sha256=jLF-wg5gVtgqJVAsaaYv_DSEIUj7Lugz6NwwCdIPBqI,10185
4
4
  langgraph_runtime_inmem/database.py,sha256=BdEPPBn2N-g5GsqWcia96SrHLKqocXRMYAO6pHlGcHM,6779
5
5
  langgraph_runtime_inmem/inmem_stream.py,sha256=PFLWbsxU8RqbT5mYJgNk6v5q6TWJRIY1hkZWhJF8nkI,9094
6
- langgraph_runtime_inmem/lifespan.py,sha256=c1fKfUvBwXl6FgJ9f5EgOC3i2XZg__ua5-GlTZI8dQI,6650
6
+ langgraph_runtime_inmem/lifespan.py,sha256=F93NL8ckeJGe78WhNMeC0ysOchSBym69KwyHIa_yqkY,6736
7
7
  langgraph_runtime_inmem/metrics.py,sha256=vcTTwHsh8AZkOCg1t0f2QvgjWnqxN98YivLVyb4hwVM,420
8
8
  langgraph_runtime_inmem/ops.py,sha256=nJb0-SAtqH91nkkwGRQSyZXgX4Rl3df_2lYdxtdmVPk,150605
9
9
  langgraph_runtime_inmem/queue.py,sha256=CtsVVtxj3-QQ2OeXia2CcasNGLov02kfg0q0yQMylj4,15472
10
10
  langgraph_runtime_inmem/retry.py,sha256=XmldOP4e_H5s264CagJRVnQMDFcEJR_dldVR1Hm5XvM,763
11
11
  langgraph_runtime_inmem/routes.py,sha256=n0HZNtJ7UM89fylwlall6HPvv7TRFIGrO68FQhjhNi0,18536
12
12
  langgraph_runtime_inmem/store.py,sha256=7hZnVHp097RYAen7SmTQSl-9tiiDCQfLehVxzxU2xAo,3811
13
- langgraph_runtime_inmem-0.31.0.dev9.dist-info/METADATA,sha256=Wgxp2YDZpuLvhnUYB7h_Eu5uefevu2t7koIApvXj6DU,606
14
- langgraph_runtime_inmem-0.31.0.dev9.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
15
- langgraph_runtime_inmem-0.31.0.dev9.dist-info/RECORD,,
13
+ langgraph_runtime_inmem-0.32.0.dev2.dist-info/METADATA,sha256=L6ASgdcuo1D3c7U-9xtnfgEsCh9IJeIsDM9r2yjJstE,606
14
+ langgraph_runtime_inmem-0.32.0.dev2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
15
+ langgraph_runtime_inmem-0.32.0.dev2.dist-info/RECORD,,