mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
ff6c8d4b30
## Summary - Add `UK1` and `US2-FED` to the Datadog region dropdown in the log drains studio UI - Add the same two regions to the Datadog region list in the log-drains docs page The Logflare backend added support for these two Datadog regions in [Logflare/logflare#3790](https://github.com/Logflare/logflare/pull/3790) (shipped in v1.50.1), but the studio dropdown and docs were never updated, so customers on UK1 or US2-FED couldn't actually select their region when setting up a Datadog log drain. ## Test plan - [ ] Open Project Settings → Log Drains → add a Datadog destination and confirm UK1 and US2-FED appear in the Region dropdown - [ ] Confirm a log drain configured with `UK1`/`US2-FED` saves and sends events successfully <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for configuring Datadog log drains in the UK1 and US2-FED regions. * **Documentation** * Updated the monitoring and debugging guide with the UK1 Datadog region. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
142 lines
3.2 KiB
TypeScript
142 lines
3.2 KiB
TypeScript
import { components } from 'api-types'
|
|
import { Axiom, Datadog, Grafana, Last9, Otlp, Sentry } from 'icons'
|
|
import { BracesIcon, Cloud, Server } from 'lucide-react'
|
|
|
|
const iconProps = {
|
|
height: 24,
|
|
width: 24,
|
|
className: 'text-foreground-light',
|
|
}
|
|
|
|
export type LogDrainType = components['schemas']['CreateBackendParamsOpenapi']['type']
|
|
|
|
export const LOG_DRAIN_TYPES = [
|
|
{
|
|
value: 'webhook',
|
|
name: 'Custom Endpoint',
|
|
description: 'Forward logs as a POST request to a custom HTTP endpoint',
|
|
icon: <BracesIcon {...iconProps} />,
|
|
},
|
|
{
|
|
value: 'otlp',
|
|
name: 'OpenTelemetry Protocol (OTLP)',
|
|
description: 'Send logs to any OpenTelemetry Protocol (OTLP) compatible endpoint',
|
|
icon: <Otlp {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'datadog',
|
|
name: 'Datadog',
|
|
description: 'Datadog is a monitoring service for cloud-scale applications',
|
|
icon: <Datadog {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'loki',
|
|
name: 'Loki',
|
|
description:
|
|
'Loki is an open-source log aggregation system designed to store and query logs from multiple sources',
|
|
icon: <Grafana {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 's3',
|
|
name: 'Amazon S3',
|
|
description: 'Forward logs to an S3 bucket',
|
|
icon: <Cloud {...iconProps} />,
|
|
},
|
|
{
|
|
value: 'sentry',
|
|
name: 'Sentry',
|
|
description:
|
|
'Sentry is an application monitoring service that helps developers identify and debug performance issues and errors',
|
|
icon: <Sentry {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'axiom',
|
|
name: 'Axiom',
|
|
description:
|
|
'Axiom is a data platform designed to efficiently collect, store, and analyze event and telemetry data at massive scale.',
|
|
icon: <Axiom {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'last9',
|
|
name: 'Last9',
|
|
description: 'Last9 is an observability platform for monitoring and telemetry data',
|
|
icon: <Last9 {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'syslog',
|
|
name: 'Syslog',
|
|
description: 'Forward logs to a remote Syslog receiver using TCP or TLS, adhering to RFC 5424',
|
|
icon: <Server {...iconProps} />,
|
|
},
|
|
] as const
|
|
|
|
export const LOG_DRAIN_SOURCE_VALUES = LOG_DRAIN_TYPES.map((source) => source.value)
|
|
|
|
export const DATADOG_REGIONS = [
|
|
{
|
|
label: 'AP1',
|
|
value: 'AP1',
|
|
},
|
|
{
|
|
label: 'AP2',
|
|
value: 'AP2',
|
|
},
|
|
{
|
|
label: 'EU',
|
|
value: 'EU',
|
|
},
|
|
{
|
|
label: 'UK1',
|
|
value: 'UK1',
|
|
},
|
|
{
|
|
label: 'US1',
|
|
value: 'US1',
|
|
},
|
|
{
|
|
label: 'US1-FED',
|
|
value: 'US1-FED',
|
|
},
|
|
{
|
|
label: 'US2-FED',
|
|
value: 'US2-FED',
|
|
},
|
|
{
|
|
label: 'US3',
|
|
value: 'US3',
|
|
},
|
|
{
|
|
label: 'US5',
|
|
value: 'US5',
|
|
},
|
|
] as const
|
|
|
|
export const LAST9_REGIONS = [
|
|
{
|
|
label: 'US West 1',
|
|
value: 'US-WEST-1',
|
|
},
|
|
{
|
|
label: 'AP South 1',
|
|
value: 'AP-SOUTH-1',
|
|
},
|
|
] as const
|
|
|
|
export type LogDrainDatadogConfig = {
|
|
api_key: string
|
|
region: string
|
|
}
|
|
|
|
export type LogDrainWebhookConfig = {
|
|
url: string
|
|
}
|
|
|
|
export const OTLP_PROTOCOLS = [{ label: 'HTTP/Protobuf', value: 'http/protobuf' }] as const
|
|
|
|
export type LogDrainOtlpConfig = {
|
|
endpoint: string
|
|
protocol?: string
|
|
gzip?: boolean
|
|
headers?: Record<string, string>
|
|
}
|