Skip to content

feat(observability): add Angular three-signal transition#4195

Open
zqr10159 wants to merge 11 commits into
masterfrom
feature/angular-three-signals
Open

feat(observability): add Angular three-signal transition#4195
zqr10159 wants to merge 11 commits into
masterfrom
feature/angular-three-signals

Conversation

@zqr10159

@zqr10159 zqr10159 commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

This change adds an entity-free three-signal observability transition to the existing Angular frontend on top of apache/master.

  • Accept OTLP Metrics, Logs, and Traces over HTTP/JSON, HTTP/Protobuf, and gRPC.
  • Store and query all three signals through GreptimeDB.
  • Add Angular workbenches for Metrics, Logs, and Traces with shared time controls and cross-signal context handoff.
  • Replace the separate log stream navigation entry with an in-page Query/Live switch while keeping legacy log routes compatible.
  • Add a simple OTLP onboarding form that generates Collector, Java Agent, environment, and curl configurations and verifies each signal independently.

Screenshots

OTLP onboarding

OTLP onboarding form and generated configuration

Metrics and Logs workbenches

Metrics Logs
Metrics query, summary, trend, and samples Logs query, severity and resource filters, summary, and trend

Trace waterfall and cross-signal handoff

Trace span waterfall, attributes, events, and related-signal actions

Scope and compatibility

  • The transition deliberately does not introduce Entity, Workspace, Topology, or the Next.js frontend.
  • Existing Angular monitoring pages remain unchanged; OTLP Metrics use the new /metrics/manage workbench.
  • Existing /log/* routes remain compatible.
  • GreptimeDB is a release prerequisite for the three-signal path.
  • Cross-signal navigation preserves time range, service/resource attributes, trace/span identifiers, environment, and operation context.

Backend and reliability

  • Adds entity-free Metrics and Trace query contracts plus OTLP resource-aware Log filters.
  • Adds Greptime trace schema and log pipeline initialization with explicit startup failure when storage is unavailable.
  • Reuses managed HertzBeat access tokens for HTTP and gRPC bearer authentication.
  • Separates Greptime query, write, and initialization clients with typed timeouts.
  • Adds bounded workloads and fast rejection with retryable 429/503 responses.
  • Cancels stale Angular queries through debounced switchMap flows.
  • Returns HTTP 400 for invalid PromQL and resource filter expressions.
  • Uses typed Trace span-event contracts and calculates trace duration across the complete span coverage.

Angular experience

  • Adds one shared signal time rail with relative presets, absolute ranges, previous/next window movement, manual refresh, and optional auto-refresh.
  • Adds explicit Metrics / Logs / Traces navigation in each workbench.
  • Uses flat operator workbenches instead of nested statistics cards.
  • Metrics provides PromQL autocomplete, trend, series, and samples.
  • Logs provides typed severity filters, advanced resource expressions, trend, paginated results, details, and live mode.
  • Traces provides service, operation, environment, duration, and error filters plus a span waterfall, structured events, attributes, and log/metric handoffs.
  • Keeps all localized copy in the existing Angular i18n resources.

Validation

  • 41 focused backend tests passed across common-core, warehouse, log, and manager.
  • 21 focused Angular interaction tests passed in ChromeHeadless.
  • ./mvnw -pl hertzbeat-startup -am -DskipTests package passed across the 24-module reactor.
  • Angular production build passed.
  • Full Angular TypeScript lint and focused LESS style checks passed.
  • Locale JSON parsing, hardcoded-CJK scan, and git diff --check passed.
  • Real GreptimeDB smoke validation confirmed non-empty Metrics, Logs, and Traces; a correlated trace contained 6 spans, 11 events, 1 error, and 9 matching logs.
  • Authentication and invalid-query smoke checks returned HTTP 401 and 400 respectively.
  • Continuous local OTLP writes recovered automatically after backend restarts.

Known risk

The Angular production build retains the existing initial bundle budget warning: 3.12 MB versus the configured 2.00 MB warning threshold. The build succeeds, but bundle reduction remains follow-up work.

AI assistance: used for draft implementation and test iteration.
Human validation: the maintainer reviewed the production Angular pages throughout implementation; final Maven, Angular, ChromeHeadless, lint, i18n, CJK, diff, and real GreptimeDB/API checks passed.
Risk notes: GreptimeDB is required for the new three-signal path; Entity, Workspace, Topology, alert integration, saved views, and Next.js are intentionally out of scope.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has checked 4713 files.

Valid Invalid Ignored Fixed
2074 15 2624 0
Click to see the invalid file list
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/MetricPoint.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/MetricSeries.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/OtlpMetricsConsole.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/OtlpMetricsInventory.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/SignalPage.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/TraceDetail.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/TraceListItem.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/TraceOverview.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/TraceSpanEvent.java
  • hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/dto/observability/TraceSpanNode.java
  • hertzbeat-log/src/main/resources/greptime/pipelines/hertzbeat_otlp_log_v1.yaml
  • hertzbeat-log/src/main/resources/greptime/tables/hzb_traces.sql
  • web-app/src/app/routes/log/log-manage/log-manage.component.html
  • web-app/src/app/routes/metrics/metrics-manage.component.html
  • web-app/src/app/routes/trace/trace-manage.component.html
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,20 @@
/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*

@@ -0,0 +1,22 @@
/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*

@@ -0,0 +1,18 @@
/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*

@@ -0,0 +1,22 @@
/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*

@@ -0,0 +1,56 @@
version: 2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version: 2
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: 2

@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS hzb_traces (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CREATE TABLE IF NOT EXISTS hzb_traces (
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
CREATE TABLE IF NOT EXISTS hzb_traces (

<nz-range-picker *nzSpaceItem [(ngModel)]="timeRange" nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss"></nz-range-picker>
<input *nzSpaceItem nz-input [placeholder]="'log.manage.trace-id' | i18n" [(ngModel)]="traceId" style="width: 100px" />
<input *nzSpaceItem nz-input [placeholder]="'log.manage.span-id' | i18n" [(ngModel)]="spanId" style="width: 100px" />
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

@@ -0,0 +1,112 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

@@ -0,0 +1,174 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -->

@zqr10159 zqr10159 marked this pull request as ready for review July 11, 2026 15:55
@github-actions github-actions Bot added the infra label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants