-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[exporter/signalfx] Add exclude_properties config option for limiting…
… dimension updates (#18464) Adding a feature - These changes add exclude_properties support to* the signalfx exporter to filter which properties/dimensions are used in dimension update content. This work is based on existing Smart Agent functionality: https://github.com/signalfx/signalfx-agent/blob/main/docs/config-schema.md#propertiestoexclude
- Loading branch information
1 parent
4c9e676
commit 0040467
Showing
12 changed files
with
365 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: signalfxexporter | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add `exclude_properties` config option to filter dimension update property content | ||
|
||
# One or more tracking issues related to the change | ||
issues: [18464] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
exporter/signalfxexporter/internal/translation/dpfilters/propertyfilter.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2021, OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package dpfilters // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters" | ||
|
||
// PropertyFilter is a collection of *StringFilter items used in determining if a given property (name and value) | ||
// should be included with a dimension update request. The default values for all fields is equivalent to the regex | ||
// StringFilter `/^.*$/` to match with any potential value. | ||
// | ||
// Examples: | ||
// Don't send any dimension updates for `k8s.pod.uid` dimension: | ||
// - dimension_name: "k8s.pod.uid" | ||
// Don't send dimension updates for any dimension with a value of `some.value`: | ||
// - dimension_value: "some.value" | ||
// Don't send dimension updates including a `some.property` property for any dimension: | ||
// - property_name: "some.property" | ||
// Don't send dimension updates including a `some.property` property with a "some.value" value for any dimension | ||
// - property_name: "some.property" | ||
// property_value: "some.value" | ||
type PropertyFilter struct { | ||
// PropertyName is the (inverted) literal, regex, or globbed property name/key to not include in dimension updates | ||
PropertyName *StringFilter `mapstructure:"property_name"` | ||
// PropertyValue is the (inverted) literal or globbed property value to not include in dimension updates | ||
PropertyValue *StringFilter `mapstructure:"property_value"` | ||
// DimensionName is the (inverted) literal, regex, or globbed dimension name/key to not target for dimension updates. | ||
// If there are no sub-property filters for its enclosing entry, it will disable dimension updates | ||
// for this dimension name in total. | ||
DimensionName *StringFilter `mapstructure:"dimension_name"` | ||
// PropertyValue is the (inverted) literal, regex, or globbed dimension value to not target with a dimension update | ||
// If there are no sub-property filters for its enclosing entry, it will disable dimension updates | ||
// for this dimension value in total. | ||
DimensionValue *StringFilter `mapstructure:"dimension_value"` | ||
} |
Oops, something went wrong.