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

instrumentation config: use :unsatisfied #2011

Merged
merged 1 commit into from
May 18, 2023
Merged

instrumentation config: use :unsatisfied #2011

merged 1 commit into from
May 18, 2023

Conversation

fallwith
Copy link
Contributor

With 1930 the agent will now automatically convert any configured instrumentation value of :auto into either :prepend or :chain once the determination of which approach to take has been dynamically determined.

This will allow the agent's config to be inspected after the :prepend / :chain determination is made to see what :auto actually becomes under the hood.

But 1930 left an edge case gap open in the form of not allowing the configuration to convey instrumentation with unsatisfied dependencies. If a config value is set to :prepend or :chain in the configuration (overriding the default :auto value) and a dependency is unsatisfied (the library to instrument is not found on the system, it is of an unsupported version, etc.) then the value would end up staying as :prepend or :chain and incorrectly convey to anyone inspecting the config that a certain method of instrumentation was used when in actuality no instrumentation was performed at all.

Now, if an instrumentation's dependencies are unsatisfied, the corresponding configuration value will be updated with a value of :unsatisfied.

With [1930](#1930)
the agent will now automatically convert any configured instrumentation
value of `:auto` into either `:prepend` or `:chain` once the
determination of which approach to take has been dynamically determined.

This will allow the agent's config to be inspected after the
`:prepend` / `:chain` determination is made to see what `:auto` actually
becomes under the hood.

But 1930 left an edge case gap open in the form of not allowing the
configuration to convey instrumentation with unsatisfied dependencies.
If a config value is set to `:prepend` or `:chain` in the configuration
(overriding the default `:auto` value) and a dependency is unsatisfied
(the library to instrument is not found on the system, it is of an
unsupported version, etc.) then the value would end up staying as
`:prepend` or `:chain` and incorrectly convey to anyone inspecting the
config that a certain method of instrumentation was used when in
actuality no instrumentation was performed at all.

Now, if an instrumentation's dependencies are unsatisfied, the
corresponding configuration value will be updated with a value of
`:unsatisfied`.
@github-actions
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 94.07% 93%
Branch 85.48% 85%

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