-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/elasticsearch] Enable dynamic routing (previously {logs,metrics,traces}_dynamic_index
) by default
#38361
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
Comments
/label -needs-triage |
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@andrzej-stencel raised a concern that flipping default dynamic index to true causes TBH the data routing conditions are unnecessarily complicated now and I'm not sure if it even addresses valid use cases. We may need to make a bigger change as to how dynamic index works, and possibly splitting some configs. In any case, we need to limit the impact of this change to users who rely on logs_index and traces_index. |
Motivation 1
Impact / side effect of switching defaults directly
How to mitigate the impact
Motivation 2DS routing is unnecessarily complex at the moment as mentioned. The Be opinionated and defaults that deliver good UX OOTB. Proposed solutionIt comes in a few parts
@axw @felixbarny wdyt? |
Created draft PR #38456 to demonstrate the above proposal |
@carsonip that sounds like an improvement, but it still seems a little complicated to me. What about this alternative?
Then we would end up configuring the exporter like follows, by default. I'll use LogsIndex: '{{ or (attr "data_stream.type") "logs" }}-{{ or (attr "data_stream.dataset") "generic.otel" }}-{{ or (attr "data_stream.namespace") "default" }}'
Anyway, point being that the user could then configure a static index or dynamic index based on the lack or presence of variables. WDYT? |
Another idea to simplify the configuration: Logic to determine the
Use cases that were using prefix/suffix before would use OTTL before the exporter to set |
I see a lot of value in a new While What I'm going to doI'll go ahead and create a draft PR from @felixbarny 's proposal.
Remaining questions
|
Remaining questions (continued)
|
I think we shouldn't automatically set
I'd say routing of span events should be controlled via span event attributes rather than span attributes. That way, setting
👍 |
Makes sense
++, I'll double check if that's the case. |
Created PR #38500
The behavior is correct and expected. Added a test in #38500 to confirm that |
*_dynamic_index::enabled
config to true{logs,metrics,traces}_dynamic_index
) by default
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
exporter/elasticsearch
Is your feature request related to a problem? Please describe.
config
metrics_dynamic_index::enabled
defaults totrue
whilelogs_dynamic_index
andtraces_dynamic_index
are not.Dynamic document routing should be enabled by default for all of them for consistency and better user experience out of the box.
Describe the solution you'd like
Overhaul of dynamic document routing such that the behavior similar to
{logs,metrics,traces}_dynamic_index
is the defaultDescribe alternatives you've considered
Change the default to
true
Additional context
No response
The text was updated successfully, but these errors were encountered: