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

vmui: show tracing in json view #3316

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

michal-kralik
Copy link
Contributor

Closes #2814

Shows query tracing in json view, if enabled.

@tenmozes tenmozes added the vmui UI for ad-hoc queries in VictoriaMetrics or VictoriaLogs label Nov 5, 2022
Copy link
Contributor

@dmitryk-dk dmitryk-dk left a comment

Choose a reason for hiding this comment

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

LGTM!

This PR added tracing to JSON tab
Screenshot 2022-11-08 at 10 04 06

We have similar tracings on Graph and Table tabs. I think the UI should be consistent

@Loori-R
Copy link
Contributor

Loori-R commented Nov 8, 2022

In this case, you can remove code duplication. Display TracingsView before data view:

        {isTracingEnabled && <TracingsView
          traces={tracesState}
          onDeleteClick={handleTraceDelete}
        />}
        {graphData && period && (displayType === "chart") && <>
          <GraphView data={graphData} period={period} customStep={customStep} query={query} yaxis={yaxis}
            setYaxisLimits={setYaxisLimits} setPeriod={setPeriod}/>
        </>}
        {liveData && (displayType === "code") && <JsonView data={liveData}/>}
        {liveData && (displayType === "table") && <TableView data={liveData} displayColumns={displayColumns}/>}

@michal-kralik
Copy link
Contributor Author

Makes sense, updated.

Copy link
Contributor

@Loori-R Loori-R left a comment

Choose a reason for hiding this comment

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

Thanks

@valyala valyala merged commit 7130af7 into VictoriaMetrics:master Nov 9, 2022
@valyala
Copy link
Collaborator

valyala commented Nov 9, 2022

@michal-kralik , thanks for the pull request!

valyala pushed a commit that referenced this pull request Nov 9, 2022
* vmui: show tracing in json view

* vmui: refactor tracing view
@valyala
Copy link
Collaborator

valyala commented Nov 10, 2022

FYI, this pull request has been integrated into VictoriaMetrics v1.83.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vmui UI for ad-hoc queries in VictoriaMetrics or VictoriaLogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vmui: add trace to json response if it's enable
5 participants