-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass in a label prefix from static to otelcolconvert so multiple trac… (
#6700) * Pass in a label prefix from static to otelcolconvert so multiple trace configs don't bump into each other Signed-off-by: erikbaranowski <[email protected]> * only add a label prefix if we have more than one trace config Signed-off-by: erikbaranowski <[email protected]> --------- Signed-off-by: erikbaranowski <[email protected]>
- Loading branch information
1 parent
b04dbf9
commit 0ed62e5
Showing
6 changed files
with
140 additions
and
15 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
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
1 change: 1 addition & 0 deletions
1
internal/converter/internal/staticconvert/testdata/traces_multi.diags
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 @@ | ||
(Warning) Please review your agent command line flags and ensure they are set in your Flow mode config file where necessary. |
84 changes: 84 additions & 0 deletions
84
internal/converter/internal/staticconvert/testdata/traces_multi.river
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,84 @@ | ||
otelcol.receiver.otlp "trace_config_1_default" { | ||
grpc { | ||
include_metadata = true | ||
} | ||
|
||
http { } | ||
|
||
output { | ||
metrics = [] | ||
logs = [] | ||
traces = [otelcol.processor.attributes.trace_config_1_default.input] | ||
} | ||
} | ||
|
||
otelcol.processor.attributes "trace_config_1_default" { | ||
action { | ||
key = "db.table" | ||
action = "delete" | ||
} | ||
|
||
output { | ||
metrics = [] | ||
logs = [] | ||
traces = [otelcol.exporter.otlp.trace_config_1_default_0.input] | ||
} | ||
} | ||
|
||
otelcol.exporter.otlp "trace_config_1_default_0" { | ||
sending_queue { | ||
queue_size = 1000 | ||
} | ||
|
||
retry_on_failure { | ||
max_elapsed_time = "1m0s" | ||
} | ||
|
||
client { | ||
endpoint = "http://localhost:1234/write" | ||
balancer_name = "" | ||
} | ||
} | ||
|
||
otelcol.receiver.otlp "trace_config_2_default" { | ||
grpc { | ||
include_metadata = true | ||
} | ||
|
||
http { } | ||
|
||
output { | ||
metrics = [] | ||
logs = [] | ||
traces = [otelcol.processor.attributes.trace_config_2_default.input] | ||
} | ||
} | ||
|
||
otelcol.processor.attributes "trace_config_2_default" { | ||
action { | ||
key = "redacted_span" | ||
value = true | ||
action = "upsert" | ||
} | ||
|
||
output { | ||
metrics = [] | ||
logs = [] | ||
traces = [otelcol.exporter.otlp.trace_config_2_default_0.input] | ||
} | ||
} | ||
|
||
otelcol.exporter.otlp "trace_config_2_default_0" { | ||
sending_queue { | ||
queue_size = 1000 | ||
} | ||
|
||
retry_on_failure { | ||
max_elapsed_time = "1m0s" | ||
} | ||
|
||
client { | ||
endpoint = "http://localhost:1234/write" | ||
balancer_name = "" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
internal/converter/internal/staticconvert/testdata/traces_multi.yaml
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,27 @@ | ||
traces: | ||
configs: | ||
- name: trace_config_1 | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
remote_write: | ||
- endpoint: http://localhost:1234/write | ||
attributes: | ||
actions: | ||
- key: db.table | ||
action: delete | ||
- name: trace_config_2 | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
remote_write: | ||
- endpoint: http://localhost:1234/write | ||
attributes: | ||
actions: | ||
- key: redacted_span | ||
value: true | ||
action: upsert |