-
Notifications
You must be signed in to change notification settings - Fork 165
[Feature Request] Explain OpenTelemetryPlugin's interaction with WorkflowCodeBundler? #1971
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)],
});