Kiali 1906 Jaeger Integration#965
Conversation
986c336 to
33ff814
Compare
|
@jotak @xeviknal @lucasponce this is ready, there are so tests this is why we have 6000+ sorry :( |
| "js-yaml": "3.12.0", | ||
| "json-beautify": "1.0.1", | ||
| "lodash": "4.17.11", | ||
| "logfmt": "^1.2.1", |
There was a problem hiding this comment.
Can you provide some information on how and why this library is used? If I understand correctly it's also used in jaeger, but I'm not sure if we really need it, what I can see is that searchOptions.tags is expected to be a string in "logfmt" format and then is converted to plain json string to pass to jaeger, but what I fail to see is where these tags come from and if we can avoid having them in that format in the first place.
Also, I think you should remove the caret in lib version, as we don't use it in general.
There was a problem hiding this comment.
logfmt is used in src/actions/JaegerThunkActions.ts
There was a problem hiding this comment.
@aljesusg can you also fix that in your new PR? (the caret version)
| } | ||
| }; | ||
|
|
||
| export const JAEGER_QUERY = () => { |
There was a problem hiding this comment.
I'm not sure if ALL_CAPS is wanted here ... @mtho11 I think you provided some naming guidelines but I can't retrieve the mail / source , what do you think?
There was a problem hiding this comment.
if we don't want ALL_CAPS in JAEGER_QUERY we should change ICONS too
There was a problem hiding this comment.
So, icons was changed, this should be camel case too
| }; | ||
|
|
||
| export const JAEGER_QUERY = () => { | ||
| return deepFreeze(jaegerQuery) as typeof jaegerQuery; |
There was a problem hiding this comment.
By the way I'm not sure this has to be a function, I would imagine that deepFreeze has to be called only once and then provide the same immutable constant, no?
There was a problem hiding this comment.
yes I followed
Lines 129 to 131 in 33ff814
There was a problem hiding this comment.
yeah, not sure why config is like that, too.
| } | ||
|
|
||
| export class LookBack extends React.PureComponent<LookBackProps, {}> { | ||
| lookBackOptions = { |
There was a problem hiding this comment.
The labels conventions here differ with what we have in similar dropdowns (it's fine IMO to have different values, but the names should be consistent) See in Config.ts : we capitalize only the first word ("Last 5 min" , "Last hour" ...). Also we have "Last day" instead of "Last 24 hours".
There was a problem hiding this comment.
I set the same value that in Jaeger UI Toolbar, I don't see any problem to format like the others dropdowns
There was a problem hiding this comment.
Why this wasn't done before merge?
| <Card> | ||
| <Card.Title> | ||
| Values should be in the{' '} | ||
| <a href="https://brandur.org/logfmt" target="_blank"> |
There was a problem hiding this comment.
we should add rel="noopener noreferrer" to any link leading to third-parties, it prevents potential undesired data leak . See https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
There was a problem hiding this comment.
ok, I didn't know. thanks
There was a problem hiding this comment.
same here, why isn't it done?
| @@ -0,0 +1,181 @@ | |||
| import * as React from 'react'; | |||
There was a problem hiding this comment.
Is there a reason to name that file index.tsx instead of JaegerToolbar.tsx ?
There was a problem hiding this comment.
To make the imports more cleaner
import { JaegerToolbar} from 'components/JaegerToolbar';
I saw other projects that they use this like patternfly-react. We should have these things in the Code Guidelines.
There was a problem hiding this comment.
Ok ... I don't like it so much because I usually find a component from its file name in my IDE (I have a shortcut for that in vscode). But if it's only me, no problem you can ignore.
There was a problem hiding this comment.
There is not problem about we can set the same name and create a index inside components with all the exports and will be the same
| }; | ||
|
|
||
| const newRequest = <P>(method: HTTP_VERBS, url: string, queryParams: any, data: any, auth?: AuthToken) => | ||
| export const newRequest = <P>(method: HTTP_VERBS, url: string, queryParams: any, data: any, auth?: AuthToken) => |
There was a problem hiding this comment.
Why is it exported? I don't see it used in a new place other than Api.ts
There was a problem hiding this comment.
you are right, I was testing query the jaeger api to get errorTraces by the browser and I forgot remove it
jotak
left a comment
There was a problem hiding this comment.
Huge and good work! Some comments after code review, I haven't tested locally yet.
| mapStateToProps, | ||
| mapDispatchToProps | ||
| )(LookBack); | ||
|
|
There was a problem hiding this comment.
For example here @jotak
What do you think about this @mtho11 ? I saw other components like https://github.com/kiali/kiali-ui/blob/3ec7c4d7048227e54d6523358bbc8888f86fca1e/src/components/GraphFilter/GraphFilter.tsx where we set mapStateToProps & mapDispatchToProps in the same file instead create a new file in /containers.
I think that could be cleaner if we set this in the same file, the developer can check this props in teh same file without having to go to containers folder and we would have fewer files
|
I'll ping you when this is ready, actually is looking for service.namespace and this is not working with tha TRACING bug |
If you inspect the code you will see the iframe with the service value to productpage.bookinfo if you change the bookinfo to default you will see the traces, this is related with the bug @lucasponce I am thinking about how to fix this in the frontend side. On the other hand I saw that we should change the breadcumb name to traces too |
|
@lucasponce @hhovsepy @jotak Can you verify and check this? |
lucasponce
left a comment
There was a problem hiding this comment.
LGTM
Agreement to consolidate this work and add modifications in following PRs.



Jaeger Integration
Require: kiali/kiali#748
This PR add the feature to get the errorTraces of a service
Issue reference
KIALI-1906
Tasks
Screenshot
When jaeger is not configured