Skip to content

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Apr 10, 2025

Part of stackabletech/issues#639

Depends on

This adds the telemetry.envVars Helm helper to create a list of environment variables passed on the .telemetry values.

Example

Given these values form the Helm values.yaml file

telemetry:
  consoleLog:
    enabled: false
    level: warn
    format: json
  fileLog:
    enabled: true
    level: debug
    rotationPeriod: hourly
    maxFiles: 6
  otelLogExporter:
    enabled: true
    level: trace
    endpoint: my-collector:4317
  otelTraceExporter:
    enabled: true
    level: error
    endpoint: my-collector:4317

the rendered env block in the Deployment looks like

apiVersion: apps/v1
kind: Deployment
metadata:
  name: foo-operator-airflow-operator-deployment
spec:
  template:
    spec:
      containers:
        - name: airflow-operator
          env:
            - name: CONSOLE_LOG_DISABLED
              value: "true"
            - name: CONSOLE_LOG_LEVEL
              value: warn
            - name: CONSOLE_LOG_FORMAT
              value: json
            - name: FILE_LOG_DIRECTORY
              value: /stackable/logs/airflow-operator
            - name: FILE_LOG_LEVEL
              value: debug
            - name: FILE_LOG_ROTATION_PERIOD
              value: hourly
            - name: FILE_LOG_MAX_FILES
              value: 6
            - name: OTEL_LOG_EXPORTER_ENABLED
              value: "true"
            - name: OTEL_LOG_EXPORTER_LEVEL
              value: trace
            - name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
              value: my-collector:4317
            - name: OTEL_TRACE_EXPORTER_ENABLED
              value: "true"
            - name: OTEL_TRACE_EXPORTER_LEVEL
              value: error
            - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
              value: my-collector:4317

Default values will be set according to the design laid out in the tracking issue.

@Techassi Techassi moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Apr 11, 2025
@Techassi Techassi requested a review from NickLarsenNZ April 11, 2025 12:22
@NickLarsenNZ NickLarsenNZ moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Apr 11, 2025
NickLarsenNZ
NickLarsenNZ previously approved these changes Apr 11, 2025
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NickLarsenNZ NickLarsenNZ added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 11, 2025
@NickLarsenNZ
Copy link
Member

NickLarsenNZ commented Apr 11, 2025

Release Note

All operators now have access to these telemetry related Helm values. These are the defaults:

telemetry:
  consoleLog:
    enabled: true
    level: null
    format: null
  fileLog:
    enabled: false
    level: null
    rotationPeriod: null
    maxFiles: null
  otelLogExporter:
    enabled: false
    level: null
    endpoint: null
  otelTraceExporter:
    enabled: false
    level: null
    endpoint: null

Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Techassi Techassi added this pull request to the merge queue Apr 14, 2025
Merged via the queue into main with commit 1ba8fc4 Apr 14, 2025
2 checks passed
@Techassi Techassi deleted the chore/template-telemetry-helper branch April 14, 2025 15:23
@Techassi Techassi moved this from Development: In Review to Development: Done in Stackable Engineering Apr 16, 2025
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. scheduled-for/25.7.0
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants