DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
340 stars 1.01k forks source link

Undocumented `apm_config.max_payload_size` - how to apply? #909

Open rmldsky opened 1 year ago

rmldsky commented 1 year ago

Describe what happened: There is an udocumented parameter for APM apm_config.max_payload_size not sure how to apply it via helm chart. https://github.com/DataDog/datadog-agent/pull/5502

Describe what you expected: Way of applying it to DD agent via helm chart.

Is there a DD_APM_MAX_PAYLOAD_SIZE env variable or should this just go somewhere in the YAML structure of values.yaml?

Please advice.

rmldsky commented 1 year ago

After some digging in agent code I've found this: https://github.com/DataDog/datadog-agent/blob/main/pkg/config/apm.go#L73 so I assume adding this env to traceAgent block should be sufficient?

            traceAgent:
              env:
                - name: DD_APM_MAX_PAYLOAD_SIZE
                  value: 10485760

Still would be great to have it documented somewhere

rmldsky commented 1 year ago

Just FYI: I did try to apply this setting with env variable as mentioned above, but agent stopped sending traces for me completely. Not sure if its the setting's fault or how chart handled config generation. Reverting the change brought back traces.

vlad-kopylash-deel commented 8 months ago

k8s env must always be string, so it should be

agents:
  containers:
    traceAgent:
      env:
        - name: DD_APM_MAX_PAYLOAD_SIZE
          value: '36700160' # 35MB

We provided such value to Helm chart, I could verify that correct env variable is set for traceAgent container. Screenshot 2024-01-09 at 12 17 25

However, when connecting to traceAgent container and running agent config it shows no changes.

apm_config:
  apm_non_local_traffic: true
  compute_stats_by_span_kind: false
  debug:
    port: 5012
  enabled: false
  instrumentation:
    disabled_namespaces: []
    enabled: false
    enabled_namespaces: []
  peer_service_aggregation: false
  peer_tags_aggregation: false
  receiver_port: 8126
  remote_tagger: true
  telemetry:
    enabled: true
  windows_pipe_buffer_size: 1000000
  windows_pipe_security_descriptor: D:AI(A;;GA;;;WD)