new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

LangChain & LangGraph · all subjects

middleware & observability

11 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

LangSmith Chat for prompt optimization

LangSmith Chat is a tool used to optimize prompts in the Playground.

Middleware parameter execution order

Pass middleware in the 'middleware' list (Python) or 'middleware' array (JavaScript) to add behavior around model calls, tool calls, and the agent lifecycle. Middleware runs in the order it appears in the list or array.

Prometheus metrics in Agent Server v0.11+

Agent Server v0.11 and later emit metrics through OpenTelemetry/Prometheus client on a dedicated endpoint. Set LSD_PROM_METRICS_ENABLED=true to enable and expose OTel metrics (run lifecycle, latency, stream, worker gauges) on port LSD_PROM_METRICS_PORT (default 9464). Datadog OTLP push continues to work alongside Prometheus when both are configured. Enable LSD_RUN_QUEUE_TRACE_LOG for verbose Redis run-queue trace logs.

LS_APM_OTEL_ENABLED explicit opt-in for OTEL

Instrumentation for OTEL now requires explicit opt-in with LS_APM_OTEL_ENABLED=true for improved control.

OpenTelemetry telemetry agent with New Relic

OpenTelemetry telemetry agent was introduced with support for New Relic integration.

Py-Spy profiling for deployment performance

Py-Spy profiling was added for improved analysis of deployment performance, with some limitations on coverage.

Instrumentation for TTFB and response size

Instrumentation was added to log time to first byte (TTFB) and response size for streaming endpoints, improving access log details.

agent-server LG API version and request ID in metadata

Agent-server v0.2.51 added LG API version and request ID to metadata and logs for better tracking and traceability.

agent-server log metadata privacy improvement

Agent-server v0.2.43 stopped sending internal logs in metadata requests to improve privacy.

agent-server streaming with tracing contexts

Agent-server v0.2.42 added support for streaming with tracing contexts and added tracer information to configuration settings.

agent-server request start and end timestamps

Agent-server v0.2.42 added timestamps to track the start and end of a request's run.

Give your agent this brain