forked from GaloyMoney/charts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from brh28/staging
Open-telemetry deployment via Terraform
- Loading branch information
Showing
18 changed files
with
283 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
variable "HONEYCOMB_API_KEY" { | ||
description = "The api key to write open-telemetry data to Honeycomb" | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
resource "kubernetes_namespace" "otel" { | ||
metadata { | ||
name = "otel" | ||
} | ||
} | ||
|
||
resource "helm_release" "collector" { | ||
repository = "https://open-telemetry.github.io/opentelemetry-helm-charts" | ||
chart = "opentelemetry-collector" | ||
version = "0.68.1" | ||
name = "opentelemetry-collector" | ||
namespace = kubernetes_namespace.otel.metadata[0].name | ||
|
||
values = [ | ||
# file("${path.module}/staging-values.yaml"), | ||
# { | ||
# extraEnvs = [ | ||
# { | ||
# name = "HONEYCOMB_API_KEY" | ||
# value = var.HONEYCOMB_API_KEY | ||
# } | ||
# ] | ||
# } | ||
|
||
# This approach treats MY_POD_IP as a template parameter | ||
templatefile("${path.module}/staging-values.yaml", { | ||
HONEYCOMB_API_KEY = var.HONEYCOMB_API_KEY | ||
}) | ||
] | ||
# { | ||
# extraEnvs = [ | ||
# { | ||
# name = "HONEYCOMB_API_KEY" | ||
# value = var.HONEYCOMB_API_KEY} | ||
# } | ||
# ] | ||
# } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
|
||
enabled: true | ||
resources: {} | ||
mode: deployment | ||
config: | ||
exporters: | ||
logging: {} | ||
otlp: | ||
endpoint: "api.honeycomb.io:443" | ||
headers: | ||
x-honeycomb-team: ${HONEYCOMB_API_KEY} | ||
x-honeycomb-dataset: "flash-staging" | ||
otlp/metrics: | ||
endpoint: api.honeycomb.io:443 | ||
headers: | ||
x-honeycomb-team: ${HONEYCOMB_API_KEY} | ||
x-honeycomb-dataset: flash-staging-metrics | ||
otlp/logging: | ||
endpoint: api.honeycomb.io:443 | ||
headers: | ||
x-honeycomb-team: ${HONEYCOMB_API_KEY} | ||
x-honeycomb-dataset: flash-staging-logs | ||
extensions: | ||
health_check: {} | ||
processors: | ||
batch: {} | ||
tail_sampling: | ||
policies: | ||
- name: status_code | ||
type: status_code | ||
status_code: | ||
status_codes: [ERROR] | ||
- name: probabilistic | ||
type: probabilistic | ||
probabilistic: { sampling_percentage: 100 } | ||
attributes: | ||
actions: | ||
- key: graphql.variables.input.code | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.code | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.token | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.cookie | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.authToken | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.totpCode | ||
action: update | ||
value: "<redacted>" | ||
- key: code.function.params.body | ||
action: update | ||
value: "<redacted>" | ||
# - key: code.function.params.macaroon | ||
# action: update | ||
# If set to null, will be overridden with values based on k8s resource limits | ||
memory_limiter: null | ||
resourcedetection: | ||
detectors: [env, gcp] | ||
timeout: 5s | ||
override: false | ||
k8sattributes: | ||
passthrough: true | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:14250 | ||
thrift_http: | ||
endpoint: 0.0.0.0:14268 | ||
thrift_compact: | ||
endpoint: 0.0.0.0:6831 | ||
thrift_binary: | ||
endpoint: 0.0.0.0:6832 | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:4318 | ||
prometheus: | ||
config: | ||
scrape_configs: | ||
- job_name: opentelemetry-collector | ||
scrape_interval: 10s | ||
# static_configs: | ||
# - targets: | ||
# - $\{MY_POD_IP\}:8888 | ||
service: | ||
extensions: | ||
- health_check | ||
pipelines: | ||
logs: | ||
exporters: | ||
- logging | ||
processors: | ||
- memory_limiter | ||
- batch | ||
receivers: | ||
- otlp | ||
metrics: | ||
exporters: | ||
- logging | ||
processors: | ||
- memory_limiter | ||
- batch | ||
receivers: | ||
- otlp | ||
- prometheus | ||
traces: | ||
exporters: | ||
- logging | ||
- otlp | ||
processors: | ||
- memory_limiter | ||
- resourcedetection | ||
- attributes | ||
- k8sattributes | ||
- tail_sampling | ||
- batch | ||
receivers: | ||
- jaeger | ||
- otlp | ||
ports: | ||
otlp: | ||
enabled: true | ||
containerPort: 4317 | ||
servicePort: 4317 | ||
hostPort: 4317 | ||
protocol: TCP | ||
jaeger-thrift-b: | ||
enabled: true | ||
containerPort: 6832 | ||
servicePort: 6832 | ||
hostPort: 6832 | ||
protocol: UDP | ||
jaeger-thrift: | ||
enabled: true | ||
containerPort: 14268 | ||
servicePort: 14268 | ||
hostPort: 14268 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.