Skip to content

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

@FauxFaux

Description

@FauxFaux

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)],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions