Skip to content

feat(sdk): add optional OTLP tracing via tracing config option (#241)#246

Open
Ademiitura wants to merge 1 commit into
Miracle656:mainfrom
Ademiitura:feat/otlp-tracing
Open

feat(sdk): add optional OTLP tracing via tracing config option (#241)#246
Ademiitura wants to merge 1 commit into
Miracle656:mainfrom
Ademiitura:feat/otlp-tracing

Conversation

@Ademiitura
Copy link
Copy Markdown

Summary

Implements #241 — optional OTLP tracing for SDK consumers self-hosting an OTel collector.

Changes

  • sdk/src/telemetry/tracing.ts (new) — no-op tracer by default, OTLP/HTTP flush when configured
  • sdk/src/useInvisibleWallet.ts — added tracing option to WalletConfig, wraps register, deploy, and signAuthEntry with spans
  • sdk/src/index.ts — exports TracingConfig type and shutdownTracing
  • sdk/package.json — adds OTel packages as optional dependencies

Usage

const wallet = useInvisibleWallet({
  factoryAddress: FACTORY_CONTRACT_ID,
  rpcUrl: 'https://soroban-testnet.stellar.org',
  networkPassphrase: Networks.TESTNET,
  tracing: {
    exporter: 'otlp-http',
    endpoint: 'http://localhost:4318/v1/traces',
  },
});

Acceptance criteria

  • Default off, no perf cost — no-op path has zero overhead when tracing is not configured
  • When on, traces full payment lifecycle — spans cover veil.register, veil.deploy, veil.signAuthEntry
    Closes OTLP traces from SDK #241

- Add sdk/src/telemetry/tracing.ts with no-op default and OTLP/HTTP flush
- Wrap register, deploy, signAuthEntry in withSpan for full payment lifecycle
- Export TracingConfig type and shutdownTracing from sdk index
- Add @opentelemetry packages as optional dependencies

Closes Miracle656#241
@Ademiitura Ademiitura requested a review from Miracle656 as a code owner May 30, 2026 19:18
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@Ademiitura is attempting to deploy a commit to the miracle656's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Ademiitura 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

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.

OTLP traces from SDK

1 participant