Skip to content

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.

10.3 KB
Raw Blame
// Inside a .module.scss, postcss-modules auto-scopes `@keyframes` identifiers
// and rewrites `animation`/`animation-name` references to match.
@keyframes waterfallLoading {
	0% {
		opacity: 0.3;
		transform: scaleX(0.3);
		transform-origin: left;
	}
	50% {
		opacity: 1;
		transform: scaleX(1);
		transform-origin: left;
	}
	100% {
		opacity: 0.3;
		transform: scaleX(0.3);
		transform-origin: right;
	}
}

.loadingBar {
	height: 2px;
	background: var(--primary);
	animation: waterfallLoading 1.5s ease-in-out infinite;
	flex-shrink: 0;
}

.root {
	overflow-y: hidden;
	overflow-x: hidden;
	max-width: 100%;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.splitPanel {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0px 20px 0px 20px;

	&::-webkit-scrollbar {
		width: 0.1rem;
	}
}

.splitHeader {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	height: 25px;
	background-color: var(--l1-background);
}

.sidebarHeader {
	flex-shrink: 0;
	// Matches the body `.sidebar` border-right so the span-name / timeline
	// divider is continuous from the top of the container through the ruler.
	border-right: 1px solid var(--l2-border);
}

.resizeHandleHeader {
	width: 4px;
	flex-shrink: 0;
}

.statusHeader {
	width: 50px;
	flex-shrink: 0;
}

.timelineHeader {
	flex: 1;
	overflow: hidden;
	padding: 0 15px;
}

.splitBody {
	display: flex;
	position: relative;
}

// Invisible IntersectionObserver targets pinned at the top and bottom of the
// virtualized content. See `useBoundaryPagination`.
.loadMoreSentinel {
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	pointer-events: none;
}

.loadMoreSentinelTop {
	top: 0;
}

.loadMoreSentinelBottom {
	bottom: 0;
}

.sidebar {
	overflow-x: auto;
	overflow-y: hidden;
	flex-shrink: 0;
	border-right: 1px solid var(--l2-border);

	// ResizableBox child renders with a global `.resizable-box__content` class
	// — give it independent horizontal scrolling.
	:global(.resizable-box__content) {
		overflow-x: auto;
		overflow-y: hidden;

		&::-webkit-scrollbar {
			height: 0;
		}

		scrollbar-width: none;
	}

	// The drag handle is painted --l2-border by default, which would stack with
	// our border-right into a 2px divider. Keep it as a hover-only affordance so
	// the border-right stays the sole 1px divider (matching the header segment).
	:global(.resizable-box__handle--right) {
		background: transparent;

		&:hover,
		&:active {
			background: var(--primary);
		}
	}

	&::-webkit-scrollbar {
		height: 0.3rem;
	}

	&::-webkit-scrollbar-thumb {
		background: var(--l3-background);
		border-radius: 4px;
	}
}

.treeTable {
	position: relative;
	border-collapse: collapse;
}

.treeRow {
	display: flex;
	align-items: center;
}

.treeCell {
	display: flex;
	width: 100%;
	height: 28px;
	align-items: center;
	overflow: visible;
	padding: 0;
}

.treeRow:hover,
.treeRow.hoveredSpan {
	// Left end of the row band — round only the outer (left) corners so the
	// highlight joins the status + timeline segments into one continuous band.
	border-radius: 4px 0 0 4px;
	background: color-mix(
		in srgb,
		var(--l3-background) 60%,
		transparent
	) !important;

	.spanOverview {
		background: unset !important;
	}
}

.sidebarResizeHandle {
	width: 4px;
	flex-shrink: 0;
	cursor: col-resize;
	user-select: none;
	touch-action: none;
	background: transparent;
	transition: background 0.15s ease;
	z-index: 1;

	&:hover,
	&:active {
		background: rgba(35, 196, 248, 0.2);
	}
}

.statusCol {
	width: 50px;
	flex-shrink: 0;
	position: relative;
}

.statusCell {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	cursor: pointer;
	padding-left: var(--spacing-2);

	--badge-border-radius: 2px;
	--badge-padding: 3px 6px;
	--badge-line-height: 12px;
	--badge-border-width: 0px;

	&.hoveredSpan {
		// Middle segment of the row band — square so it butts up against the
		// name and timeline segments (no rounded corner at the badge column).
		border-radius: 0;
		background: color-mix(
			in srgb,
			var(--l3-background) 60%,
			transparent
		) !important;
	}

	&.isInterested,
	&.isSelectedNonMatching {
		border-radius: 0;
		background: color-mix(
			in srgb,
			var(--l3-background) 80%,
			transparent
		) !important;
	}

	&.isDimmed {
		opacity: 0.15;
	}
}

.timeline {
	flex: 1;
	position: relative;
	overflow: hidden;
}

.crosshair {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: var(--l3-background);
	pointer-events: none;
	z-index: 1;
}

.timelineRow {
	display: flex;
	align-items: center;
	// Match timelineHeader's 15px padding so bars align with ticks
	padding: 0 15px;

	&:hover,
	&.hoveredSpan {
		// Right end of the row band — round only the outer (right) corners.
		border-radius: 0 4px 4px 0;
		background: color-mix(
			in srgb,
			var(--l3-background) 60%,
			transparent
		) !important;
	}

	&:has(.isInterested),
	&:has(.isSelectedNonMatching) {
		border-radius: 0 4px 4px 0;
		background: color-mix(
			in srgb,
			var(--l3-background) 80%,
			transparent
		) !important;
	}
}

.spanOverview {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	height: 100%;
	width: 100%;
	cursor: pointer;
	position: relative;
	white-space: nowrap;

	&:hover .rowActions {
		opacity: 1;
		pointer-events: auto;
	}

	&.isInterested,
	&.isSelectedNonMatching {
		// Left end of the row band — outer (left) corners only.
		border-radius: 4px 0 0 4px;
		background: color-mix(
			in srgb,
			var(--l3-background) 80%,
			transparent
		) !important;
	}
}

.treeIndent {
	display: inline-block;
	flex-shrink: 0;
}

.treeLine {
	position: absolute;
	background-color: var(--l2-border);
	pointer-events: none;
}

.treeConnector {
	position: absolute;
	width: 14px;
	height: 50%;
	border-left: 1px solid var(--l2-border);
	border-bottom: 1px solid var(--l2-border);
	border-bottom-left-radius: 6px;
	pointer-events: none;
}

// Reserved horizontal space for the chevron — present on every row, filled
// only when the span has children. Keeps sibling icons aligned.
.treeArrowSlot {
	width: 18px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.treeArrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	cursor: pointer;
	color: var(--l1-foreground);
	border-radius: 4px;

	&:hover {
		background: var(--l3-background);
	}
}

// Reserved horizontal space for the subtree-count badge — same reason.
// Right-aligns the badge inside so single-digit counts don't push the icon
// left of where multi-digit counts would put it.
.subtreeCountSlot {
	min-width: 34px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 4px;
}

.subtreeCount {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;

	:global(.badge) {
		font-size: 10px;
		line-height: 14px;
		padding: 0 4px;
		height: 14px;
	}
}

.treeIcon {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	margin: 0 6px;
	background-color: var(--service-dot-color);

	&.hasError {
		box-shadow: 0 0 0 2px rgba(255, 70, 70, 0.3);
	}
}

.aiSpanIcon {
	flex-shrink: 0;
	margin: 0 var(--spacing-2);
}

.treeLabel {
	color: var(--l1-foreground);
	font-family: 'Inter';
	font-size: 13px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 0.01em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
	min-width: 0;
}

.treeServiceName {
	margin-left: 18px;
	color: var(--l3-foreground);
	font-weight: 400;
}

.rowActions {
	position: sticky;
	right: 0;
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
	padding-right: 4px;
	padding-left: 8px;
	flex-shrink: 0;
	height: 100%;
	background: linear-gradient(to left, var(--l2-background) 40%, transparent);
	z-index: 2;
	opacity: 0;
	pointer-events: none;
}

// Also reveal the actions when the parent tree row is hovered.
.treeRow:hover .rowActions,
.treeRow.hoveredSpan .rowActions {
	opacity: 1;
	pointer-events: auto;
}

.spanDuration {
	display: flex;
	align-items: center;
	height: 28px;
	position: relative;
	width: 100%;
	padding: 0 15px;
	cursor: pointer;
}

.spanBar {
	position: absolute;
	height: 18px;
	top: 3px;
	border-radius: 2px;
	display: flex;
	align-items: center;
	padding: 0 8px;
	overflow: hidden;
	cursor: pointer;
	white-space: nowrap;
	// Theme-resolved in JS: dark text on the bright dark-mode fill, white text on
	// the darkened light-mode fill. See SpanDuration in Success.tsx.
	color: var(--span-text-color);
	background-color: var(--span-color);
	border: 1px solid transparent;
}

.spanInfo {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	overflow: hidden;
	z-index: 1;
}

.spanName {
	font-weight: 500;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-grow: 1;
	min-width: 0;
}

.spanDurationText {
	color: inherit;
	font-size: 10px;
	margin-left: 8px;
	flex-shrink: 0;
}

.eventDot {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%) rotate(45deg);
	width: 5px;
	height: 5px;
	background-color: var(--event-dot-bg, var(--bg-robin-500));
	border: 1px solid var(--event-dot-border, var(--bg-robin-600));
	cursor: pointer;
	z-index: 1;

	&.hasError {
		background-color: var(--destructive);
		border-color: var(--destructive);
	}

	&:hover {
		transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
	}
}

// Hover state: solid l2-background fill + border (matches flamegraph)
.timelineRow:hover .spanBar,
.timelineRow.hoveredSpan .spanBar {
	color: var(--span-color);
	background-color: var(--l2-background);
	background-image: none;
	border: 1px solid var(--span-color);
}

// Selected state: solid l3-background fill + dashed border (matches flamegraph)
.isInterested .spanBar,
.isSelectedNonMatching .spanBar {
	color: var(--span-color);
	background-color: var(--l2-background);
	background-image: none;
	border: 1px dashed var(--span-color);
}

.isDimmed {
	opacity: 0.15;
}

// A dimmed span must still show the full-opacity hover state when hovered.
// These win over `.isDimmed` on specificity so brightness is restored across
// the whole row (name column, status cell, and timeline bar) on hover.
.treeRow:hover .isDimmed,
.treeRow.hoveredSpan .isDimmed,
.timelineRow:hover .isDimmed,
.timelineRow.hoveredSpan .isDimmed,
.statusCell:hover.isDimmed,
.statusCell.hoveredSpan.isDimmed {
	opacity: 1;
}

.isHighlighted {
	opacity: 1;
}

.isSelectedNonMatching {
	.treeLabel {
		opacity: 0.5;
	}
}