-
Notifications
You must be signed in to change notification settings - Fork 39
refactor: simplified bull child process initialization #2008
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
| } | ||
| } | ||
|
|
||
| // TODO: This is not used anymore. Investigate any usages. Potentially remove/deprecate in the next major release. |
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.
Added note to https://jsw.ibm.com/browse/INSTA-786
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.
Its super nice that we might be able to remove activateImmediately functionality
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.
It seems this configuration option isn’t documented, but we can look into it later. It’s really nice to discover such untouched or unknown parts of our codebase.
|
|
||
| // Activate immediately, otherwise we miss the first message event and the instana | ||
| // headers would not get removed from the message. | ||
| exports.activate(); |
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.
Instead of activating everything, we just activate what we need. The config even says it
activateBullProcessInstrumentation
| // this is not compatible. Our codebase does not support this. | ||
| const parentProcessAgentUuid = process.env.INSTANA_AGENT_UUID; | ||
| // CASE: This process is a forked child process of a bull worker. | ||
| const currentProcessIsBullChildProcess = process.env.INSTANA_IS_BULL_CHILD_PROCESS === 'true'; |
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.
Changed from INSTANA_AGENT_UUID to exact env INSTANA_IS_BULL_CHILD_PROCESS.
This env is not documented INSTANA_AGENT_UUID.
| // @ts-ignore - Type 'string' is not assignable to type 'undefined' | ||
| // Probably because exports.agentUuid is set to undefined and export values were not supposed to be changed | ||
| // TODO: This has no effect. Remove! See comment above. | ||
| agentOpts.agentUuid = parentProcessAgentUuid; |
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.
Finally getting rid of this dirty code. It was not working anyway
5d0c09c to
05fc7a4
Compare
See comments.
refs #2002