Skip to content

Commit

Permalink
[exporters/signalfx] breaking change: do not convert periods to under…
Browse files Browse the repository at this point in the history
…scores in dimension keys (#2456)

**Description:** **breaking change**: This PR introduces a
breaking change for current users upon upgrading, unless
explicitly setting the `nonalphanumeric_dimension_chars` config
option on the signalfx exporter.

This PR changes the config option `nonalphanumeric_dimension_chars`
default from `_-` to `_-.`.

The resulting behavior change is dimensions keys with periods in them
will no longer be converted to underscores. For example, if the
dimension `k8s.pod.uid` was currently sent, the exporter would
automatically convert this to `k8s_pod-uid`. This change will allow
`k8s.pod.uid` to be sent as is.

Why? The SignalFx backend now allows periods in dimension keys,
and much of our content will rely on this.
Existing users who do not wish to break MTSs and keep current
functionality can set `nonalphanumeric_dimension_chars` to `_-`.
  • Loading branch information
Mark Stumpf authored Feb 24, 2021
1 parent cf5abee commit b1cb781
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- `signalfx` exporter: **breaking change** - Allow periods to be sent in dimension keys (#2456). Existing users who do not want to change this functionality can set `nonalphanumeric_dimension_chars` to `_-`

## v0.20.0

Expand Down
2 changes: 1 addition & 1 deletion exporter/signalfxexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following configuration options can also be configured:
processor is enabled in the pipeline with one of the cloud provider detectors
or environment variable detector setting a unique value to `host.name` attribute
within your k8s cluster. And keep `override=true` in resourcedetection config.
- `nonalphanumeric_dimension_chars`: (default = `"_-"`) A string of characters
- `nonalphanumeric_dimension_chars`: (default = `"_-."`) A string of characters
that are allowed to be used as a dimension key in addition to alphanumeric
characters. Each nonalphanumeric dimension key character that isn't in this string
will be replaced with a `_`.
Expand Down
2 changes: 1 addition & 1 deletion exporter/signalfxexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestLoadConfig(t *testing.T) {
"host.name": "host",
},
},
NonAlphanumericDimensionChars: "_-",
NonAlphanumericDimensionChars: "_-.",
}
assert.Equal(t, &expectedCfg, e1)

Expand Down
2 changes: 1 addition & 1 deletion exporter/signalfxexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func createDefaultConfig() configmodels.Exporter {
},
DeltaTranslationTTL: 3600,
Correlation: correlation.DefaultConfig(),
NonAlphanumericDimensionChars: "_-",
NonAlphanumericDimensionChars: "_-.",
}
}

Expand Down

0 comments on commit b1cb781

Please sign in to comment.