Skip to content
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

Support upload trace in Zipkin Lens UI #2424

Closed
wants to merge 4 commits into from

Conversation

tacigar
Copy link
Member

@tacigar tacigar commented Mar 4, 2019

color: $dark-2;
font-size: $font-size-xs;
position: absolute;
left: -20px;

&.first {
&--first {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use BEM notation

@@ -1,37 +1,37 @@
.mini-trace-viewer {
.mini-timeline {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename trace-viewer -> timeline

@@ -0,0 +1,3 @@
.trace-page {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sine there is a possibility of writing later, I made a file

@@ -4,8 +4,9 @@ import { BrowserRouter, Route } from 'react-router-dom';

import Layout from './Layout';
import BrowserContainer from '../../containers/Browser/BrowserContainer';
import DetailedTraceSummaryContainer from '../../containers/DetailedTraceSummary/DetailedTraceSummaryContainer';
import TracePageContainer from '../../containers/TracePage/TracePageContainer';
Copy link
Member Author

@tacigar tacigar Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored to reuse DetailedTraceSummary.

  • Remove a process of fetching trace data from DetailedTraceSummary component.
  • Make a new component TracePage, and add that process and DetailedTraceSummary component to the new component.


const renderTickLines = () => {
const renderTimeMarkers = () => {
Copy link
Member Author

@tacigar tacigar Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename ticks → timeMarker

@@ -98,8 +98,8 @@ class Timeline extends React.Component {
serviceNameColumnWidth={serviceNameColumnWidth}
spanNameColumnWidth={spanNameColumnWidth}
numTimeMarkers={defaultNumTimeMarkers}
onServiceNameColumnWidthChange={this.handleServiceNameColumnChange}
onSpanNameColumnWidthChange={this.handleSpanNameColumnChange}
onServiceNameColumnWidthChange={this.handleServiceNameColumnWidthChange}
Copy link
Member Author

@tacigar tacigar Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mistook method name...
These are overlooked bugs...
Maybe current lens does not work correctly... 😭


this.setState({
startTs: 0,
endTs: traceSummary.duration,
Copy link
Member Author

@tacigar tacigar Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startTs and endTs must be set when traceSummary is changed.
If I don't do so, MiniTimeline's range will be displayed as the previous range...

@tacigar tacigar added enhancement ui Zipkin UI labels Mar 4, 2019
style={styles}
>
<input {...getInputProps()} />
<p>Choose file</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the right verbosity here, but I think we should guide users more. The classic UI has a "Browse" button at least, which I think gives more an indication that clicking it will allow one to select a file from their computer to upload. An improvement on that might be to reword with something like "Upload a file by drag/drop or click to browse".
As an aside, we haven't gotten any reports of confusion, but maybe even more explanation somehow about what kind of file/contents are expected would be good. Anyways, that could be a separate discussion from this pull request.

Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it out locally with some of our test data. I left one comment about UI text, but I'm happy to consider it post-merge as well.

@jcarres-mdsol
Copy link
Contributor

Does the trace lookup header have any purpose in this screen?

@shakuzen
Copy link
Member

shakuzen commented Mar 5, 2019

Does the trace lookup header have any purpose in this screen?

@jcarres-mdsol do you mean the search bar at the top where you can select criteria to search? If so, I agree it doesn't have a use on this page and could be confusing, but I think it is there for consistency as a global search context. I'm not a designer so not sure what's best to do about it (hide it for this view only? show it as disabled in this view?), but thank you for bringing it up. What do others think? Maybe something to spin off into a separate issue so we don't block adding this functionality that helps bring Lens up to feature parity with the classic UI.

@jcarres-mdsol
Copy link
Contributor

jcarres-mdsol commented Mar 5, 2019

If it has no use, then should not be there.
Another option would be to, have a "search traceid" component instead, which is also a functionality in the classic UI.

That would make sense, this would be the place where you look at one single trace, either by searching by its traceid in the storage or uploading it from outside storage

@tacigar
Copy link
Member Author

tacigar commented Mar 6, 2019

@jcarres-mdsol Thank you for your feedback.

Another option would be to, have a "search traceid" component instead, which is also a functionality in the classic UI.

Lens already has that feature.

traceid

I tried implementing the feature to upload JSON in the same way as above.
What do you think about this?

fromjson

cc: @shakuzen

@jcarres-mdsol
Copy link
Contributor

It is an intriguing idea, to me it is less discoverable as UI (I did not even see the traceid search option there) but I can see the appeal of a single search bar, something like the browser.

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Mar 6, 2019 via email

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Mar 6, 2019 via email

@codefromthecrypt
Copy link
Member

to be clear.. I like the universal search bar approach with a "traceJSON" button

@shakuzen
Copy link
Member

shakuzen commented Mar 7, 2019

Personally, I worry that if we put a json option in the universal search dropdown, we're overloading the meaning of options there too much. Currently you select a property of a span (in some sense). Putting "fromJSON" or something similar there feels a bit confusing. If we want the JSON upload to be part of the universal search instead of a dedicated view/tab, maybe we should make a dedicated upload button in the universal search? Though that might give the impression that the uploaded JSON is saved.

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Mar 7, 2019 via email

@codefromthecrypt
Copy link
Member

@codefromthecrypt
Copy link
Member

@shakuzen I agree that there could be some confusion about the query aspect of this. Though it does seem to be in some means related to traceId field... that's how it made sense to me. Also, what we are optimizing for.

For example, by putting the concept of locally sourced (which is indeed a bit icky), into the background.. we benefit by retaining the universal search capability which is what I think we want in the foreground.

Maybe we can down-rank the "from json" criteria to the bottom, or possibly quasi hide it as most users won't be using this? For example, if you "expert mode" or click something, then the from json option appears, but remains in a place where it is universally considered.

wdyt?

@codefromthecrypt
Copy link
Member

added for 9am tokyo time monday as that's the only time reasonable and in the schedule. We can collect local feedback even if it is too early. https://cwiki.apache.org/confluence/display/ZIPKIN/2019-03-11+Tapping+into+Zipkin+data

@tacigar
Copy link
Member Author

tacigar commented Mar 11, 2019

Personally I agree with @shakuzen...

Maybe we can down-rank the "from json" criteria to the bottom, or possibly quasi hide it as most users won't be using this? For example, if you "expert mode" or click something, then the from json option appears, but remains in a place where it is universally considered.

umm...
I feel a little complicated.

I think it would be better to add another dropdown menu for traceId and upload JSON like the following.

dropdown

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Mar 11, 2019 via email

@tacigar
Copy link
Member Author

tacigar commented Mar 14, 2019

Yes

@tacigar
Copy link
Member Author

tacigar commented Mar 14, 2019

I'll close this pr
and make a new pr

@tacigar tacigar closed this Mar 14, 2019
@tacigar tacigar deleted the upload-json branch August 3, 2019 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants