Skip to content

Commit

Permalink
Merge branch 'main' into eec-info-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mowies authored Sep 2, 2024
2 parents bbd06c5 + f47f83a commit 2425527
Show file tree
Hide file tree
Showing 30 changed files with 1,377 additions and 543 deletions.
18 changes: 18 additions & 0 deletions .chloggen/add-redaction-processor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: redactionprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added the redaction processor to the Dynatrace collector distro.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [275]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
- prometheus
- zipkin
- statsd
- redaction
runs-on: ubuntu-latest
needs: docker-build
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ and the Collector's [troubleshooting guide].
* [k8sattributesprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
* [memorylimiterprocessor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor)
* [probabilisticsamplerprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor)
* [redactionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/redactionprocessor)
* [resourcedetectionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor)
* [resourceprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor)
* [tailsamplingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor)
Expand Down
1 change: 1 addition & 0 deletions config_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Dynatrace distribution of the OpenTelemetry Collector.
- [StatsD Receiver](statsd.yaml)
- [Syslog Receiver](syslog.yaml)
- [Zipkin Receiver](zipkin.yaml)
- [Redaction Processor](redaction.yaml)

## Sending data to Dynatrace

Expand Down
42 changes: 42 additions & 0 deletions config_examples/redaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
redaction:
allow_all_keys: false
allowed_keys:
- description
- group
- name
ignored_keys:
- safe_attribute
blocked_values:
- "4[0-9]{12}(?:[0-9]{3})?" ## Visa credit card number
- "(5[1-5][0-9]{14})" ## MasterCard number
- "^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\b){4}$" ## IPv4 addresses
- "^[\\w\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$" ## email addresses (simplified example)
summary: info

exporters:
otlphttp:
endpoint: ${env:DT_ENDPOINT}
headers:
Authorization: "Api-Token ${env:API_TOKEN}"

extensions:
health_check:
endpoint: 0.0.0.0:13133

service:
extensions:
- health_check
pipelines:
traces:
receivers: [otlp]
processors: [redaction]
exporters: [otlphttp]
4 changes: 1 addition & 3 deletions config_examples/split_histogram.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ processors:
- extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
# Get sum from the histogram. The new metric name will be <histogram_name>_sum
- extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
- context: datapoint
statements:
# convert the <histogram_name>_sum metrics to gauges.
- convert_sum_to_gauge() where IsMatch(metric.name, ".*_sum")
- convert_sum_to_gauge() where IsMatch(name, ".*_sum")

filter/histogram:
metrics:
Expand Down
4 changes: 1 addition & 3 deletions config_examples/statsd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ processors:
- extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
# Get sum from the histogram. The new metric name will be <histogram_name>_sum
- extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
- context: datapoint
statements:
# convert the <histogram_name>_sum metrics to gauges.
- convert_sum_to_gauge() where IsMatch(metric.name, ".*_sum")
- convert_sum_to_gauge() where IsMatch(name, ".*_sum")
filter:
metrics:
metric:
Expand Down
4 changes: 2 additions & 2 deletions internal/confmap/provider/eecprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ go 1.22.6

require (
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/confmap v0.107.0
go.opentelemetry.io/collector/confmap v1.14.1
go.uber.org/goleak v1.3.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions internal/confmap/provider/eecprovider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc=
github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w=
github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs=
Expand All @@ -26,6 +28,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/collector/confmap v0.107.0 h1:M2o7jvQM9bnMU3pE2N6BK4KHYtSnvsSZkegUD89y8BU=
go.opentelemetry.io/collector/confmap v0.107.0/go.mod h1:9Fs/ZEIeiMa38VqkqIpn+JKQkcPf/lhAKA9fHu6c9GY=
go.opentelemetry.io/collector/confmap v1.14.1 h1:GPMa+q5ThiBFQaYKJ7xeomiw9tIokkTA1AiF1zwKJck=
go.opentelemetry.io/collector/confmap v1.14.1/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k=
go.opentelemetry.io/collector/featuregate v1.13.0 h1:rc84eCf5hesXQ8/bP6Zc15wqthbomfLBHmox5tT7AwM=
go.opentelemetry.io/collector/featuregate v1.13.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U=
go.opentelemetry.io/collector/internal/globalgates v0.107.0 h1:PaD6WgQg80YTVxg8OF+YEqgI7WRd13wMu/R6GIG7uNU=
Expand Down
Loading

0 comments on commit 2425527

Please sign in to comment.