Skip to content

Commit 95de733

Browse files
authored
Fix APM section of the template (#46906)
### What does this PR do? - Missing env vars - Fix format - Add missing defaults - Remove duplicate section Co-authored-by: maxime.mouial <maxime.mouial@datadoghq.com>
1 parent c37d1f1 commit 95de733

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

pkg/config/config_template.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ api_key:
221221
# dogstatsd_tag_cardinality: "low"
222222

223223
## @param histogram_aggregates - list of strings - optional - default: ["max", "median", "avg", "count"]
224-
## @env DD_HISTOGRAM_AGGREGATES - space separated list of strings - optional - default: 'max median avg count'
224+
## @env DD_HISTOGRAM_AGGREGATES - space separated list of strings - optional - default: "max median avg count"
225225
## Configure which aggregated value to compute.
226226
## Possible values are: min, max, median, avg, sum and count.
227227
#
@@ -232,7 +232,7 @@ api_key:
232232
# - count
233233

234234
## @param histogram_percentiles - list of strings - optional - default: ["0.95"]
235-
## @env DD_HISTOGRAM_PERCENTILES - space separated list of strings - optional - default: '0.95'
235+
## @env DD_HISTOGRAM_PERCENTILES - space separated list of strings - optional - default: "0.95"
236236
## Configure which percentiles are computed by the Agent. It must be a list of float between 0 and 1.
237237
## Warning: percentiles must be specified as yaml strings
238238
#
@@ -382,7 +382,7 @@ api_key:
382382
# forwarder_backoff_max: 64
383383

384384
## @param cloud_provider_metadata - list of strings - optional - default: ["aws", "gcp", "azure", "alibaba", "oracle", "ibm"]
385-
## @env DD_CLOUD_PROVIDER_METADATA - space separated list of strings - optional - default: 'aws gcp azure alibaba oracle ibm'
385+
## @env DD_CLOUD_PROVIDER_METADATA - space separated list of strings - optional - default: "aws gcp azure alibaba oracle ibm"
386386
## This option restricts which cloud provider endpoint will be used by the
387387
## agent to retrieve metadata. By default the agent will try # AWS, GCP, Azure
388388
## and alibaba providers. Some cloud provider are not enabled by default to not
@@ -1298,12 +1298,11 @@ api_key:
12981298
# # Set to 0 to disable the HTTP receiver.
12991299
#
13001300
# receiver_port: 8126
1301-
1302-
{{ if (eq .OS "windows") -}}
1301+
{{ if (eq .OS "windows") }}
13031302
# # @param receiver_socket - string - optional - default: ""
13041303
# # @env DD_APM_RECEIVER_SOCKET - string - optional - default: ""
13051304
# # Please note that UDS receiver is not available in Windows.
1306-
# # @ Enabling this setting may result in unexpected behavior.
1305+
# # Enabling this setting may result in unexpected behavior.
13071306
# #
13081307
# # Accept traces through Unix Domain Sockets.
13091308
# # Set to "" to disable the UDS receiver.
@@ -1604,8 +1603,9 @@ api_key:
16041603
# pattern: "<REGEX_PATTERN>"
16051604
# repl: "<PATTERN_TO_INLINE>"
16061605

1607-
# # @param ignore_resources - list of strings - optional
1608-
# # @env DD_APM_IGNORE_RESOURCES - comma separated list of strings - optional
1606+
# # @param ignore_resources - list of strings - optional - default: []
1607+
# # @env DD_APM_IGNORE_RESOURCES - comma separated list of strings - optional - default: []
1608+
# # @env DD_IGNORE_RESOURCE - comma separated list of strings - optional - default: []
16091609
# # An exclusion list of regular expressions can be provided to disable certain traces based on their resource name
16101610
# # all entries must be surrounded by double quotes and separated by commas.
16111611
#

pkg/config/render_config/render_config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ func renderAll(destFolder string, tplFolder string) {
151151
for _, osName := range []string{"windows", "darwin", "linux"} {
152152
destFile := filepath.Join(destFolder, component+"_"+osName+".yaml")
153153
render(destFile, filepath.Join(tplFolder, templateName), component, osName)
154-
lint(destFile)
154+
if err := lint(destFile); err != nil {
155+
panic(err)
156+
}
155157
fmt.Println("Successfully wrote", destFile)
156158
}
157159
}

0 commit comments

Comments
 (0)