diff --git a/public/app/constants/profile-metrics.json b/public/app/constants/profile-metrics.json index dfb969f69a..0e41391ea3 100644 --- a/public/app/constants/profile-metrics.json +++ b/public/app/constants/profile-metrics.json @@ -20,6 +20,13 @@ "group": "goroutine", "unit": "short" }, + "goroutines:goroutine:count:goroutine:count": { + "id": "goroutine:goroutine:count:goroutine:count", + "description": "Current number of goroutines", + "type": "goroutine", + "group": "goroutine", + "unit": "short" + }, "memory:alloc_in_new_tlab_bytes:bytes::": { "id": "memory:alloc_in_new_tlab_bytes:bytes::", "description": "Total bytes allocated inside Thread-Local Allocation Buffers (TLAB)", diff --git a/public/app/pages/TagExplorerView.tsx b/public/app/pages/TagExplorerView.tsx index ffc7928013..9846f60db1 100644 --- a/public/app/pages/TagExplorerView.tsx +++ b/public/app/pages/TagExplorerView.tsx @@ -47,6 +47,7 @@ import { import styles from './TagExplorerView.module.scss'; import { formatTitle } from './formatTitle'; import { FlameGraphWrapper } from '@pyroscope/components/FlameGraphWrapper'; +import profileMetrics from '../constants/profile-metrics.json'; const TIMELINE_SERIES_COLORS = [ Color.rgb(242, 204, 12), @@ -159,6 +160,15 @@ const TIMELINE_WRAPPER_ID = 'explore_timeline_wrapper'; const getTimelineColor = (index: number, palette: Color[]): Color => Color(palette[index % (palette.length - 1)]); +const getProfileMetricTitle = (appName: Maybe) => { + const name = appName.unwrapOr(''); + const profileMetric = (profileMetrics as Record)[name]; + + return profileMetric + ? `${profileMetric.type} (${profileMetric.group})` + : appName.unwrapOr(''); +}; + function TagExplorerView() { const { offset } = useTimeZone(); const dispatch = useAppDispatch(); @@ -375,9 +385,7 @@ function TagExplorerView() { `${a} Tag Breakdown`) - .unwrapOr('Tag Breakdown')} + title={`${getProfileMetricTitle(appName)} Tag Breakdown`} >
@@ -680,7 +688,7 @@ function ExploreHeader({ return (
- {appName.unwrapOr('')} + {getProfileMetricTitle(appName)}
grouped by