mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:39:04 +08:00
Merge pull request #903 from pranshuchittora/pranshuchittora/feat/transformed-labels-on-tooltips
feat(FE): unit label on graph tooltip
This commit is contained in:
commit
d5a6336239
@ -103,6 +103,21 @@ function Graph({
|
|||||||
legend: {
|
legend: {
|
||||||
display: false,
|
display: false,
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
callbacks: {
|
||||||
|
label(context) {
|
||||||
|
let label = context.dataset.label || '';
|
||||||
|
|
||||||
|
if (label) {
|
||||||
|
label += ': ';
|
||||||
|
}
|
||||||
|
if (context.parsed.y !== null) {
|
||||||
|
label += getYAxisFormattedValue(context.parsed.y, yAxisUnit);
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
layout: {
|
layout: {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
|
@ -187,7 +187,7 @@ function Application({ getWidget }: DashboardProps): JSX.Element {
|
|||||||
widget={getWidget([
|
widget={getWidget([
|
||||||
{
|
{
|
||||||
query: `sum(rate(signoz_latency_count{service_name="${servicename}", span_kind="SPAN_KIND_SERVER"}[2m]))`,
|
query: `sum(rate(signoz_latency_count{service_name="${servicename}", span_kind="SPAN_KIND_SERVER"}[2m]))`,
|
||||||
legend: 'Request per second',
|
legend: 'Requests',
|
||||||
},
|
},
|
||||||
])}
|
])}
|
||||||
yAxisUnit="reqps"
|
yAxisUnit="reqps"
|
||||||
@ -222,7 +222,7 @@ function Application({ getWidget }: DashboardProps): JSX.Element {
|
|||||||
widget={getWidget([
|
widget={getWidget([
|
||||||
{
|
{
|
||||||
query: `max(sum(rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER", status_code="STATUS_CODE_ERROR"}[1m]) OR rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER", http_status_code=~"5.."}[1m]))*100/sum(rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER"}[1m]))) < 1000 OR vector(0)`,
|
query: `max(sum(rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER", status_code="STATUS_CODE_ERROR"}[1m]) OR rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER", http_status_code=~"5.."}[1m]))*100/sum(rate(signoz_calls_total{service_name="${servicename}", span_kind="SPAN_KIND_SERVER"}[1m]))) < 1000 OR vector(0)`,
|
||||||
legend: 'Error Percentage (%)',
|
legend: 'Error Percentage',
|
||||||
},
|
},
|
||||||
])}
|
])}
|
||||||
yAxisUnit="%"
|
yAxisUnit="%"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user