Skip to content

Commit a1c47eb

Browse files
liustanleysongy23
authored andcommitted
[exporter/datadog] Deprecate logs::dump_payloads (open-telemetry#34490)
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Deprecates `logs::dump_payloads` because this config option is invalid with the Datadog Agent logs pipeline which will be enabled by default in the following release. This PR will be included in v0.107.0 and open-telemetry#34420 will be included in v0.108.0. **Link to tracking Issue:** <Issue number if applicable> **Testing:** <Describe what testing was performed and which tests were added.> The log appears as follows: ``` 2024-08-07T14:49:10.514-0400 warn [email protected]/config.go:462 logs::dump_payloads is deprecated and will raise an error if set when the Datadog Agent logs pipeline is enabled by default in collector version v0.108.0 {"kind": "exporter", "data_type": "logs", "name": "datadog"} ``` **Documentation:** <Describe the documentation added.> --------- Co-authored-by: Yang Song <[email protected]>
1 parent 4a38917 commit a1c47eb

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: deprecation
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: exporter/datadog
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Deprecates `logs::dump_payloads` since it is invalid with the Datadog Agent logs pipeline, which will be enabled by default in the v0.108.0 release.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [34490]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

exporter/datadogexporter/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ type LogsConfig struct {
324324

325325
// DumpPayloads report whether payloads should be dumped when logging level is debug.
326326
// Note: this config option does not apply when enabling the `exporter.datadogexporter.UseLogsAgentExporter` feature flag.
327+
// Deprecated: This config option is not supported in the Datadog Agent logs pipeline.
327328
DumpPayloads bool `mapstructure:"dump_payloads"`
328329

329330
// UseCompression enables the logs agent to compress logs before sending them.
@@ -668,6 +669,9 @@ func (c *Config) Unmarshal(configMap *confmap.Conf) error {
668669
}
669670
return fmt.Errorf("%v is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is %v", logsExporterSetting.setting, enabledText)
670671
}
672+
if logsExporterSetting.setting == "logs::dump_payloads" && logsExporterSetting.valid && configMap.IsSet(logsExporterSetting.setting) {
673+
c.warnings = append(c.warnings, fmt.Errorf("%v is deprecated and will raise an error if set when the Datadog Agent logs pipeline is enabled by default in collector version v0.108.0", logsExporterSetting.setting))
674+
}
671675
}
672676

673677
return nil

0 commit comments

Comments
 (0)