Skip to content

release: 0.11.8 - #386

Merged
smoreinis merged 18 commits into
mainfrom
release-please--branches--main--changes--next
Jun 1, 2026
Merged

release: 0.11.8#386
smoreinis merged 18 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app

@stainless-appstainless-appBot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Automated Release PR

0.11.8 (2026-06-01)

Full Changelog: v0.11.7...v0.11.8

Features

  • cli: add Temporal + LangGraph agent template and example (#383) (bbc9e02)
  • tracing: OTel span queue and export telemetry (SGPINF-1863) (#373) (6669012)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

This release (0.11.8) ships two features: a new Temporal + LangGraph agent template/example, and OTel span queue + export telemetry instrumentation.

  • Temporal + LangGraph template: Adds a full CLI template (temporal-langgraph) and a matching tutorial example. The template includes human-in-the-loop interrupt handling via Temporal signals, live introspection queries, and per-turn SGP tracing (correctly guarded by SGP_API_KEY / SGP_ACCOUNT_ID). A new emit_langgraph_messages ADK helper converts LangGraph message objects to Agentex content types.
  • OTel span queue telemetry: Adds tracing_metrics.py (instrument definitions) and tracing_metrics_recording.py (best-effort recording helpers) with bounded tag cardinality throughout. The recording path is disabled via AGENTEX_TRACING_METRICS=0 and swallows all exceptions so it is safe on hot paths. enqueued_at timestamps are correctly preserved through re-enqueues for accurate lag histograms.

Confidence Score: 5/5

Safe to merge — changes are additive, all tag values are bounded, and the recording helpers are exception-safe on hot paths.

Both features are purely additive. The tracing metrics are well-isolated behind a feature flag and best-effort exception handling. The LangGraph template correctly guards credential-dependent setup. No behavioral regressions are introduced in existing code paths.

src/agentex/lib/core/tracing/span_queue.py — the retry path silently re-enqueues failed items without emitting a failure metric, making transient errors invisible until retries are exhausted.

Important Files Changed

FilenameOverview
src/agentex/lib/core/tracing/span_queue.pyAdds OTel instrumentation across enqueue, batch-drain, and shutdown paths. enqueued_at timestamp is correctly preserved through re-enqueues. record_export_failure is only called for permanently-dropped spans (exhausted retries or non-retriable errors), leaving transient failures unobservable in metrics.
src/agentex/lib/core/observability/tracing_metrics.pyNew file: defines the OTel instrument set for span queue + export telemetry. All tag cardinalities are explicitly bounded. Singleton is created lazily via get_tracing_metrics().
src/agentex/lib/core/observability/tracing_metrics_recording.pyNew file: best-effort recording helpers that lazy-load the OTel SDK module. AGENTEX_TRACING_METRICS=0 disables all recording. All helpers silently swallow exceptions.
src/agentex/lib/core/tracing/processors/sgp_tracing_processor.pyAdds record_export_success calls after successful upsert_batch on both on_spans_start and on_spans_end.
src/agentex/lib/adk/_modules/_langgraph_messages.pyNew helper converting LangGraph/LangChain message objects to Agentex content types after ainvoke. Handles both OpenAI and Anthropic content block formats.
src/agentex/lib/cli/templates/temporal-langgraph/project/workflow.py.j2Full-featured Temporal+LangGraph template with human-in-the-loop, live queries, and properly guarded tracing setup.
examples/tutorials/10_async/10_temporal/130_langgraph/project/workflow.pySimplified example workflow with durable multi-turn state kept on the workflow instance.
tests/lib/core/tracing/test_span_queue.pyNew TestAsyncSpanQueueMetrics suite covering enqueue, drop, failure, and disabled-metrics fast-path scenarios.

Sequence Diagram

sequenceDiagram
participant Caller
participant AsyncSpanQueue
participant Metrics as tracing_metrics_recording
participant Processor as SGPAsyncTracingProcessor
participant SGP as SGP HTTP API
Caller->>AsyncSpanQueue: enqueue(event_type, span, processors)
AsyncSpanQueue->>Metrics: record_span_enqueued(event_type)
Note over AsyncSpanQueue: stores enqueued_at timestamp
AsyncSpanQueue->>AsyncSpanQueue: drain loop (linger_ms)
AsyncSpanQueue->>Metrics: record_batch_coalesced(queue_depth, batch_items)
AsyncSpanQueue->>Processor: on_spans_start / on_spans_end
Processor->>SGP: upsert_batch(...)
alt HTTP success
SGP-->>Processor: 200 OK
Processor->>Metrics: record_export_success(event_type, span_count, sgp)
else Retriable failure (retries remaining)
SGP-->>Processor: 5xx / network error
Processor-->>AsyncSpanQueue: raises exception
Note over AsyncSpanQueue: re-enqueues item, no metric emitted
else Retries exhausted
AsyncSpanQueue->>Metrics: record_export_failure(exhausted_count)
else Permanent non-retriable failure
AsyncSpanQueue->>Metrics: record_export_failure(all items)
end
AsyncSpanQueue->>Metrics: record_batch_phase(phase, size, duration_ms)
Note over AsyncSpanQueue: on shutdown timeout
AsyncSpanQueue->>Metrics: record_shutdown_timeout(remaining_items)
Loading

Fix All in CursorFix All in Claude CodeFix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---### Issue 1 of 1
src/agentex/lib/core/tracing/span_queue.py:349-361
**Transient export failures are invisible in metrics**`record_export_failure` is only emitted for spans whose retry budget is exhausted (or non-retriable permanent failures). Items that fail but are re-enqueued for another attempt emit no metric. In practice, a span that fails 4 times and succeeds on the 5th retry shows only a single `record_export_success` with zero failure events recorded. The counter names `export_batch_failures` / `export_span_failures` (described as "failed HTTP export batches") imply every failure attempt, but the current implementation counts only permanent losses, making transient error rates unobservable. Consider calling `record_export_failure` (with the retriable span count) for intermediate failures as well, alongside the re-enqueue path.

Reviews (3): Last reviewed commit: "release: 0.11.8" | Re-trigger Greptile

max-parke-scaleand others added 14 commits May 26, 2026 17:48
)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Declan Brady <declan.brady@scale.com>
Co-authored-by: Michael Chou <michael.chou@scale.com>
…ts adapter (#375)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nc + temporal) (#377)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Max Parke <max.parke@scale.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Declan Brady <declan.brady@scale.com>
Co-authored-by: Michael Chou <michael.chou@scale.com>
Co-authored-by: Daniel Miller <daniel.miller@scale.com>
Co-authored-by: Matteo Librizzi <matteo.librizzi@scale.com>
…into-next-2
# Conflicts:
#	src/agentex/lib/core/tracing/span_queue.py
#	tests/lib/core/tracing/test_span_queue.py
chore: back-merge main into next (merge commit to clear release PR #382)
Add OpenTelemetry metrics for async span queue processing and SGP export:
queue depth, batch lag, drain duration, shutdown flush timing, and
export success/failure counters with bounded HTTP status labels.
Introduce AGENTEX_TRACING_METRICS=0|false|no|off kill switch to disable
SDK-side recording without code changes.
Linear: SGPINF-1863
Comment threadsrc/agentex/lib/core/observability/tracing_metrics.py
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from 0bae058 to 5f639e7CompareJune 1, 2026 23:00
@smoreinissmoreinis changed the title release: 0.12.0release: 0.11.8Jun 1, 2026
@stainless-app

Copy link
Copy Markdown
ContributorAuthor

Release version edited manually

The Pull Request version has been manually set to 0.11.8 and will be used for the release.

If you instead want to use the version number 0.12.0 generated from conventional commits, just remove the label autorelease: custom version from this Pull Request.

@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from 5f639e7 to 0aa5b0aCompareJune 1, 2026 23:04
….7-into-next
# Conflicts:
#	CHANGELOG.md
#	src/agentex/lib/core/tracing/span_queue.py
@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from 0aa5b0a to 5a4bd70CompareJune 1, 2026 23:16
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

DiffPackageSupply Chain
Security
VulnerabilityQualityMaintenanceLicense
Addedgrandalf@​0.810010010010070

View full report

@smoreinis
smoreinis enabled auto-merge (squash) June 1, 2026 23:17
@smoreinis
smoreinis merged commit 2df25c7 into mainJun 1, 2026
48 checks passed
@smoreinis
smoreinis deleted the release-please--branches--main--changes--next branch June 1, 2026 23:22
@stainless-app

Copy link
Copy Markdown
ContributorAuthor

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@smoreinis@max-parke-scale@danielmillerp@matteolibrizzi-scale@declan-scale@james-cardenas