temporalio / temporalio/sdk-typescript

[Feature Request] Run headers through codec

Open
#514 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

As discussed on slack: by default, don't put headers through codec / custom data converter, except for otel baggage.

Putting otel baggage through the codec requires passing contextual info to Codec.encode/decode. And if we're going to do that, perhaps we want to allow users to have the codec be run on their other headers?

Additional context

For future reference, setBaggage returns a new context:

import { context, propagation } from '@opentelemetry/api';
    const baggage = propagation.createBaggage({ test: { value: 'true' } });
    const newContext = propagation.setBaggage(context.active(), baggage);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Codec.encode/decode entry points and the header propagation path, then review how setBaggage creates the context. Establish tests for default header handling, OpenTelemetry baggage, and any opt-in conversion; done means the intended behavior is specified and covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.