Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work towards fixing #1072
This PR removes the ability to explicitly set the tracer instance on a
Datadog::Pin
object. This is problematic because most call sites were resolving the tracer instance at "patch" time, which normally happens very early in the application life-cycle. This causes any updates to the tracer instance to not be captured by integrations using the pin.All references to the tracer by pins have been replace with an indirect reference to the tracer though the integration configuration (e.g.
tracer: ->{ Datadog.configuration[:redis][tracer] }
). This allows for configuration to still take place at integration level. One thing to note is that:tracer
in our integration configurations, when not set, defaults to delegating to->{ Datadog.tracer }
, which is now the most common code path.The API being removed in this PR is not public nor externally documented.
For some background information, we use this
Pin
internally to store configuration information for integrations that instantiate new client objects (e.g. aConnection
from an HTTP client library) and that require different settings for different client objects (e.g. HTTP connections to domaininternal.com
have a differentservice_name
than domainexternal.com
).