From a3726fd79f392a49d7535c3d4fcd079a993d27d0 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 19 Dec 2024 11:37:16 +0000 Subject: [PATCH] Delete old header bidding endpoint (#27678) --- .../controllers/CommercialControllers.scala | 1 - .../PrebidAnalyticsController.scala | 18 ------------------ commercial/conf/routes | 3 --- common/app/common/configuration.scala | 2 -- common/app/http/RequestLoggingFilter.scala | 4 ++-- dev-build/conf/routes | 1 - 6 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 commercial/app/controllers/PrebidAnalyticsController.scala diff --git a/commercial/app/controllers/CommercialControllers.scala b/commercial/app/controllers/CommercialControllers.scala index 3dc6767bde62..9533b212e3f6 100644 --- a/commercial/app/controllers/CommercialControllers.scala +++ b/commercial/app/controllers/CommercialControllers.scala @@ -25,7 +25,6 @@ trait CommercialControllers { lazy val piggybackPixelController = wire[PiggybackPixelController] lazy val cmpDataController = wire[CmpDataController] lazy val adsDotTextFileController = wire[AdsDotTextViewController] - lazy val prebidAnalyticsController = wire[PrebidAnalyticsController] lazy val passbackController = wire[PassbackController] lazy val ampIframeHtmlController = wire[AmpIframeHtmlController] lazy val nonRefreshableLineItemsController = wire[nonRefreshableLineItemsController] diff --git a/commercial/app/controllers/PrebidAnalyticsController.scala b/commercial/app/controllers/PrebidAnalyticsController.scala deleted file mode 100644 index 788511f6701b..000000000000 --- a/commercial/app/controllers/PrebidAnalyticsController.scala +++ /dev/null @@ -1,18 +0,0 @@ -package commercial.controllers - -import common.GuLogging -import conf.Configuration.commercial.prebidAnalyticsStream -import conf.switches.Switches -import play.api.mvc._ - -import scala.concurrent.ExecutionContext - -class PrebidAnalyticsController(val controllerComponents: ControllerComponents) extends BaseController with GuLogging { - - private implicit val ec: ExecutionContext = controllerComponents.executionContext - - def insert(): Action[String] = - Action(parse.text) { implicit request => - Analytics.storeJsonBody(Switches.prebidAnalytics, prebidAnalyticsStream, log)(request.body) - } -} diff --git a/commercial/conf/routes b/commercial/conf/routes index 39858ed971d7..f84e2e8c6471 100644 --- a/commercial/conf/routes +++ b/commercial/conf/routes @@ -41,9 +41,6 @@ GET /commercial/cmp/shortvendorlist.json GET /ads.txt commercial.controllers.AdsDotTextViewController.renderTextFile() GET /app-ads.txt commercial.controllers.AdsDotTextViewController.renderAppTextFile() -# Analytics -POST /commercial/api/hb commercial.controllers.PrebidAnalyticsController.insert() - # Passbacks GET /commercial/ias-passback/:size commercial.controllers.PassbackController.renderIasPassback(size) diff --git a/common/app/common/configuration.scala b/common/app/common/configuration.scala index 59d8e7f32ce9..93f1f98a064e 100644 --- a/common/app/common/configuration.scala +++ b/common/app/common/configuration.scala @@ -515,8 +515,6 @@ class GuardianConfiguration extends GuLogging { lazy val expiredPaidContentUrl = s"${site.host}/info/2015/feb/06/paid-content-removal-policy" - lazy val prebidAnalyticsStream = configuration.getMandatoryStringProperty("commercial.prebid.analytics.stream") - lazy val prebidServerUrl = configuration.getStringProperty("commercial.prebid.server.url") getOrElse "http://localhost:8000" diff --git a/common/app/http/RequestLoggingFilter.scala b/common/app/http/RequestLoggingFilter.scala index e2e95a3732ba..c66e9454d556 100644 --- a/common/app/http/RequestLoggingFilter.scala +++ b/common/app/http/RequestLoggingFilter.scala @@ -29,8 +29,8 @@ class RequestLoggingFilter(implicit val mat: Materializer, executionContext: Exe case _ => "" } } - // don't log uncacheable /commercial/api/hb POST requests due to the volume of them - if (rh.method != "POST" || rh.path != "/commercial/api/hb") { + // don't log uncacheable POST requests due to the volume of them + if (rh.method != "POST") { requestLogger.withResponse(response).info(s"${rh.method} ${rh.uri}$additionalInfo") } case Failure(error) => diff --git a/dev-build/conf/routes b/dev-build/conf/routes index 8329b0371330..8e33f238fb36 100644 --- a/dev-build/conf/routes +++ b/dev-build/conf/routes @@ -279,7 +279,6 @@ GET /commercial/non-refreshable-line-items.json GET /ads.txt commercial.controllers.AdsDotTextViewController.renderTextFile() GET /app-ads.txt commercial.controllers.AdsDotTextViewController.renderAppTextFile() GET /commercial/ias-passback/:size commercial.controllers.PassbackController.renderIasPassback(size) -POST /commercial/api/hb commercial.controllers.PrebidAnalyticsController.insert() # Commercial Admin GET /commercial controllers.admin.CommercialController.renderCommercialMenu()