sentry-relay

by Das Meta

Helm chartv0.1.2App 0.1.0

A Helm chart for Kubernetes to create sentry relay with proxy, managed or static mode

About this chart

This helm chart allows to create sentry relay app in kubernetes cluster https://docs.sentry.io/product/relay/

Install: helm repo add dasmeta https://dasmeta.github.io/helm then helm upgrade --install my-relay dasmeta/sentry-relay -f values.yaml. Public values: values.yaml. Examples: examples/sentry-relay/. Replace upstream/credentials with your values (no literal secrets in examples).

Key values

KeyDescriptionDefault / Example
modeRelay mode: proxy, static, or managedproxy
upstreamSentry ingest URL (e.g. https://<ORG-ID>.ingest.sentry.io)required for proxy/managed
workloadK8s workload typeDaemonSet
loggingLevelLog levelinfo
credentialsRequired for managed mode; secretKey, publicKey, idcommented out by default
projectsRequired for static mode; project configscommented out by default

Here are values.yaml file structures for creation relay with sentry cloud by supported proxy, managed or static modes by using minimum configs.

NOTE:

  • By default it creates relay on proxy mode with DaemonSet workload
  • In case you created sentry cloud on europe region the upstream value is in form https://.ingest.de.sentry.io
  • It should be possible to use this chart also for non sentry cloud setups, but this is not tested yet

"proxy" mode (simplest mode without additional configs)

# file values-proxy-mode.yaml
upstream: https://<ORGANIZATION-ID>.ingest.sentry.io

"managed" mode (https://docs.sentry.io/product/relay/getting-started/#creating-credentials)

# file values-managed-mode.yaml
mode: managed
upstream: https://<ORGANIZATION-ID>.ingest.sentry.io
credentials:
  secretKey: "<SECRET-KEY>"
  publicKey: "<PUBLIC-KEY>"
  id: "<ID>"

"static" mode (https://docs.sentry.io/product/relay/projects/)

# file values-static-mode.yaml
mode: static
upstream: https://<ORGANIZATION-ID>.ingest.sentry.io
projects:
  "<PROJECT-ID>":
    slug: "<PROJECT-SLUG>"
    disabled: false
    publicKeys:
      - publicKey: "<PROJECT-PUBLIC-KEY>"
        isEnabled: true
    config:
      allowedDomains: ["*"]
      features: # this options can vary on different setups, please check
        - organizations:session-replay
        - organizations:session-replay-recording-scrubbing
        - organizations:session-replay-combined-envelope-items
        - organizations:session-replay-video-disabled
        - organizations:device-class-synthesis
        - organizations:custom-metrics
        - organizations:profiling
        - organizations:standalone-span-ingestion
        - projects:relay-otel-endpoint
        - projects:discard-transaction
        - organizations:continuous-profiling
        - projects:span-metrics-extraction
        - projects:span-metrics-extraction-addons
        - organizations:indexed-spans-extraction
        - organizations:performance-queries-mongodb-extraction

Deploy sentry-relay with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sentry-relay on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsentry-relay is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply