-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
FEAT: Add Span Kind support for ES/OS #6399
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6399 +/- ##
==========================================
- Coverage 96.27% 96.25% -0.03%
==========================================
Files 372 372
Lines 21283 21326 +43
==========================================
+ Hits 20491 20528 +37
- Misses 605 609 +4
- Partials 187 189 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
overall lgtm, but I have question on whether the whole thing could be even simpler, by treating Kind as always present (but maybe blank).
@@ -124,8 +124,9 @@ func getSpanAndServiceIndexFn(p SpanWriterParams) spanAndServiceIndexFn { | |||
func (s *SpanWriter) WriteSpan(_ context.Context, span *model.Span) error { | |||
spanIndexName, serviceIndexName := s.spanServiceIndex(span.StartTime) | |||
jsonSpan := s.spanConverter.FromDomainEmbedProcess(span) | |||
kind, _ := span.GetSpanKind() |
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.
Why not add Kind field to the dbmodel.Span and not pass it around separately?
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 will be present as a tag in json model also! I tried fetching kind from original span but failed because of the bool AllTagsAsFields
. As it will already be present in the json model, should we resave it as a seperate kind also?
Then we can't get old data! In old data |
@yurishkuro Comitted as per your suggestions. I tried many ways but I couldn't merge those with |
please update the branch, I am not sure if CI is failing because of that or because of your changes. If it's the latter, how are you testing this change? Did you run e2e tests locally? |
I tried approaching with empty kind but failed as query in |
@yurishkuro Saving empty strings in ES is not optimal. Please see: elastic/elasticsearch#7515. I have been trying various ways of employing empty or null kinds but not getting results. The probable reason is because query is a bit complex and unconventional. I think it will be better to not to keep empty and null kinds rather handelling them seperately! |
I don't have a strong opinion, but the issue you linked talks about searching for empty strings, which I don't think is the case for our scenario, we just need to write it. |
But while reading we have to search for those operations also which have empty kinds or no kind! I am facing problems when fetching spans of all kinds, the search query behaves weirdly if I introduce filter of |
Searching for "all kinds" to me means not specifying any filter for the "kind" field. How would it even work if you say |
I think there is some sort of misunderstanding of my approach. Let me first explain problems:
|
"Not available in our abstraction" is an odd argument since we own the abstraction and can change it at will. Re fetchsource, what is the source here - is it the whole span? Or do we write separate entries just for service/operation? |
Service, Operation and Kind (if present) but have to investigate the indices whether it is extracting any other information. |
Will try to clean this PR as soon as possible |
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
I have verified! It's only the service model, have comitted with |
@yurishkuro I have committed with |
Which problem is this PR solving?
Fixes: #1923
Description of the changes
GetOperations
, operations can now be fetched with kind also. When kind kept empty, spans of all kinds are returnedHow was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test