-
Notifications
You must be signed in to change notification settings - Fork 124
fix: Fix opentelemetry interceptors #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/** | ||
* Activity is executing | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong comment
} | ||
return await instrumentFromSpanContext(getTracer(), spanContext, SpanName.WORKFLOW_EXECUTE, () => next(input)); | ||
const context = await extractContextFromHeaders(input.headers); | ||
const spanName = `${SpanName.WORKFLOW_EXECUTE}${SPAN_DELIMITER}${workflowInfo().workflowType}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these string makers could just be functions that live next to the constants. Keeps everything together a little better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this ok, it's clear what the outcome is.
packages/workflow/src/workflow.ts
Outdated
const nonOptionalOptions = { workflowType: state.info?.workflowType, taskQueue: state.info?.taskQueue, ...options }; | ||
const info = workflowInfo(); | ||
const { workflowType, taskQueue, ...rest } = options ?? {}; | ||
const nonOptionalOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a funny way of saying "required" 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
cc56471
to
7799797
Compare
- Make `makeWorkflowExporter` resource param required - Fix Workflow span timestamps - Disable internal SDK tracing by default - Connect child workflow traces to their parent - Connect continueAsNew traces - Some breaking changes were made to the interceptor interfaces - Change trace header name for compatibility with Go and Java tracing implementations
parentSpanId === originalSpan?.spanContext().spanId | ||
); | ||
t.true(firstExecuteSpan !== undefined); | ||
const continueAsNewSpan = spans.find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Spikhalskiy WDYT about the continue as new behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ContinueAsNew as a child span of the original run makes sense if this continueAsNew is triggered by the original run.
Just discovered that in JavaSDK continueAsNew creates a workflow with the same exact headers as the original workflow. This means that continueAsNew run will be on the same level in spans structure as the original run. This probably should be fixed in JavaSDK.
I'm force merging this, looks like GH actions machines are really struggling.
|
@bergundy would be great if you could publish a new version on NPM :) |
Today
…On Fri, 29 Oct 2021 at 5:52 Johannes Schickling ***@***.***> wrote:
@bergundy <https://github.com/bergundy> would be great if you could
publish a new version on NPM :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#340 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMYUCPDLYGBZS72W4KPZDUJJ4GRANCNFSM5G3JBV2Q>
.
|
makeWorkflowExporter
resource param requiredworkflowType
input attribute is now consistently calledworkflowType
Tested compatibility with modified Go
contextpropation
sample.For Go Jaeger tracer compatibility:
npm i @opentelemetry/propagator-jaeger