Skip to content

Commit

Permalink
Merge pull request #118 from DataDog/anmarchenko/remove_operation_name
Browse files Browse the repository at this point in the history
[CIVIS-2985] remove operation_name from integrations
  • Loading branch information
anmarchenko authored Jan 30, 2024
2 parents 110875d + c47f841 commit 865a717
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 77 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ end
| --- | ----------- | ------- |
| `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
| `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
| `operation_name` | *DEPRECATED, to be removed in 1.0* Operation name used for `rspec` instrumentation (has no effect in agentless mode or when using newer agent versions). | `'rspec.example'` |

### Minitest

Expand Down Expand Up @@ -85,7 +84,6 @@ end
| --- | ----------- | ------- |
| `enabled` | Defines whether Minitest tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
| `service_name` | Service name used for `minitest` instrumentation. | `'minitest'` |
| `operation_name` | *DEPRECATED, to be removed in 1.0* Operation name used for `minitest` instrumentation (has no effect in agentless mode or when using newer agent versions). | `'minitest.test'` |

### Cucumber

Expand Down Expand Up @@ -116,7 +114,6 @@ end
| --- | ----------- | ------- |
| `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
| `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
| `operation_name` | *DEPRECATED, to be removed in 1.0* Operation name used for `cucumber` instrumentation (has no effect in agentless mode or when using newer agent versions). | `'cucumber.test'` |

## Agentless mode

Expand Down
15 changes: 0 additions & 15 deletions lib/datadog/ci/contrib/cucumber/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ class Settings < Datadog::CI::Contrib::Settings
Utils::Configuration.fetch_service_name(Ext::DEFAULT_SERVICE_NAME)
end
end

# @deprecated Will be removed in 1.0
option :operation_name do |o|
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value && value != Ext::OPERATION_NAME
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
end
Expand Down
6 changes: 1 addition & 5 deletions lib/datadog/ci/contrib/cucumber/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ module CI
module Contrib
module Cucumber
# Cucumber integration constants
# TODO: mark as `@public_api` when GA, to protect from resource and tag name changes.
# @public_api
module Ext
ENV_ENABLED = "DD_TRACE_CUCUMBER_ENABLED"
DEFAULT_SERVICE_NAME = "cucumber"

FRAMEWORK = "cucumber"

STEP_SPAN_TYPE = "step"

# TODO: remove in 1.0
ENV_OPERATION_NAME = "DD_TRACE_CUCUMBER_OPERATION_NAME"
OPERATION_NAME = "cucumber.test"
end
end
end
Expand Down
15 changes: 0 additions & 15 deletions lib/datadog/ci/contrib/minitest/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ class Settings < Datadog::CI::Contrib::Settings
Utils::Configuration.fetch_service_name(Ext::DEFAULT_SERVICE_NAME)
end
end

# @deprecated Will be removed in 1.0
option :operation_name do |o|
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value && value != Ext::OPERATION_NAME
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
end
Expand Down
6 changes: 1 addition & 5 deletions lib/datadog/ci/contrib/minitest/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ module CI
module Contrib
module Minitest
# Minitest integration constants
# TODO: mark as `@public_api` when GA, to protect from resource and tag name changes.
# @public_api
module Ext
ENV_ENABLED = "DD_TRACE_MINITEST_ENABLED"

FRAMEWORK = "minitest"

DEFAULT_SERVICE_NAME = "minitest"

# TODO: remove in 1.0
ENV_OPERATION_NAME = "DD_TRACE_MINITEST_OPERATION_NAME"
OPERATION_NAME = "minitest.test"
end
end
end
Expand Down
15 changes: 0 additions & 15 deletions lib/datadog/ci/contrib/rspec/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ class Settings < Datadog::CI::Contrib::Settings
Utils::Configuration.fetch_service_name(Ext::DEFAULT_SERVICE_NAME)
end
end

# @deprecated Will be removed in 1.0
option :operation_name do |o|
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value && value != Ext::OPERATION_NAME
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
end
Expand Down
4 changes: 0 additions & 4 deletions lib/datadog/ci/contrib/rspec/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ module Ext
DEFAULT_SERVICE_NAME = "rspec"

ENV_ENABLED = "DD_TRACE_RSPEC_ENABLED"

# TODO: remove in 1.0
ENV_OPERATION_NAME = "DD_TRACE_RSPEC_OPERATION_NAME"
OPERATION_NAME = "rspec.example"
end
end
end
Expand Down
3 changes: 0 additions & 3 deletions lib/datadog/ci/contrib/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ class Settings
option :enabled, default: true
option :service_name

# @deprecated Will be removed in 1.0
option :operation_name

def configure(options = {})
self.class.options.each do |name, _value|
self[name] = options[name] if options.key?(name)
Expand Down
4 changes: 0 additions & 4 deletions sig/datadog/ci/contrib/cucumber/ext.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ module Datadog
module Ext
ENV_ENABLED: String

ENV_OPERATION_NAME: String

FRAMEWORK: String

OPERATION_NAME: String

DEFAULT_SERVICE_NAME: String

STEP_SPAN_TYPE: String
Expand Down
4 changes: 0 additions & 4 deletions sig/datadog/ci/contrib/minitest/ext.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ module Datadog
module Ext
ENV_ENABLED: String

ENV_OPERATION_NAME: String

FRAMEWORK: String

OPERATION_NAME: String

DEFAULT_SERVICE_NAME: String
end
end
Expand Down
3 changes: 0 additions & 3 deletions sig/datadog/ci/contrib/rspec/ext.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ module Datadog

FRAMEWORK: String
DEFAULT_SERVICE_NAME: String

OPERATION_NAME: String
ENV_OPERATION_NAME: String
end
end
end
Expand Down
1 change: 0 additions & 1 deletion sig/datadog/ci/contrib/settings.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Datadog
#
def enabled: () -> bool
def service_name: () -> String
def operation_name: () -> String
end
end
end
Expand Down

0 comments on commit 865a717

Please sign in to comment.