-
Notifications
You must be signed in to change notification settings - Fork 5k
ES slowlog module improvements #8416
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
Conversation
immon
commented
Sep 24, 2018
- change keyword to integer for few fields
- split types
* keyword to integer type change for few fields * split types
This reverts commit bd9c5d6.
* keyword to integer type change for few fields * split types
|
PR will need a changelog entry |
| "field": "elasticsearch.slowlog.types", | ||
| "separator": ",", | ||
| "ignore_missing": true | ||
| } |
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.
Indentation is slightly off.
| "elasticsearch.slowlog.types": "", | ||
| "elasticsearch.slowlog.types": [ | ||
| "" | ||
| ], |
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.
I wonder if we want to index an array of one element, that element being an empty string, over here OR if we want to index an empty array OR not even index this field if no types are present.
Now that Ingest processors support if conditions (elastic/elasticsearch#32398), perhaps we could define the split processor like so:
{
"split":{
"field":"elasticsearch.slowlog.types",
"separator":",",
"ignore_missing":true,
"if":"ctx.elasticsearch.slowlog.types != ''"
}
}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.
@ruflin any opinion on that?
IMHO types field should be stored since it appears in the log line.
Arrays and single values are internally stored the same way since any ES field can be an array. Indeed _source will look different since source document is different, but should we care?
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.
The log entry that this is coming from looks like this: total_hits[19435], types[], stats[],. If I run the following command in DevTools what I get is "a": []. So I would argue types should be there but with an empty array and not entry.
POST test/_doc
{
"a": []
}
|
Thanks for review @ycombinator |
ycombinator
left a comment
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
|
This will need to be updated with master and |
|
@jsoriano this slipped under my radar. I |
|
@immon sorry for the late reply. Could you try to update again? |
|
Pinging @elastic/stack-monitoring |
|
There seems to still be something wrong with the expected json files 🤔 |
jsoriano
left a comment
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.
It LGTM, I have a doubt on the type for the shard id.
|
jenkins, test this again please |
1 similar comment
|
jenkins, test this again please |
|
This seems to have quite a bit of conflicts with master. Let's review again when it's rebased. |
|
Hi @immon, could you rebase this PR on Alternatively, you could just close this PR and make a new one, whichever is easier! |
|
I totally lost track on that effort. It will be easier to create new PR since many things has changed since version 6.5 and 2018. I'm closing this one. |