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

passing time filters #64086

Merged
merged 4 commits into from
Jul 31, 2023
Merged

passing time filters #64086

merged 4 commits into from
Jul 31, 2023

Conversation

alburthoffman
Copy link
Contributor

What is this feature?
refer to jaegertracing/jaeger#4150

The old jaeger /api/traces/:id does not have start and end time parameters, which makes it a global scan request.
Our data volume is super high. And it is very slow to do a global scan.

We had discussed this with jaeger team and the time parameters would be helpful in this case.
The changes happen in Grafana jaeger console instead of jaeger project side, as we implement the API by ourself.
And the APIs are more likely to integrate with Grafana console.

Why do we need this feature?
It's good for those data sources which expose Jaeger APIs, but dont use jaeger in the backend.
The time filters are more flexible.

Who is this feature for?
any implementation which wants to integrate with Grafana Jaeger console

Which issue(s) does this PR fix?:
jaegertracing/jaeger#4150

#64085

Fixes #

Special notes for your reviewer:

@alburthoffman alburthoffman requested a review from a team as a code owner March 2, 2023 23:07
@CLAassistant
Copy link

CLAassistant commented Mar 2, 2023

CLA assistant check
All committers have signed the CLA.

@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels Mar 2, 2023
@aocenas
Copy link
Member

aocenas commented Mar 3, 2023

To understand this, you have a custom Jaeger compatible backend that supports the range params, while jaeger itself will just ignore these, right?

I wonder if this is something that we should make opt-in setting in a config page anyway. The reason is whoever uses other backends or if Jeager starts supporting the range params, it may create a situation where users won't be able to easily find their traces because for example in Explore the default time range is last 1h which may be too narrow. So we sort of consciously don't use the range for traces because if the user has a traceID they usually just don't assume they also have to figure out in what time range they want to search for it (traceID being unique and there should be a single instance of it).

@alburthoffman
Copy link
Contributor Author

what's config page? it would be helpful if you could point me to that.

@alburthoffman
Copy link
Contributor Author

@aocenas it does not mean time range has to be skipped when "traceID being unique and there should be a single instance of it". What I understand is time range is not required. It can be optional.

The time range is usually there when user finds one trace id from log or exemplar or grafana console or search API. Especially when user open one trace in grafana console, the assumption is the same time range with the searching range.

User should expect slowness when there is no time range, which means global scan in the whole tracing storage. They would expect much faster response with time range info.

Since time range is optional, grafana jaeger datasource can have one option in the setting page to turn this on or off.

@aocenas
Copy link
Member

aocenas commented Mar 8, 2023

@alburthoffman by config page I mean data source config page for Jaeger where this setting can be configured case by case basis

export const ConfigEditor = ({ options, onOptionsChange }: Props) => {
.

The time range is usually there when user finds one trace id from log or exemplar or grafana console or search API. Especially when user open one trace in grafana console, the assumption is the same time range with the searching range.

This is true but it's not the only way people use tracing. Imagine getting trace ID from other sources. You can have a logging tool that does not have data links. You have to copy the trace id into new Explore window and do the search. If you don't also match the exact time range you won't get any results.

At the same time this is not a Jaeger feature. Even if Jaeger just ingores it by default I am reluctant to make use if it as a default state when the reason for being there is IMHO a minority usecase when somebody has a custom Jaeger backend which implements time range params. That is why I would rather make this an optional config that needs to be opted in rather then a default.

@alburthoffman
Copy link
Contributor Author

@aocenas thx for ur guidance. Working to add a setting for this feature. Thx

@alburthoffman alburthoffman requested a review from a team as a code owner March 11, 2023 01:36
@alburthoffman alburthoffman requested review from joshhunt and JoaoSilvaGrafana and removed request for a team March 11, 2023 01:36
@alburthoffman
Copy link
Contributor Author

@joshhunt @JoaoSilvaGrafana @aocenas please help review the PR. Thx

@alburthoffman
Copy link
Contributor Author

@aocenas could u take a look? thx

@grafanabot
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@grafanabot grafanabot added stale Issue with no recent activity and removed stale Issue with no recent activity labels Apr 15, 2023
@adrapereira adrapereira self-assigned this May 15, 2023
@grafanabot
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@grafanabot grafanabot added stale Issue with no recent activity and removed stale Issue with no recent activity labels Jun 15, 2023
@tonypowa
Copy link
Contributor

@aocenas
hi Andrej

whenever possible, could you please review the latest commit from the contributor?
thank you

@aocenas
Copy link
Member

aocenas commented Jul 11, 2023

@tonypowa sorry @adrapereira is handling this now. At the same time this seems like a niche usecase which probably does not make anything else worse but at the same time we are still contemplating whether it makes sense to merge this.

@adrapereira adrapereira added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Jul 31, 2023
@adrapereira adrapereira added this to the 10.2.x milestone Jul 31, 2023
@adrapereira adrapereira merged commit cdfbcb2 into grafana:main Jul 31, 2023
17 checks passed
sarahzinger pushed a commit that referenced this pull request Aug 1, 2023
* passing time filters

* add settings

* Cleanup and merge fixes

---------

Co-authored-by: André Pereira <adrapereira@gmail.com>
chauchausoup pushed a commit to chauchausoup/grafana that referenced this pull request Sep 15, 2023
* passing time filters

* add settings

* Cleanup and merge fixes

---------

Co-authored-by: André Pereira <adrapereira@gmail.com>
@zerok zerok modified the milestones: 10.2.x, 10.2.0 Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes pr/external This PR is from external contributor triage/pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants