Tsukikage7 opened a new pull request, #1128: URL: https://github.com/apache/dubbo-go-samples/pull/1128
## Summary Add a standalone end-to-end observability integration sample under `dubbo-go-samples/observability`. The sample demonstrates: - Dubbo Triple consumer/provider communication; - Nacos service discovery; - OpenTelemetry W3C trace-context propagation; - OTLP HTTP export through OpenTelemetry Collector; - Jaeger trace inspection; - Prometheus metrics collection and Grafana visualization; - application logs correlated with `trace_id` and `span_id`; - successful requests and business-error requests; - timeout, cancellation, provider-unavailable, registry-unavailable, and recovery scenarios; - a repeatable local smoke test. Related issue: https://github.com/apache/dubbo-go/issues/3562 ## Relationship to existing work This PR implements the end-to-end sample and documentation scope described by Workstream 6 in `apache/dubbo-go#3562`. This PR intentionally does not reimplement or take ownership of the following core observability work: - `apache/dubbo-go#3337` — Metrics; - `apache/dubbo-go#3338` — OpenTelemetry diagnostics; - `apache/dubbo-go#3356` — Metadata observability; - `apache/dubbo-go#3551` — OpenTelemetry span names and base attributes; - `apache/dubbo-go#3463` — Metadata mapping metrics and errors; - `apache/dubbo-go#3568` — Dubbo protocol error classification. The historical observability umbrella is: https://github.com/apache/dubbo-go/issues/3292 This PR is focused on integration validation, runnable examples, telemetry pipeline configuration, dashboards, and documentation. It does not change the observability implementation in the `dubbo-go` core repository. ## What changed - Add a standalone `observability/` sample; - Add a Dubbo Triple provider; - Add a Dubbo Triple consumer; - Add generated Triple protocol stubs; - Add Nacos-backed service discovery; - Add OpenTelemetry configuration for both consumer and provider; - Add W3C trace-context propagation through the Dubbo request path; - Add OTLP HTTP export through OpenTelemetry Collector; - Add Jaeger as the trace backend; - Add Prometheus scrape configuration; - Add a provisioned Grafana Prometheus data source; - Add a provisioned `Dubbo Go Observability` Grafana dashboard; - Add trace-correlated application logs; - Add deterministic business-error and timeout scenarios; - Add provider-unavailable and registry-unavailable recovery drills; - Add a repeatable `observability/smoke.sh` validation script; - Add bilingual documentation and a local troubleshooting runbook; - Update the repository-level README files to expose the new sample. ## Screenshots ### Grafana Dashboard The dashboard shows: - successful RPC request rates; - provider latency p95; - business failures; - in-flight RPC requests; - registry failures; - service-unavailable failures. <img width="965" height="837" alt="image" src="https://github.com/user-attachments/assets/121c7095-0bba-454b-ba8b-dc44e13e69ba" /> ### Jaeger Trace The trace view shows: - the consumer root span; - the consumer RPC span; - the provider RPC span; - the cross-service trace relationship; - the measured request duration and span hierarchy. <img width="965" height="837" alt="image" src="https://github.com/user-attachments/assets/22b23254-5f32-463f-8902-9c6d3ac866fc" /> ### Prometheus Targets The targets page shows: - `dubbo-observability-client` target is `UP`; - `dubbo-observability-server` target is `UP`; - Prometheus can scrape both application metrics endpoints. <img width="1280" height="720" alt="image" src="https://github.com/user-attachments/assets/09be85de-871a-4b9f-820c-7edb8e29284a" /> ## Validation The following checks were run locally: - `go test ./observability/...`; - `go test -race ./observability/...`; - `go vet ./observability/...`; - `go build ./observability/...`; - `docker compose -f observability/docker-compose.yaml config -q`; - Grafana dashboard JSON validation; - `bash -n observability/smoke.sh`; - `./observability/smoke.sh`. The runtime integration was also verified with the local stack: - Nacos service discovery; - consumer/provider communication over Dubbo Triple; - client and provider Prometheus endpoints; - Prometheus scraping both application targets; - OpenTelemetry Collector receiving OTLP HTTP data; - Jaeger service visibility; - cross-service consumer/provider traces; - trace-correlated application logs; - successful requests; - forced business errors; - timeout and explicit cancellation; - provider-unavailable and recovery; - registry-unavailable and recovery. ## Scope and compatibility This PR changes only the `dubbo-go-samples` repository. It does not: - modify the `dubbo-go` core repository; - change core observability semantics; - add a local filesystem `replace` directive; - depend on unreleased core APIs; - reimplement the core observability issues listed above; - add a second observability implementation in another sample; - use a non-standard Grafana host port. Grafana uses the standard host port `3000`. If port `3000` is already occupied in a developer's local environment, the existing local process should be stopped or the sample should be run in an environment where the standard port is available. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
