-
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
Create dummy /deep-dependencies endpoint #6606
Comments
On it ! |
@yurishkuro I looked through the jaeger-ui and I found the following: The API for deep-dependancy-graph(ddg) is fetchDeepDependencyGraph(query) {
return getJSON(`${ANALYTICS_ROOT}v1/dependencies`, { query });
}, written in export type TDdgSparseUrlState = {
density: EDdgDensity;
decoration?: string;
end?: number;
hash?: string;
operation?: string;
service?: string;
showOp?: boolean;
start?: number;
visEncoding?: string;
}; written in and had the response format as: export type TDdgPayloadEntry = {
operation: string;
service: string;
};
export type TDdgPayloadPath = {
path: TDdgPayloadEntry[];
// TODO: Everett Tech Debt: Fix KeyValuePair types
attributes: {
key: 'exemplar_trace_id'; // eslint-disable-line camelcase
value: string;
}[];
};
export type TDdgPayload = { --> final return type
dependencies: TDdgPayloadPath[]; defined in {
"dependencies": [
{
"path": [
{
"service": "serviceA", // Required: name of service
"operation": "opA" // Required: name of operation
},
{
"service": "serviceB",
"operation": "opB"
}
],
"attributes": [
{
"key": "exemplar_trace_id", // Required: must be this exact string
"value": "abc123" // Required: trace ID as string
}
]
}
]
} Pls have a look If this is correct and I will make the corresponding API in jaeger-query. Also, in the ui, the endpoints are designed for v1, as shown here: export const DEFAULT_API_ROOT = prefixUrl('/api/');
export const ANALYTICS_ROOT = prefixUrl('/analytics/');
fetchDeepDependencyGraph(query) {
return getJSON(`${ANALYTICS_ROOT}v1/dependencies`, { query });
}, So do we create this for v1 or has support for v2 also been created? Right now I had planed on adding the api in |
@adityachopra29 the data shape looks right-ish. Best way it to just try to point the UI to an implementation and see if it renders something. We can change the API endpoints - for compatibility reasons it might be good to have it as a UI config option. By default it could go to |
@yurishkuro I was trying to test my new api, when I ran into a few doubts I wanted to clarify:
to something random, like:
and the the ddg are still generated by the button. I wasnt able to pinpoint the exact service, because the the enpoint seems to be hashed in some way when I tried to look for it in the networks tab of console. Hence, I am not able to understand the required user flow for deep-dependencies. |
@adityachopra29 do not confuse Deep Dependencies button on the Search screen and the actual page. The former constructs the graph purely from the search results and does not need to make calls to the backend. But the top-level endpoint |
@yurishkuro |
The |
Jaeger-UI has "hidden" capabilities, namely a dependency graph view called "deep dependencies", which constructs the graph from paths extracted from traces . The corresponding server code was apparently never migrated out of Uber's internal code base. The proposal is to create the required endpoint in the
jaeger-query
but return some dummy data, which can later be extended with proper support for storage. The dummy data should use some obvious identifiers likesample-service-A
, to make it obvious to the user that the data is not real. An alternative is to return just empty data but that is generally more confusing to the user.This will need to be done with some reverse engineering of the UI code base because there is no other point of reference of what the data format should be. The main component in the UI is
packages/jaeger-ui/src/components/DeepDependencies/*
. An example of a valid URL is/deep-dependencies?operation=the-operation&service=the-service
, but there are also other parameters likeshowOp=1
.The code that generates the real data can be found in https://github.com/jaegertracing/jaeger-analytics-flink.
A successful validation will be
go run ./cmd/jaeger
/deep-dependencies
in the UI to see the dataWe should also add a check to the all-in-one e2e integration test that would query the same endpoint in the UI and get back some sensible result.
The text was updated successfully, but these errors were encountered: