-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an otelcol.processor.attributes component #3349
Add an otelcol.processor.attributes component #3349
Conversation
76acd34
to
08f66a8
Compare
// Attributes specifies the list of attributes to match against. | ||
// All of these attributes must match exactly for a match to occur. | ||
// Only match_type=strict is allowed if "attributes" are specified. | ||
Attributes []Attribute `river:"attribute,block,optional"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Otel code this used to be a slice of pointers ([]*Attribute
), but I'm not sure why. I changed it to values instead of pointers to avoid shallow copy issues.
} | ||
} | ||
|
||
otelcol.processor.attributes "default" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an example for from_context
?
@@ -0,0 +1,103 @@ | |||
package otelcol | |||
|
|||
type AttrActionKeyValueSlice []AttrActionKeyValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern is something I made up myself, since it makes sense to use actions as a slice and to have the convert function in config_atraction.go. If you think this pattern doesn't make senes though, let me know
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
341cd03
to
cdc0e01
Compare
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
…butes.md Co-authored-by: Robert Fratto <robertfratto@gmail.com>
bee70c9
to
257b9a1
Compare
257b9a1
to
6776869
Compare
Rename log_severity_number to log_severity
docs/sources/flow/reference/components/otelcol.processor.attributes.md
Outdated
Show resolved
Hide resolved
The severities supported by Otel are listed in the table below. | ||
The value for `min` should be one of the values in the "Log Severity" column. | ||
|
||
Log Severity | Severity number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite a tall table, but I think that listing all 5 types of each severity kind is worth it?
I.e. I think it's better to have all of TRACE, TRACE2, TRACE3, TRACE4 instead of just listing TRACE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit strange but assuming its a straight mapping from otel right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Revert "Add an otelcol.processor.attributes component (#3349)" This reverts commit 84a6494. * Update docs/sources/flow/reference/components/discovery.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/mimir.rules.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/otelcol.processor.batch.md --------- Co-authored-by: Mischa Thompson <mischabear@gmail.com>
* Revert "Add an otelcol.processor.attributes component (#3349)" This reverts commit 84a6494. * Update docs/sources/flow/reference/components/discovery.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/mimir.rules.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/otelcol.processor.batch.md --------- Co-authored-by: Mischa Thompson <mischabear@gmail.com>
#3593) * Revert "Add an otelcol.processor.attributes component (#3349)" This reverts commit 84a6494. * Update docs/sources/flow/reference/components/discovery.kubernetes.md * Update docs/sources/flow/reference/components/mimir.rules.kubernetes.md * Update docs/sources/flow/reference/components/otelcol.processor.batch.md --------- Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
* Revert "Revert "Add an otelcol.processor.attributes component (#3349)" (#3589)" This reverts commit fc17c56. * Add runner tests for the attributes processor * Update docs/sources/flow/reference/components/otelcol.processor.attributes.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> * Remove a panic, fix comments and docs * Update changelog --------- Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
* Add a otelcol.processor.attributes component * Update changelog * Fix linter errors * Update docs/sources/flow/reference/components/otelcol.processor.attributes.md Co-authored-by: Robert Fratto <robertfratto@gmail.com> * PR review fixes * PR review fixes * Update documentation Rename log_severity_number to log_severity * Update docs * Fix tests * Rename "cacheenabled" and "cachemaxnumentries" with "_" --------- Co-authored-by: Robert Fratto <robertfratto@gmail.com> Co-authored-by: mattdurham <mattdurham@ppog.org>
* Revert "Add an otelcol.processor.attributes component (#3349)" This reverts commit 84a6494. * Update docs/sources/flow/reference/components/discovery.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/mimir.rules.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/otelcol.processor.batch.md --------- Co-authored-by: Mischa Thompson <mischabear@gmail.com>
* Revert "Revert "Add an otelcol.processor.attributes component (#3349)" (#3589)" This reverts commit fc17c56. * Add runner tests for the attributes processor * Update docs/sources/flow/reference/components/otelcol.processor.attributes.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> * Remove a panic, fix comments and docs * Update changelog --------- Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
* Add a otelcol.processor.attributes component * Update changelog * Fix linter errors * Update docs/sources/flow/reference/components/otelcol.processor.attributes.md Co-authored-by: Robert Fratto <robertfratto@gmail.com> * PR review fixes * PR review fixes * Update documentation Rename log_severity_number to log_severity * Update docs * Fix tests * Rename "cacheenabled" and "cachemaxnumentries" with "_" --------- Co-authored-by: Robert Fratto <robertfratto@gmail.com> Co-authored-by: mattdurham <mattdurham@ppog.org>
* Revert "Add an otelcol.processor.attributes component (#3349)" This reverts commit 84a6494. * Update docs/sources/flow/reference/components/discovery.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/mimir.rules.kubernetes.md Co-authored-by: Mischa Thompson <mischabear@gmail.com> * Update docs/sources/flow/reference/components/otelcol.processor.batch.md --------- Co-authored-by: Mischa Thompson <mischabear@gmail.com>
* Revert "Revert "Add an otelcol.processor.attributes component (#3349)" (#3589)" This reverts commit fc17c56. * Add runner tests for the attributes processor * Update docs/sources/flow/reference/components/otelcol.processor.attributes.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> * Remove a panic, fix comments and docs * Update changelog --------- Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Adding an otelcol.processor.attributes component.
Fixes #2294
I left some comments in the PR about things I was not sure about.
Tests, docs, and changelog have been updated.