SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: make the label value clickable if it's a link (#5927)
Shaheer Kochai3c5aa86ee2e8
diff --git a/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.styles.scss b/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.styles.scssindex 88ae57f4e8..e325b85113 100644--- a/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.styles.scss+++ b/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.styles.scss@@ -12,6 +12,10 @@font-weight: 400;line-height: 18px;letter-spacing: -0.005em;+ &,+ &:hover {+ color: var(--text-vanilla-400);+ }}&__key {background: var(--bg-ink-400);@@ -20,13 +24,15 @@&__value {background: var(--bg-slate-400);}- color: var(--text-vanilla-400);}.lightMode {.key-value-label {border-color: var(--bg-vanilla-400);- color: var(--text-ink-400);+ &__key,+ &__value {+ color: var(--text-ink-400);+ }&__key {background: var(--bg-vanilla-300);}diff --git a/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.tsx b/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.tsxindex 377c647a3f..c0987ccff1 100644--- a/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.tsx+++ b/frontend/src/periscope/components/KeyValueLabel/KeyValueLabel.tsx@@ -1,6 +1,7 @@import './KeyValueLabel.styles.scss';import { Tooltip } from 'antd';+import { useMemo } from 'react';import TrimmedText from '../TrimmedText/TrimmedText';@@ -15,19 +16,33 @@ export default function KeyValueLabel({badgeValue,maxCharacters = 20,}: KeyValueLabelProps): JSX.Element | null {+ const isUrl = useMemo(() => /^https?:\/\//.test(badgeValue), [badgeValue]);+if (!badgeKey || !badgeValue) {return null;}+return (<div className="key-value-label"><div className="key-value-label__key"><TrimmedText text={badgeKey} maxCharacters={maxCharacters} /></div>- <Tooltip title={badgeValue}>- <div className="key-value-label__value">+ {isUrl ? (+ <a+ href={badgeValue}+ target="_blank"+ rel="noopener noreferrer"+ className="key-value-label__value"+ ><TrimmedText text={badgeValue} maxCharacters={maxCharacters} />- </div>- </Tooltip>+ </a>+ ) : (+ <Tooltip title={badgeValue}>+ <div className="key-value-label__value">+ <TrimmedText text={badgeValue} maxCharacters={maxCharacters} />+ </div>+ </Tooltip>+ )}</div>);}diff --git a/signoz-core-ui b/signoz-core-uinew file mode 160000index 0000000000..f8c925d842--- /dev/null+++ b/signoz-core-ui@@ -0,0 +1 @@+Subproject commit f8c925d842922f8a30063012a7bfb688a3bf0f36