temporalio / temporalio/sdk-typescript

[Feature Request] Explain OpenTelemetryPlugin's interaction with WorkflowCodeBundler?

Open
#1,971 1 comment 0 reactions 1 assignee View on GitHub

@mjameswh is already working on this.

Since Jul 6, 2026.

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

Description

Is your feature request related to a problem? Please describe.

I have failed to correctly configure OpenTelemetry trace reporting in my large application with an existing opentelemetry setup. It works for activities and StartWorkflow, but not for the tasks which happen inside a workflow.

The docs advise us to new WorkflowCodeBundler({ workflowsPath }).createBundle(); at build time.

I have inferred from a comment in the sample code that we are expected to pass the plugin during bundling.

But, the plugin's constructor requires a SpanProcessor and a Resource? I do not have these available at build time. I cannot think how they would be serialised into the bundle. I do not want the Resource serialised into the bundle.

Describe the solution you'd like

I suspect that these attributes are actually unused at bundling time, so perhaps another plugin (with associated docs) would be clearer?

new WorkflowCodeBundler({
  workflowsPath,
  plugins: [new OpenTelemetryBundlingPlugin(/* no args */)],
}).createBundle();
Worker.create({
  ...,
  plugins: [new OpenTelemetryWorkerPlugin(otelNodeSdk)],
});

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.