Skip to content

Commit 62c262a

Browse files
committed
fix datadogexporter: instrumentation_scope_metadata_as_tags = true by default
1 parent 4e3a6f3 commit 62c262a

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

docs/sources/reference/components/otelcol/otelcol.exporter.datadog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ The `exporter` block configures the metric exporter settings.
182182

183183
The following arguments are supported:
184184

185-
| Name | Type | Description | Default | Required |
186-
| ---------------------------------------- | ------ | ------------------------------------------------------------------------------------ | ------- | -------- |
187-
| `instrumentation_scope_metadata_as_tags` | `bool` | Set to `true` to add metadata about the instrumentation scope that created a metric. | `false` | no |
188-
| `resource_attributes_as_tags` | `bool` | Set to `true` to add resource attributes of a metric to its metric tags. | `false` | no |
185+
| Name | Type | Description | Default | Required |
186+
| ---------------------------------------- | ------ |-------------------------------------------------------------------------------------------|---------| -------- |
187+
| `instrumentation_scope_metadata_as_tags` | `bool` | Set to `false` to not add metadata about the instrumentation scope that created a metric. | `true` | no |
188+
| `resource_attributes_as_tags` | `bool` | Set to `true` to add resource attributes of a metric to its metric tags. | `false` | no |
189189

190190
### `histograms`
191191

internal/component/otelcol/exporter/datadog/config/config_datadog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func (args *DatadogMetricsArguments) SetToDefault() {
198198
DeltaTTL: 3600,
199199
ExporterConfig: DatadogMetricsExporterArguments{
200200
ResourceAttributesAsTags: false,
201-
InstrumentationScopeMetadataAsTags: false,
201+
InstrumentationScopeMetadataAsTags: true,
202202
},
203203
HistConfig: DatadogHistogramArguments{
204204
Mode: "distributions",

internal/component/otelcol/exporter/datadog/datadog_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestConfigConversion(t *testing.T) {
2929
// from the official exporter; as such as need to init it all here
3030
defaultExporterSettings = datadogOtelconfig.MetricsExporterConfig{
3131
ResourceAttributesAsTags: false,
32-
InstrumentationScopeMetadataAsTags: false,
32+
InstrumentationScopeMetadataAsTags: true,
3333
}
3434
defaultHistSettings = datadogOtelconfig.HistogramConfig{
3535
Mode: "distributions",
@@ -84,6 +84,7 @@ func TestConfigConversion(t *testing.T) {
8484
delta_ttl = 1200
8585
exporter {
8686
resource_attributes_as_tags = true
87+
instrumentation_scope_metadata_as_tags = false
8788
}
8889
histograms {
8990
mode = "counters"

internal/converter/internal/otelcolconvert/testdata/datadog.alloy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ otelcol.exporter.datadog "default" {
3636
endpoint = "https://api.datadoghq.com"
3737

3838
exporter {
39-
resource_attributes_as_tags = true
39+
resource_attributes_as_tags = true
40+
instrumentation_scope_metadata_as_tags = true
4041
}
4142

4243
histograms {

0 commit comments

Comments
 (0)