Skip to content

Commit b0625d0

Browse files
y9vvpellan
authored andcommitted
Add a guard for missing AppSec.telemetry in Endpoint Collection
1 parent 862e55a commit b0625d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/datadog/appsec/contrib/rails/patcher.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def report_routes_via_telemetry(routes)
152152
return unless Datadog.configuration.appsec.api_security.endpoint_collection.enabled
153153
return unless AppSec.telemetry
154154

155+
return unless AppSec.telemetry
156+
155157
GUARD_ROUTES_REPORTING_ONCE_PER_APP[::Rails.application].run do
156158
AppSec.telemetry.app_endpoints_loaded(
157159
APISecurity::EndpointCollection::RailsCollector.new(routes).to_enum

0 commit comments

Comments
 (0)