-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for datadog.profiling
#1443
base: main
Are you sure you want to change the base?
Conversation
9a53379
to
5ebe9be
Compare
{{- if .Values.datadog.profiling.enabled }} | ||
- name: DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_PROFILING_ENABLED | ||
value: {{ .Values.datadog.profiling.enabled | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the reading the doc you created. I don't think this if
does what you want it to do about nil
values. cf helm chart docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it does what I want (omits the env var on null), but it doesn't do what I want for "false" (which would be emitting explicit "false" value, but it also omits the env var) so I need to change that. Right now it's:
% helm template ./datadog --set datadog.profiling.enabled=null | grep PROFILING -A 1
% helm template ./datadog --set datadog.profiling.enabled=false | grep PROFILING -A 1
% helm template ./datadog --set datadog.profiling.enabled=auto | grep PROFILING -A 1
- name: DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_PROFILING_ENABLED
value: "auto"
% helm template ./datadog --set datadog.profiling.enabled=true | grep PROFILING -A 1
- name: DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_PROFILING_ENABLED
value: "true"
but with a change to the predicate to say {{- if not (eq .Values.datadog.profiling.enabled nil) }}
it's doing what I'd expect it to. If there's maybe some other aspect that I'm not seeing, please let me know.
charts/datadog/values.yaml
Outdated
## These will only have an effect on containers that have Datadog client libraries installed, | ||
## either manually or via Single Step Instrumentation (under the `datadog.apm.instrumentation` | ||
## section). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you follow the implementation ASM did in the cluster-agent then it will only trigger on pod with SSI and not those with manually installed library. Injecting vars into manually installed pods should be done by the end of Q3 following the work done by APM on service discovery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pretty much took over the comment from the ASM part as well – it, too, says "either manually or via Single Step Instrumentation" so I guess it should say the same in both places?
6947c77
to
1e57d7b
Compare
1e57d7b
to
fc2f6aa
Compare
fc2f6aa
to
ac3a0b6
Compare
What this PR does / why we need it:
Adds support for
datadog.profiling
variable to enable Continuous Profiler in pods.Allows Continuous Profiler to be enabled (or disabled) by Helm Charts config on the controller pod. The cluster-agent, running on the controller pod, will read an environment variable and use this to mutate the configuration of other pods to set the environment variables that will activate profiling within the tracer/profiler client libraries.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
.github/helm-docs.sh
)CHANGELOG.md
has been updatedREADME.md
make update-test-baselines
)