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

Use full URL in http.url tag #2265

Merged
merged 9 commits into from
Sep 23, 2022
Merged
Prev Previous commit
Disable Metrics/ClassLength cop
In practice this cop seems to be disabled as soon as we reach the limit.
  • Loading branch information
lloeki committed Sep 23, 2022
commit 8c848ecb8bfef47e37ffaeddcb53ea2aa9f75a41
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Style/NumericLiterals:
Enabled: false

Metrics/ClassLength:
Max: 140
Enabled: false

Metrics/BlockLength:
Max: 42
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog/appsec/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module AppSec
module Configuration
# Configuration settings, acting as an integration registry
# TODO: as with Configuration, this is a trivial implementation
# rubocop:disable Metrics/ClassLength
class Settings
class << self
def boolean
Expand Down Expand Up @@ -188,7 +187,6 @@ def reset!
initialize
end
end
# rubocop:enable Metrics/ClassLength
end
end
end
3 changes: 0 additions & 3 deletions lib/datadog/core/configuration/agent_settings_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ module Configuration
#
# Whenever there is a conflict (different configurations are provided in different orders), it MUST warn the users
# about it and pick a value based on the following priority: code > environment variable > defaults.
#
# rubocop:disable Metrics/ClassLength
class AgentSettingsResolver
AgentSettings = \
Struct.new(
Expand Down Expand Up @@ -359,7 +357,6 @@ def adapter(kind_or_custom_adapter, *args, **kwargs)
end
end
end
# rubocop:enable Metrics/ClassLength
end
end
end
2 changes: 0 additions & 2 deletions lib/datadog/core/configuration/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Datadog
module Core
module Configuration
# Global components for the trace library.
# rubocop:disable Metrics/ClassLength
class Components
class << self
def build_health_metrics(settings)
Expand Down Expand Up @@ -431,7 +430,6 @@ def shutdown!(replacement = nil)
telemetry.emit_closing! unless replacement
end
end
# rubocop:enable Metrics/ClassLength
end
end
end
3 changes: 0 additions & 3 deletions lib/datadog/core/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module Configuration
# Global configuration settings for the trace library.
# @public_api
# rubocop:disable Metrics/BlockLength
# rubocop:disable Metrics/ClassLength
# rubocop:disable Layout/LineLength
class Settings
include Base
Expand Down Expand Up @@ -713,9 +712,7 @@ def initialize(*_)
end
end
end

# rubocop:enable Metrics/BlockLength
# rubocop:enable Metrics/ClassLength
# rubocop:enable Layout/LineLength
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/profiling/collectors/old_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Collectors
# Runs on its own background thread.
#
# This class has the prefix "Old" because it will be deprecated by the new native CPU Profiler
class OldStack < Core::Worker # rubocop:disable Metrics/ClassLength
class OldStack < Core::Worker
include Core::Workers::Polling

DEFAULT_MAX_TIME_USAGE_PCT = 2.0
Expand Down
3 changes: 0 additions & 3 deletions lib/datadog/tracing/contrib/rack/middlewares.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ module Rack
# in the Rack environment so that it can be retrieved by the underlying
# application. If request tags are not set by the app, they will be set using
# information available at the Rack level.
#
# rubocop:disable Metrics/ClassLength
class TraceMiddleware
def initialize(app)
@app = app
Expand Down Expand Up @@ -309,7 +307,6 @@ def parse_response_headers(headers)
end
end
end
# rubocop:enable Metrics/ClassLength
end
end
end
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog/tracing/span_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Tracing
# It gives a Span a context which can be used to
# build a Span. When completed, it yields the Span.
#
# rubocop:disable Metrics/ClassLength
# @public_api
class SpanOperation
include Metadata
Expand Down Expand Up @@ -516,6 +515,5 @@ def duration_nano
alias :span_type :type
alias :span_type= :type=
end
# rubocop:enable Metrics/ClassLength
end
end
2 changes: 0 additions & 2 deletions lib/datadog/tracing/trace_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module Tracing
# For async support, a {Datadog::Tracing::TraceOperation} should be employed
# per execution context (e.g. Thread, etc.)
#
# rubocop:disable Metrics/ClassLength
# @public_api
class TraceOperation
include Metadata::Tagging
Expand Down Expand Up @@ -454,6 +453,5 @@ def build_trace(spans, partial = false)
)
end
end
# rubocop:enable Metrics/ClassLength
end
end
2 changes: 0 additions & 2 deletions lib/datadog/tracing/trace_segment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module Datadog
module Tracing
# Serializable construct representing a trace
# @public_api
# rubocop:disable Metrics/ClassLength
class TraceSegment
TAG_NAME = 'name'.freeze
TAG_RESOURCE = 'resource'.freeze
Expand Down Expand Up @@ -203,6 +202,5 @@ def service_tag
meta[TAG_SERVICE]
end
end
# rubocop:enable Metrics/ClassLength
end
end
2 changes: 0 additions & 2 deletions lib/datadog/tracing/tracer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module Tracing
# example, a trace can be used to track the entire time spent processing a complicated web request.
# Even though the request may require multiple resources and machines to handle the request, all
# of these function calls and sub-requests would be encapsulated within a single trace.
# rubocop:disable Metrics/ClassLength
class Tracer
attr_reader \
:trace_flush,
Expand Down Expand Up @@ -528,6 +527,5 @@ def skip_trace(name)
end
end
end
# rubocop:enable Metrics/ClassLength
end
end