Skip to content
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

feat: do not run nodejs agent for unsupported node runtimes #1528

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

blumamir
Copy link
Collaborator

@blumamir blumamir commented Sep 20, 2024

At the moment, nodejs agent will import all it's dependencies when it starts. Those might pull in code that is not compatible with old node runtimes, and cause an exception in agent code.

This PR makes it so that the agent is only loaded if the nodejs version is supported, and silently catch and ignore any exception from the agent.

This PR extract the compiling of the nodejs agent to a separate docker build stage, a bit simplifying the dockerfile

If the nodejs runtime version was detected in language detection, the instrumentation device should not even be injected and the agent should not be loaded. However, if the runtime details is not detected, or some other situation causes the agent to run on an old node runtime, the agent should handle it and not cause any issues for application

@blumamir blumamir requested a review from edeNFed September 20, 2024 14:13
@blumamir blumamir merged commit fda3173 into odigos-io:main Sep 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants