-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Rename Ext::ForcedTracing to Ext::ManualTracing (#765)
* [core] Rename Ext::ForcedTracing to Ext::ManualTracing * Do not use deprecate_constant for older version support
- Loading branch information
1 parent
7550873
commit 1522b9d
Showing
4 changed files
with
74 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
require 'ddtrace/ext/manual_tracing' | ||
require 'ddtrace/tracer' | ||
|
||
module Datadog | ||
module Ext | ||
# Defines constants for forced tracing | ||
module ForcedTracing | ||
TAG_KEEP = 'manual.drop'.freeze | ||
TAG_DROP = 'manual.keep'.freeze | ||
@deprecation_warning_shown = false | ||
|
||
def self.const_missing(name) | ||
super unless Ext::ManualTracing.const_defined?(name) | ||
|
||
# Only log each deprecation warning once (safeguard against log spam) | ||
unless @deprecation_warning_shown | ||
Datadog::Tracer.log.warn( | ||
'forced tracing: Datadog::Ext::ForcedTracing has been renamed to Datadog::Ext::ManualTracing' | ||
) | ||
@deprecation_warning_shown = true | ||
end | ||
|
||
Ext::ManualTracing.const_get(name) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Datadog | ||
module Ext | ||
# Defines constants for manual tracing | ||
module ManualTracing | ||
TAG_KEEP = 'manual.keep'.freeze | ||
TAG_DROP = 'manual.drop'.freeze | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters