-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[connector/routing] Support log record routing #35948
Labels
Comments
djaglowski
added
enhancement
New feature or request
needs triage
New item requiring triage
labels
Oct 23, 2024
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@mwear, @jpkrohling, I'm excited to move my PoC forward with the plan proposed above, if it sounds good to you. Also cc'ing @evan-bradley @TylerHelmuth as I think some version of this might eventually be able to solve cases like #32080. |
This was referenced Oct 23, 2024
jpbarto
pushed a commit
to jpbarto/opentelemetry-collector-contrib
that referenced
this issue
Oct 29, 2024
…g context (open-telemetry#35939) This PR resolves open-telemetry#35948 by adding a `context` field to routing table items. The default value of `context` is `resource`, so that existing users will not see a difference. `log` context may also be used. Each routing table item may have a difference context. `match_once` must be `true` in order to use `log` context.
This was referenced Nov 6, 2024
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this issue
Dec 17, 2024
…g context (open-telemetry#35939) This PR resolves open-telemetry#35948 by adding a `context` field to routing table items. The default value of `context` is `resource`, so that existing users will not see a difference. `log` context may also be used. Each routing table item may have a difference context. `match_once` must be `true` in order to use `log` context.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component(s)
connector/routing
Is your feature request related to a problem? Please describe.
Currently the routing connector only has the ability to route based on resource information. In other words, all logs associated with a given resource will be routed together. (The same is true of metrics and spans as well, but this issue directly addresses logs as a first step.)
Describe the solution you'd like
Add a
context
field to routing table options, with possible valuesresource
(default) orlog
. If log context is specified, execute the OTTL condition or statement as a log statement. Based on the result, route the individual log record appropriately.Importantly, there is an implementation challenge here because appropriate routing at a per-log level requires retention of the higher level scope and resource information, without pulling in other logs as well.
I believe I finally have a workable solution, demonstrated in #35939. This solution is based on the addition of helper functions that can "split" a
plog.Logs
according to criteria at either the resource or log level. When splitting at the log level, scope and resource information are retained.I'd like to implement this functionality for logs first, then later for other signals once the strategy proves out. The initial sequence of PRs will look like this:
pkg/pdatautil
or eventually intopdata
, but for now keep them unexported.)Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: