**Description:** It was suggested that we add the [goleak package](https://pkg.go.dev/go.uber.org/goleak) to every test in core. This change adds `goleak` to every package that is succeeds with goleak. There a number that are not successful, the full list of which I've posted in the bug. I generated these files using a shell script to copy a template `main_test.go` file into each package, then modified the package name. I'm sure there was a better way to automate this, but it worked well enough at this point. Here's the script: ``` cp ./main_test.go $1 PACKAGE_NAME=$(basename $1) sed -i '' -e "s|package component|package $PACKAGE_NAME|g" $1/main_test.go pushd . && cd $1 && go mod tidy go test -v . ``` Usage example: ``` $ ./add_leak_test reciever/scrapererror ``` **Link to tracking Issue:** #9165 **Testing:** All added tests are passing, but there are a number failing. Note that there's no sign of `goleak` running until it fails. |
||
|---|---|---|
| .. | ||
| internal/metadata | ||
| Makefile | ||
| README.md | ||
| doc.go | ||
| forward.go | ||
| forward_test.go | ||
| go.mod | ||
| go.sum | ||
| metadata.yaml | ||
| package_test.go | ||
README.md
Forward Connector
| Status | |
|---|---|
| Distributions | core, contrib |
| Issues |
Supported Pipeline Types
| Exporter Pipeline Type | Receiver Pipeline Type | Stability Level |
|---|---|---|
| traces | traces | beta |
| metrics | metrics | beta |
| logs | logs | beta |
The forward connector can merge or fork pipelines of the same type.
Configuration
If you are not already familiar with connectors, you may find it helpful to first visit the Connectors README.
The forward connector does not have any configuration settings.
receivers:
foo:
exporters:
bar:
connectors:
forward:
Example Usage
Annotate distinct log streams, then merge them together, batch, and export.
receivers:
foo/blue:
foo/green:
processors:
attributes/blue:
attributes/green:
batch:
exporters:
bar:
connectors:
forward:
service:
pipelines:
logs/blue:
receivers: [foo/blue]
processors: [attributes/blue]
exporters: [forward]
logs/green:
receivers: [foo/green]
processors: [attributes/green]
exporters: [forward]
logs:
receivers: [forward]
processors: [batch]
exporters: [bar]
Preprocess data, then replicate and handle in distinct ways.
receivers:
foo:
processors:
resourcedetection:
sample:
attributes:
batch:
exporters:
bar/hot:
bar/cold:
connectors:
forward:
service:
pipelines:
traces:
receivers: [foo]
processors: [resourcedetection]
exporters: [forward]
traces/hot:
receivers: [forward]
processors: [sample, batch]
exporters: [bar/hot]
traces/cold:
receivers: [forward]
processors: [attributes]
exporters: [bar/cold]
Add a temporary debugging exporter. (Uncomment to enable.)
receivers:
foo:
processors:
filter:
batch:
exporters:
bar:
# connectors:
# forward:
service:
pipelines:
traces:
receivers:
- foo
processors:
- filter
- batch
exporters:
- bar
# - forward
# traces/log:
# receivers: [forward]
# exporters: [logging]