From 8d398e1714c37a23e6da927ee030169232e98c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 10 Jan 2025 10:59:28 +0100 Subject: [PATCH] Make datadog optional on staging --- README.md | 5 +++-- osu.Server.BeatmapSubmission/Program.cs | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5a1506c..40a2f9a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,8 @@ Depending on environment, this service changes behaviour with respect to interac - Local (filesystem-based) beatmap storage is used. - No purge requests to beatmap mirrors are made on beatmap updates. - Developer exception pages & API docs are disabled. - - Sentry & Datadog integrations are mandatory. + - Sentry integration is mandatory. + - Datadog integration is optional. - `ASPNETCORE_ENVIRONMENT=Production`: - S3-based beatmap storage is used. - Purge requests to beatmap mirrors are made on beatmap updates. @@ -62,5 +63,5 @@ Depending on environment, this service changes behaviour with respect to interac | `S3_CENTRAL_BUCKET_NAME` | The name of the S3 bucket to use for storing beatmap packages and versioned files. | ⚠ In production environment | None | | `S3_BEATMAPS_BUCKET_NAME` | The name of the S3 bucket to use for storing .osu beatmap files. | ⚠ In production environment | None | | `SENTRY_DSN` | A valid Sentry DSN to use for logging application events. | ⚠ In staging & production environment | None | -| `DD_AGENT_HOST` | A hostname pointing to a Datadog agent instance to which metrics should be reported. | ⚠ In staging & production environment | None | +| `DD_AGENT_HOST` | A hostname pointing to a Datadog agent instance to which metrics should be reported. | ⚠ In production environment | None | diff --git a/osu.Server.BeatmapSubmission/Program.cs b/osu.Server.BeatmapSubmission/Program.cs index 65bffe0..4e74299 100644 --- a/osu.Server.BeatmapSubmission/Program.cs +++ b/osu.Server.BeatmapSubmission/Program.cs @@ -73,12 +73,6 @@ public static void Main(string[] args) + "Please set the value of this variable to a valid Sentry DSN to use for logging events."); } - if (AppSettings.DatadogAgentHost == null) - { - throw new InvalidOperationException("DD_AGENT_HOST environment variable not set. " - + "Please set the value of this variable to a valid hostname of a Datadog agent."); - } - break; }