-
Notifications
You must be signed in to change notification settings - Fork 11
feat: log records in a new tab #916
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
Changes from all commits
0bea80a
dbe6bf2
4242474
04900e5
a396411
e0b6ffb
8c757ba
6d8d2c6
8fed170
e055fb4
5255c03
ac2fec0
748f0a1
f7f9b9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { LogEventsTableViewType } from '../../../shared/components/log-events/log-events-table.component'; | ||
import { LogEvent } from '../../../shared/dashboard/widgets/waterfall/waterfall/waterfall-chart'; | ||
import { TraceDetailService } from './../trace-detail.service'; | ||
|
||
@Component({ | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
template: ` | ||
<ng-container *ngIf="this.logEvents$ | async as logEvents"> | ||
<ht-log-events-table | ||
[logEvents]="logEvents" | ||
logEventsTableViewType="${LogEventsTableViewType.Detailed}" | ||
></ht-log-events-table> | ||
</ng-container> | ||
` | ||
}) | ||
export class TraceLogsComponent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is not a dash page. It works. But I am not sure if we should be diverge from the dashboard pattern. @aaron-steinfeld thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, we should try to reign dashboards back in to pages that look like dashboards. If we later need to embed this as a widget in another page, we could widgetize it for sharing at that point - but no need to build these custom single-page, single-purpose widgets. |
||
public readonly logEvents$: Observable<LogEvent[]>; | ||
|
||
public constructor(private readonly traceDetailService: TraceDetailService) { | ||
this.logEvents$ = this.traceDetailService.fetchLogEvents(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { TraceDetailService } from './../trace-detail.service'; | ||
import { traceSequenceDashboard } from './trace-sequence.dashboard'; | ||
|
||
@Component({ | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
template: ` | ||
<ht-navigable-dashboard | ||
*htLoadAsync="this.traceVariables$ as traceVariables" | ||
class="scrollable-container" | ||
[padding]="0" | ||
[variables]="traceVariables" | ||
navLocation="${traceSequenceDashboard.location}" | ||
> | ||
</ht-navigable-dashboard> | ||
` | ||
}) | ||
export class TraceSequenceComponent { | ||
public readonly traceVariables$: Observable<TraceDetailVariables>; | ||
|
||
public constructor(private readonly traceDetailService: TraceDetailService) { | ||
this.traceVariables$ = this.traceDetailService.fetchTraceDetails().pipe( | ||
map(details => ({ | ||
traceId: details.id, | ||
startTime: details.startTime, | ||
spanId: details.entrySpanId | ||
})) | ||
); | ||
} | ||
} | ||
|
||
interface TraceDetailVariables { | ||
traceId: string; | ||
startTime?: string | number; | ||
spanId?: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,8 @@ | |
.summary-value { | ||
margin-right: 24px; | ||
} | ||
|
||
.tabs { | ||
margin-top: 16px; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are fetching from graphql then we should use
*htLoadAsync
so that we can show the loader iconThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, for this
Data is already being fetched before this, on the page level. and here it will be only used as a static data observable (
shareReplay
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay. I hope that doesn't change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use loadAsync. If in case fetchLogEvents starts returning a new observable, we would have to remember to update this template as well.