Skip to content
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

HPCC-30401 JTrace should optionally suppress trace/span ids generation #17935

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion helm/hpcc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ logging:
{{- end -}}
{{- end -}}

{{/*
Generate local tracing info, merged with global
Pass in dict with root and me
*/}}
{{- define "hpcc.generateTracingConfig" -}}
{{- $tracing := deepCopy (.me.tracing | default dict) | mergeOverwrite dict (.root.Values.global.tracing | default dict) -}}
{{- if not (empty $tracing) }}
tracing:
{{ toYaml $tracing | indent 2 }}
{{- end -}}
{{- end -}}

{{/*
Generate local metrics configuration, merged with global
Pass in dict with root and me
Expand Down Expand Up @@ -1304,8 +1316,9 @@ data:
{{ $configMapName }}.yaml:
version: 1.0
sasha:
{{ toYaml (omit .me "logging") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
{{- if hasKey .me "plane" }}
{{- $sashaStoragePlane := .me.plane | default (include "hpcc.getFirstPlaneForCategory" (dict "root" .root "category" "sasha")) }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/dafilesrv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
dafilesrv:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
{{- end -}}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/dali.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ data:
{{ $dali.name }}.yaml: |
version: 1.0
dali:
{{ toYaml (omit $dali "logging" "services" "env") | indent 6 }}
{{ toYaml (omit $dali "logging" "tracing" "services" "env") | indent 6 }}
dataPath: {{ include "hpcc.getPlanePrefix" (dict "root" $ "planeName" $daliStoragePlane) }}
{{- include "hpcc.generateLoggingConfig" $commonCtx | indent 6 }}
{{- include "hpcc.generateTracingConfig" $commonCtx | indent 6 }}
{{- include "hpcc.generateMetricsConfig" $commonCtx | indent 6 }}
{{ include "hpcc.generateVaultConfig" (dict "root" $ "secretsCategories" $daliSecretsCategories ) | indent 6 }}
foreignAccess: {{ include "hpcc.isForeignAccessConfigured" (dict "root" $ "me" .) | default "false" }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/dfuserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
dfuserver:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
{{- end -}}
Expand Down
6 changes: 4 additions & 2 deletions helm/hpcc/templates/eclagent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ data:
{{ .me.name }}.yaml:
version: 1.0
eclagent:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
{{ $apptype }}:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/eclccserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
eclccserver:
{{ toYaml (omit .me "logging") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
queues:
{{ include "hpcc.generateConfigMapQueues" .root | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/eclscheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
eclscheduler:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
queues:
{{ include "hpcc.generateConfigMapQueues" .root | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/esp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
esp:
{{ toYaml (omit .me "logging" "metrics" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "metrics" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
{{- include "hpcc.generateMetricsConfig" . | indent 6 }}
{{- if and .root.Values.certificates .root.Values.certificates.enabled }}
{{- $externalCert := (ne (include "hpcc.isVisibilityPublic" (dict "root" .root "visibility" .me.service.visibility)) "") -}}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/localroxie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ data:
{{ .me.name }}.yaml:
version: 1.0
roxie:
{{ toYaml (omit .me "logging" "env") | indent 6 }}
{{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" . | indent 6 }}
{{- include "hpcc.generateTracingConfig" . | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
Expand Down
6 changes: 4 additions & 2 deletions helm/hpcc/templates/roxie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ data:
{{- include "hpcc.addTLSServiceEntries" (dict "root" $root "service" $service "component" $component "visibility" $service.visibility "remoteClients" $service.remoteClients "trustClients" $service.trustClients "includeTrustedPeers" true "incluedRoxieAndEspServices" true) | indent 6 }}
{{- end }}
{{- end }}
{{ toYaml ( omit .me "logging" "topoServer" "encryptInTransit" "env" "services") | indent 6 }}
{{ toYaml ( omit .me "logging" "tracing" "topoServer" "encryptInTransit" "env" "services") | indent 6 }}
numChannels: {{ .numChannels }}
topologyServers: "{{ .toponame }}:{{ .topoport }}"
heartbeatInterval: {{ .heartbeatInterval }}
Expand All @@ -60,6 +60,7 @@ data:
encryptInTransit: {{ $mtlsEnabled }}
{{ end -}}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .me) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" .me) | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
Expand All @@ -73,8 +74,9 @@ data:
{{ .toponame }}.yaml:
version: 1.0
toposerver:
{{ toYaml ( omit .toposerver "logging" "env") | indent 6 }}
{{ toYaml ( omit .toposerver "logging" "tracing" "env") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .toposerver) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" .toposerver) | indent 6 }}
global:
{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
{{- end -}}
Expand Down
6 changes: 5 additions & 1 deletion helm/hpcc/templates/thor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Pass in dict with root and me
{{- $thorAgentScope := dict "name" .thorAgentName "replicas" .thorAgentReplicas "maxActive" .me.maxGraphs | merge (pick .me "keepJobs") }}
{{- $eclAgentResources := .me.eclAgentResources | default dict -}}
{{- $hthorScope := dict "name" $hthorName "jobMemorySectionName" "eclAgentMemory" | merge (pick .me "multiJobLinger" "maxGraphStartupTime") | merge (dict "resources" (deepCopy $eclAgentResources)) }}
{{- $thorScope := omit .me "eclagent" "thoragent" "hthor" "logging" "env" "eclAgentResources" "eclAgentUseChildProcesses" "eclAgentReplicas" "thorAgentReplicas" "eclAgentType" }}
{{- $thorScope := omit .me "eclagent" "thoragent" "hthor" "logging" "tracing" "env" "eclAgentResources" "eclAgentUseChildProcesses" "eclAgentReplicas" "thorAgentReplicas" "eclAgentType" }}
{{- $misc := .root.Values.global.misc | default dict }}
{{- $postJobCommand := $misc.postJobCommand | default "" }}
{{- $eclAgentJobName := printf "%s-job-_HPCC_JOBNAME_" $eclAgentType }}
Expand All @@ -51,20 +51,24 @@ data:
thor:
{{ toYaml $thorScope | indent 6 }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" $thorScope) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" $thorScope) | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
{{ $eclAgentType }}: # hthor or roxie
{{ toYaml $hthorScope | indent 6 }}
platform:
type: "thor"
width: {{ mul ($thorScope.numWorkers | default 1) ( $thorScope.channelsPerWorker | default 1) }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" $hthorScope ) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" $hthorScope ) | indent 6 }}
{{ include "hpcc.generateVaultConfig" . | indent 6 }}
eclagent: # main agent Q handler
{{ toYaml $eclAgentScope | indent 6 }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" $eclAgentScope) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" $eclAgentScope) | indent 6 }}
thoragent: # Thor graph handler
{{ toYaml $thorAgentScope | indent 6 }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" $thorAgentScope) | indent 6 }}
{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" $thorAgentScope) | indent 6 }}
type: thor
global:
{{ include "hpcc.generateGlobalConfigMap" .root| indent 6 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/hpcc/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,10 @@
"disabled": {
"type": "boolean",
"description": "If true, disable OTel based trace/span generation"
},
"alwaysCreateTraceIds": {
"type": "boolean",
"description": "If true, components generate trace/span ids to aid in unit of worktracing"
}
},
"additionalProperties": { "type": ["integer", "string", "boolean"] }
Expand Down
1 change: 1 addition & 0 deletions helm/hpcc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ global:
# tracing sets the default tracing information for all components. Can be overridden locally
tracing:
disabled: false
alwaysCreateTraceIds: true

## resource settings for stub components
#stubInstanceResources:
Expand Down
Loading
Loading