Skip to content

Instrument signals with OTel #1449

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

iravid
Copy link
Contributor

@iravid iravid commented Jun 22, 2024

What was changed

Add instrumentation to signal in the client interceptor and handleSignal in the workflow inbound interceptor.

Why?

We're starting activities from signal handlers and would like to see them on the same trace.

Checklist

  1. How was this tested:

Haven't seen tests in this module - lmk if needed! Will test this soon on our own project.

  1. Any docs updates needed?

Don't think so!

@iravid iravid requested a review from a team as a code owner June 22, 2024 12:34
@CLAassistant
Copy link

CLAassistant commented Jun 22, 2024

CLA assistant check
All committers have signed the CLA.

@mjameswh
Copy link
Contributor

Thanks @iravid for sharing this.

There's a few things that needs to happen before we can merge this:

  • Handle WorkflowOutboundCallsInterceptor.signalWorkflow so that spans propagate when a workflow signals another workflow;
  • Add a corresponding check in test-otel.ts.

Also, if you feel up to the task, we should do the same with handleUpdate and friends.

@iravid
Copy link
Contributor Author

iravid commented Jun 25, 2024

Thanks @mjameswh! Will happily address those two; thanks for the pointer to the tests.

I'm a bit short on time this week so if alright by you will save instrumentation of the other operations for another PR?

@mjameswh
Copy link
Contributor

I'm a bit short on time this week so if alright by you will save instrumentation of the other operations for another PR?

Sure, no problem.

@iravid
Copy link
Contributor Author

iravid commented Sep 28, 2024

Hey @mjameswh apologies for the delay here (😅) - added the requested adjustments and tested locally by removing the .skip on the integration test and running npm run test with RUN_INTEGRATION_TESTS=true

@iravid
Copy link
Contributor Author

iravid commented Nov 7, 2024

Hi @mjameswh - any chance you could have a look here?

Copy link
Contributor

@mjameswh mjameswh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

Thanks a lot for adding tests, @iravid, and sorry for the delays!

@mjameswh mjameswh merged commit d6a4992 into temporalio:main Nov 15, 2024
65 of 70 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants