integrations

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package integrations holds the curated catalog of third-party tools an app can attach (internal/catalog's deployable-template catalog is unrelated: this is per-app add-ons, not services to deploy). v1 scope is env-var injection only, no webhook or API wiring, per the approved design in the framework-native deploys design item 6.

Index

Constants

View Source
const (
	FieldTypeAPIKey    = "api_key"
	FieldTypeDSN       = "dsn"
	FieldTypeToken     = "token"
	FieldTypeProjectID = "project_id"
	FieldTypeSite      = "site"
	FieldTypeHost      = "host"
)

Field types are descriptive only, driving which input affordance the UI shows for a catalog entry's env var; nothing here validates a value against its type.

Variables

View Source
var Catalog = []Integration{
	{
		Key:         "sentry",
		Name:        "Sentry",
		Description: "Error tracking and performance monitoring. Self-hosted/OSS Sentry instances work too, point the DSN at your own instance.",
		DocsURL:     "https://docs.sentry.io/platforms/node/configuration/options/",
		EnvVars: []EnvVar{
			{Name: "SENTRY_DSN", Type: FieldTypeDSN, Required: true, Placeholder: "https://<key>@o0.ingest.sentry.io/0"},
		},
	},
	{
		Key:         "posthog",
		Name:        "PostHog",
		Description: "Product analytics, feature flags, and session replay. Self-hosted/OSS PostHog works too, set the host below.",
		DocsURL:     "https://posthog.com/docs/libraries/next-js",
		EnvVars: []EnvVar{
			{Name: "NEXT_PUBLIC_POSTHOG_KEY", Type: FieldTypeAPIKey, Required: true, Placeholder: "phc_..."},
			{Name: "NEXT_PUBLIC_POSTHOG_HOST", Type: FieldTypeHost, Required: false, Default: "https://us.i.posthog.com", Placeholder: "https://us.i.posthog.com"},
		},
		Frameworks: []string{"nextjs"},
	},
	{
		Key:         "glitchtip",
		Name:        "GlitchTip",
		Description: "Free, self-hosted, open-source error tracking. Sentry-SDK-compatible: reads the same SENTRY_DSN, existing Sentry SDKs work unchanged.",
		DocsURL:     "https://glitchtip.com/sdkdocs/node",
		EnvVars: []EnvVar{
			{Name: "SENTRY_DSN", Type: FieldTypeDSN, Required: true, Placeholder: "https://<key>@glitchtip.example.com/0"},
		},
	},
	{
		Key:         "oneuptime",
		Name:        "OneUptime",
		Description: "Open-source, self-hostable error tracking, uptime monitoring, incidents, logs, and APM over OpenTelemetry.",
		DocsURL:     "https://oneuptime.com/docs/en/telemetry/open-telemetry",
		EnvVars: []EnvVar{
			{Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Type: FieldTypeHost, Required: false, Default: "https://oneuptime.com/otlp", Placeholder: "https://oneuptime.example.com/otlp"},
			{Name: "OTEL_EXPORTER_OTLP_HEADERS", Type: FieldTypeToken, Required: true, Placeholder: "x-oneuptime-token=<service-token>"},
			{Name: "OTEL_SERVICE_NAME", Type: FieldTypeProjectID, Required: false, Placeholder: "my-service"},
		},
	},
	{
		Key:         "plausible",
		Name:        "Plausible",
		Description: "Privacy-first, self-hostable web analytics. Lighter-weight alternative to PostHog for pageview and visitor stats only.",
		DocsURL:     "https://plausible.io/docs/nextjs-integration",
		EnvVars: []EnvVar{
			{Name: "NEXT_PUBLIC_PLAUSIBLE_DOMAIN", Type: FieldTypeSite, Required: true, Placeholder: "app.example.com"},
			{Name: "NEXT_PUBLIC_PLAUSIBLE_API_HOST", Type: FieldTypeHost, Required: false, Default: "https://plausible.io", Placeholder: "https://plausible.example.com"},
		},
		Frameworks: []string{"nextjs"},
	},
	{
		Key:         "datadog",
		Name:        "Datadog",
		Description: "APM tracing, infrastructure, and log monitoring.",
		DocsURL:     "https://docs.datadoghq.com/tracing/trace_collection/library_config/nodejs/",
		EnvVars: []EnvVar{
			{Name: "DD_API_KEY", Type: FieldTypeAPIKey, Required: true},
			{Name: "DD_SITE", Type: FieldTypeSite, Required: false, Default: "datadoghq.com", Placeholder: "datadoghq.com"},
		},
	},
	{
		Key:         "axiom",
		Name:        "Axiom",
		Description: "Log and event data platform.",
		DocsURL:     "https://axiom.co/docs/send-data/nextjs",
		EnvVars: []EnvVar{
			{Name: "AXIOM_TOKEN", Type: FieldTypeToken, Required: true},
			{Name: "AXIOM_DATASET", Type: FieldTypeProjectID, Required: true, Placeholder: "my-dataset"},
		},
		Frameworks: []string{"nextjs"},
	},
	{
		Key:         "betterstack",
		Name:        "Better Stack",
		Description: "Log management and uptime monitoring.",
		DocsURL:     "https://betterstack.com/docs/logs/javascript/install/",
		EnvVars: []EnvVar{
			{Name: "LOGTAIL_SOURCE_TOKEN", Type: FieldTypeToken, Required: true},
		},
	},
	{
		Key:         "logsnag",
		Name:        "LogSnag",
		Description: "Real-time event notifications and analytics.",
		DocsURL:     "https://docs.logsnag.com/quick-start",
		EnvVars: []EnvVar{
			{Name: "LOGSNAG_TOKEN", Type: FieldTypeToken, Required: true},
			{Name: "LOGSNAG_PROJECT", Type: FieldTypeProjectID, Required: true, Placeholder: "my-project"},
		},
	},
	{
		Key:         "bugsnag",
		Name:        "BugSnag",
		Description: "Error monitoring and stability management.",
		DocsURL:     "https://docs.bugsnag.com/platforms/javascript/",
		EnvVars: []EnvVar{
			{Name: "BUGSNAG_API_KEY", Type: FieldTypeAPIKey, Required: true},
		},
	},
	{
		Key:         "newrelic",
		Name:        "New Relic",
		Description: "Full-stack observability and APM.",
		DocsURL:     "https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/install-nodejs-agent/",
		EnvVars: []EnvVar{
			{Name: "NEW_RELIC_LICENSE_KEY", Type: FieldTypeAPIKey, Required: true},
		},
	},
}

Catalog is every integration an app can attach, source of GET /api/v1/integrations. Env var names below are verified against each vendor's own current setup docs (DocsURL), not guessed.

Functions

This section is empty.

Types

type EnvVar

type EnvVar struct {
	Name     string
	Type     string
	Required bool
	// Default is injected when Required is false and no value was
	// supplied at attach time, e.g. PostHog's host defaulting to its US
	// cloud region.
	Default     string
	Placeholder string
}

EnvVar is one environment variable a catalog Integration injects into an attached app's container. Name is the exact variable name the vendor's own SDK reads, verified against that vendor's current docs (DocsURL on the owning Integration), never guessed.

type Integration

type Integration struct {
	Key         string
	Name        string
	Description string
	DocsURL     string
	EnvVars     []EnvVar
	// Frameworks names the frameworks this integration is most relevant
	// for, matching internal/build's detected framework identifiers once
	// that detection work lands (framework-native deploys design, item 2). Empty means
	// relevant regardless of framework: this catalog must degrade
	// gracefully with no framework detected at all, not depend on it.
	Frameworks []string
}

Integration is one curated tool an app can attach.

func Get

func Get(key string) (Integration, bool)

Get returns the catalog entry for key, or ok=false if key doesn't match any entry (e.g. removed from the catalog after an app already attached it).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL