mirror of
https://github.com/supabase/supabase.git
synced 2026-09-06 18:11:51 +08:00
## Summary Brings the Log Drains docs up to the same standard as the Metrics API page. - Replaces the plain destination table with a visual `LogDrainDestinationCards` component — a 3-column card grid that mirrors the product UI destination picker. Cards link to anchors on the same page (no sub-pages needed since setup is simpler than Metrics). - Adds a "What you can do" intro section and a consistent "Required configuration + Steps" structure for every destination. - Adds two destinations that were missing from the docs entirely: **Last9** and **Syslog** (both are live in the product). Config fields sourced from `LogDrainDestinationSheetForm.tsx`. - Cleans up raw `<ul><li>` HTML to markdown lists. - Adds an "Additional resources" footer (pricing, Metrics API, JS SDK tracing). ## Files changed - `apps/docs/content/guides/telemetry/log-drains.mdx` — core of the changes - `apps/docs/components/LogDrainDestinationCards.tsx` — new card grid component - `apps/docs/components/LogDrainDestinationCards.data.ts` — destination data (9 entries) - `apps/docs/internals/markdown-schema/LogDrainDestinationCards.ts` — markdown fallback renderer - `apps/docs/features/docs/MdxBase.shared.tsx` — register new component - `apps/docs/internals/generate-guides-markdown.ts` — register new component ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? docs update ## What is the current behavior? not supanice, also missing syslog and last9 <img width="619" height="687" alt="image" src="https://github.com/user-attachments/assets/58e8f07c-eb40-4d30-a5e2-3988d1af87c2" /> ## What is the new behavior? hopefully more supanice, also added syslog and last9 <img width="568" height="667" alt="image" src="https://github.com/user-attachments/assets/be61e67f-58aa-4e8c-be0d-44206f1b16de" /> ## Additional context <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Reorganized the Log Drains guide with destination-specific sections and a new destination chooser. * Added support and setup guidance for Last9 and Syslog destinations. * Clarified HTTP batching, JSON delivery, compression, authentication, and endpoint requirements. * Updated OpenTelemetry, Datadog, Loki, Amazon S3, Sentry, and Axiom instructions. * Added Edge Function examples covering compressed and uncompressed payloads. * Added links to pricing, Metrics API, and JavaScript tracing resources. * **UI Improvements** * Updated destination listings with clearer, consistent icons and presentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nik Richers <nik@validmind.ai>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
'use client'
|
|
|
|
import { Axiom, Datadog, Grafana, Last9, Otlp, Sentry } from 'icons'
|
|
import { Braces, Cloud, Server } from 'lucide-react'
|
|
import type { ReactNode } from 'react'
|
|
|
|
import type { ContentListingIcon } from '~/lib/content-listings.schema'
|
|
|
|
type IconKind = Extract<ContentListingIcon, { kind: string }>['kind']
|
|
|
|
const ICON_KIND_COMPONENTS: Record<IconKind, ReactNode> = {
|
|
braces: <Braces className="h-5 w-5" strokeWidth={1.5} />,
|
|
otlp: <Otlp className="h-5 w-5" />,
|
|
datadog: <Datadog className="h-5 w-5" />,
|
|
grafana: <Grafana className="h-5 w-5" />,
|
|
cloud: <Cloud className="h-5 w-5" strokeWidth={1.5} />,
|
|
sentry: <Sentry className="h-5 w-5" />,
|
|
axiom: <Axiom className="h-5 w-5" />,
|
|
last9: <Last9 className="h-5 w-5" />,
|
|
server: <Server className="h-5 w-5" strokeWidth={1.5} />,
|
|
}
|
|
|
|
export function resolveContentListingIcon(
|
|
icon: ContentListingIcon | undefined
|
|
): ReactNode | string | undefined {
|
|
if (icon && typeof icon === 'object') {
|
|
return (
|
|
<span
|
|
className="flex h-10 w-10 items-center justify-center rounded-full text-base font-semibold"
|
|
style={{ color: icon.color, backgroundColor: icon.bg }}
|
|
>
|
|
{ICON_KIND_COMPONENTS[icon.kind]}
|
|
</span>
|
|
)
|
|
}
|
|
return icon
|
|
}
|