Skip to content

feat: implement soroban developer sdk metrics collector (#561)#571

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Cybermaxi7:feat/sdk-metrics-collector-561
Jun 18, 2026
Merged

feat: implement soroban developer sdk metrics collector (#561)#571
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Cybermaxi7:feat/sdk-metrics-collector-561

Conversation

@Cybermaxi7

Copy link
Copy Markdown
Contributor

add packages/sdk/metrics/ with three focused modules:

  • MetricsCollector — singleton in-process buffer for SdkTelemetryEvent; ring-buffer drops oldest events at configurable capacity; track() wrapper auto-records success/failure/duration for any async call
  • MetricsAggregator — stateless; computes MethodStats (call count, success rate, avg/min/max/p50/p95 latency) and SdkStats (per sdk+version with unique session count) from raw event arrays
  • AdoptionReporter — generates SdkAdoptionReport with top-5 methods, overall error rate, unique sessions, and optional date-range filtering; toJSON() for serialisation

also add package.json, tsconfig.json, jest.config.js, and 20 unit tests covering collection, aggregation, filtering, and report generation
Closes #561

add packages/sdk/metrics/ with three focused modules:

- MetricsCollector — singleton in-process buffer for SdkTelemetryEvent;
  ring-buffer drops oldest events at configurable capacity; track()
  wrapper auto-records success/failure/duration for any async call
- MetricsAggregator — stateless; computes MethodStats (call count,
  success rate, avg/min/max/p50/p95 latency) and SdkStats (per sdk+version
  with unique session count) from raw event arrays
- AdoptionReporter — generates SdkAdoptionReport with top-5 methods,
  overall error rate, unique sessions, and optional date-range filtering;
  toJSON() for serialisation

also add package.json, tsconfig.json, jest.config.js, and 20 unit tests
covering collection, aggregation, filtering, and report generation
@mijinummi mijinummi merged commit dd4d68b into MDTechLabs:main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Soroban Developer SDK Metrics Collector

2 participants