Skip to content

Add request deduplication for idempotent operations - #1213

Merged
Kingsman-99 merged 5 commits into
Stellar-split:mainfrom
shake-070:drips/1176-1177-1178-1179
Oct 21, 2026
Merged

Kingsman-99 merged 5 commits into
Stellar-split:mainfrom
shake-070:drips/1176-1177-1178-1179

Conversation

@shake-070

Copy link
Copy Markdown

Summary

Add request deduplication for idempotent operations

What was solved

#1176 — Add request deduplication for idempotency

Add a request deduplication layer for idempotent operations: track in-flight/completed requests by idempotency key, detect duplicates, cache responses, expire/cleanup entries, and expose dedup metrics. This is a new cross-cutting utility in the SDK; the issue does not name an existing module, so the contribution should introduce a focused deduplication module (plus its types) and wire it minimally where idempotent request handling already exists, without refactoring unrelated code.

Addressed:

  • Changed: ARCHITECTURE.md
  • Design a deduplication system keyed by an idempotency key for idempotent operations
  • Implement request tracking for in-flight and completed requests
  • Add duplicate detection that returns the cached response for repeated keys

#1177 — Implement streaming API for large datasets

Add a streaming API for large datasets in the Stellar SDK: define a streaming protocol, implement stream handlers with backpressure, error recovery, monitoring, and analytics. The issue is broad and touches core SDK surface; a focused contribution should introduce a streaming module (protocol types, handler with backpressure/recovery, monitoring/analytics hooks) and wire it into the existing SDK export surface without altering unrelated features.

Addressed:

  • Changed: src/analyticsDashboardExporter.ts
  • Design a streaming protocol (message/chunk framing, lifecycle events, error signals)
  • Implement stream handlers for consuming large datasets incrementally
  • Add backpressure handling (pause/resume, buffering limits)

#1178 — Implement comprehensive logging system

Add a structured logging system to the SDK covering log structure, levels, contextual logging, aggregation, filtering, and analytics, with tests. The issue is broad but scoped to logging; implement a focused logging module (likely a new src/logging.ts plus tests) that integrates with existing patterns without touching unrelated features.

Addressed:

  • Changed: src/logging.ts, src/tests/logging.test.ts, package.json
  • Design a structured log entry format (timestamp, level, message, context, metadata)
  • Implement log levels (e.g., debug/info/warn/error) with enforcement
  • Support contextual logging (bound context fields merged into entries)

#1179 — Add distributed tracing support

Implement distributed tracing for request tracking in this TypeScript SDK: select a tracing approach consistent with the existing telemetry hooks, add trace context propagation, span creation, sampling, and export, plus a way to visualize traces. Scope is limited to the tracing feature described; no unrelated refactors.

Addressed:

  • Changed: src/analyticsTracking.ts, docs/TELEMETRY_HOOKS.md
  • Choose a tracing library/approach consistent with existing telemetry hooks and SDK patterns
  • Implement trace context propagation across requests
  • Add span creation for tracked operations

Changes

  • package.json (modify)
  • src/analyticsTracking.ts (modify)
  • docs/TELEMETRY_HOOKS.md (modify)
  • ARCHITECTURE.md (modify)
  • src/analyticsDashboardExporter.ts (modify)
  • src/logging.ts (create)
  • src/__tests__/logging.test.ts (create)

Approach

  1. Add request deduplication for idempotency #1176 — Add request deduplication for idempotency (Changed: ARCHITECTURE.md)
  2. Implement streaming API for large datasets #1177 — Implement streaming API for large datasets (Changed: src/analyticsDashboardExporter.ts)
  3. Implement comprehensive logging system #1178 — Implement comprehensive logging system (Changed: src/logging.ts, src/tests/logging.test.ts, package.json)
  4. Add distributed tracing support #1179 — Add distributed tracing support (Changed: src/analyticsTracking.ts, docs/TELEMETRY_HOOKS.md)

Issues

Closes #1176
Closes #1177
Closes #1178
Closes #1179

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@shake-070 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit 9948eae into Stellar-split:main Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants