Skip to content

Add TypeScript OTEL e2e tracing example#376

Open
pcholakov wants to merge 1 commit intomainfrom
pavel/swvrymnouvuo
Open

Add TypeScript OTEL e2e tracing example#376
pcholakov wants to merge 1 commit intomainfrom
pavel/swvrymnouvuo

Conversation

@pcholakov
Copy link
Contributor

No description provided.

@pcholakov pcholakov force-pushed the pavel/swvrymnouvuo branch 2 times, most recently from f6d8e20 to 07720f7 Compare February 3, 2026 20:09
Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, i would put the key snippet in the docs


The Restate server propagates W3C trace context to handlers via HTTP headers. In the TypeScript SDK, you need to manually extract this from `ctx.request().attemptHeaders`:

```typescript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice to get this exact snippet in the docs

console.log(`View in Jaeger: http://localhost:16686/trace/${traceId}`);
console.log("");

const response = await fetch(`${RESTATE_INGRESS}/Greeter/greet`, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intersting, otel doesn't have any form of agent/autoinstrumentation in node like they have in java/go and co?!

- Use TextMapGetter in extractTraceContext so all propagator formats (W3C, B3, Jaeger) work without hardcoding header names
- Explain in README why Node.js auto-instrumentation can't substitute for manual extraction: Restate wraps the HTTP transport layer and handlers replay, so one span per logical invocation requires extracting from ctx.request().attemptHeaders
- Remove committed screenshot (trace.png); add *.png to .gitignore
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.

2 participants