Skip to content

Trace the otlp-trace feature with the OpenTelemetry Astronomy Shop - #308

Merged
wankai123 merged 3 commits into
mainfrom
feat/otlp-trace-astronomy-shop
Oct 15, 2026
Merged

wankai123 merged 3 commits into
mainfrom
feat/otlp-trace-astronomy-shop

Conversation

@wankai123

@wankai123 wankai123 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Why

The otlp-trace feature ran a second copy of the music application under OpenTelemetry auto-instrumentation. To make that copy's traces read well, OpenTelemetry-only code had to go into services the SkyWalking-agent copy also runs (a JMS process span and an agent extension in songs-service). The OpenTelemetry Astronomy Shop is instrumented with the OpenTelemetry SDKs already, and its Postgres, Valkey and Kafka calls feed the OTLP virtual database, cache and MQ layers, which the music app never did.

What

  • otlp-trace runs the Astronomy Shop (3.1.0). Its collector sends every span to the OAP over OTLP/gRPC, and accepts and drops the metrics and logs.
    • Docker Compose: transcribed from the demo's own compose.yaml and compose.full.yaml at 3.1.0, as otel-demo-* services on their own network with aliases for the hostnames the demo uses. Left out: the demo's Jaeger, Grafana, Prometheus, OpenSearch, feature-flag UI and docs site. The storefront is published on host port 8088. config/opentelemetry-demo/ holds the demo's init.sql, flag definitions and product-catalog SDK config, copied unchanged, plus our own collector config. .licenserc.yaml skips the two copied files that carry the OpenTelemetry Authors' header.
    • Kubernetes: make deploy installs the demo's Helm chart (0.42.4) as its own otel-demo release in the otel-demo namespace, because its services take fixed names (frontend, kafka, otel-collector, ...); make undeploy deletes it. deploy/platform/config/opentelemetry-demo/values.yaml turns off the same parts plus its AI components, and replaces the collector config through alternateConfig. The collector runs as one Deployment with no cluster-wide presets.
    • Removed: the music-app copy's Kubernetes template, its values block, its APISIX config and the three auto-instrumentation image variables. Makefile.in has OTEL_DEMO_IMAGE, OTEL_DEMO_IMAGE_TAG and OTEL_DEMO_CHART_VERSION instead.
  • OAP → 8c9901c8, Horizon → 14013366. The OTLP layers need the Trace Analysis Language (Add the Trace Analysis Language (TAL) to analyze OTLP traces into metrics and topology skywalking#14129) and Horizon's OpenTelemetry layer dashboards (feat(layers): bundle the OTLP trace layers under an OpenTelemetry group skywalking-horizon-ui#193); the previous OAP pin predates TAL, so those layers stayed empty.
  • AI Sessionizer → eb30abaa, which renders conversations with Horizon 14013366. Its configuration follows the release: the per-adapter metrics and metrics_lookback became a top-level metrics block that keeps lookback: none (the old keys are now ignored, which would have meant a 72h lookback); claude-code-changes is now changes; the removed claude-code-otlp adapter entry is gone. The scenarios image is unchanged.
  • skywalking-helm → d6d0344 (Adopt the Kubernetes recommended labels: new installs use only them, older releases keep theirs skywalking-helm#203). A fresh install now carries only the Kubernetes recommended labels; an existing release keeps its legacy ones on upgrade. The cilium policies select OAP and Satellite by both label styles, so they match either kind of release.
  • Docker music-app services are named agent::*, as on Kubernetes. As recommendation, the agent's service had the same name as the Astronomy Shop's, so OAP would have merged them into one service with both apps' instances and endpoints.
  • Fixes found while running it:
    • docker-compose.agent.yaml: ActiveMQ's expose lists "1616"; Compose (v5.4 here) rejects 1616:1616 there, so the agent feature did not start.
    • services/recommendation-service/Dockerfile reinstalls apache-skywalking==1.2.0 from PyPI. The agent wheel in apache/skywalking-python:1.2.0-grpc-py3.10-slim lacks the generated skywalking.protocol package (ModuleNotFoundError at start, on arm64 and amd64), so recommendation never reported; the PyPI wheel of the same release has it.

Validation

  • Docker Compose, single-node,agent,otlp-trace:
    • all containers came up healthy;
    • the Astronomy Shop filled OTLP Service with 18 services, plus astronomy-db, valkey-cart:6379 and kafka in the OTLP virtual layers, each with calls per minute;
    • the agent copy filled General Service, Browser and Virtual MQ;
    • checked against an earlier OAP pin (7f6a353a, the TAL merge), not against 8c9901c8.
  • kind, single-node,banyandb,java-agent-injector,otlp-trace:
    • the three releases installed;
    • General Service listed all six agent::* services once recommendation ran the fixed image, built locally;
    • OTLP Service had 17 services, and the three OTLP virtual layers were filled;
    • also against the earlier pins and skywalking-helm 62c64a8.
  • Rendered only:
    • both compose bases (single-node, cluster) merge with otlp-trace and agent;
    • both collector configs pass validate on their collector images;
    • the showcase chart renders on skywalking-helm d6d0344 with the cilium policies on, and each new-label selector matches the rendered OAP or Satellite pod.
  • AI Sessionizer eb30abaa: the migrated config loads (asz sources), and the 10 scenario files of asz-scenarios:6477d6b pass asz scenario check; the chart renders with the asz feature.
  • Not run: the cilium feature (needs the Cilium CLI) and a deploy on the new OAP, Horizon, Sessionizer and skywalking-helm pins.

The otlp-trace feature no longer runs a second copy of the music application: OpenTelemetry-only code
would have had to go into services the SkyWalking-agent copy shares. It runs the OpenTelemetry
Astronomy Shop instead, whose services are instrumented by the OpenTelemetry SDKs, with its collector
sending every span to the OAP. Its Postgres, Valkey and Kafka calls feed the OTLP virtual database,
cache and MQ layers.

On Docker Compose the demo is transcribed from its own 3.1.0 compose files on its own network, without
its Jaeger, Grafana, Prometheus, OpenSearch, feature-flag UI and docs site; the storefront is published
on 8088. Its init.sql, flag definitions and product-catalog SDK config are copied unchanged, and its
collector config is replaced by one that sends traces to the OAP and drops metrics and logs. On
Kubernetes the demo's Helm chart is installed by the Makefile as its own release in the otel-demo
namespace, since its services take fixed names, with the same parts off and the collector config
replaced through alternateConfig.

The OAP moves to a master image with the Trace Analysis Language, which builds the OTLP layers, and the
UI to a Horizon image with their dashboards. skywalking-helm moves to d6d0344, whose fresh installs
carry only the Kubernetes recommended labels, so the cilium policies match OAP and Satellite by both
label styles.

Also fixed on the way: the Docker music-application services are named agent::*, as on Kubernetes, so
recommendation no longer shares a service with the Astronomy Shop's; ActiveMQ's `expose` lists a
container port, since Compose (v5.4 here) rejects `1616:1616` there; and the recommendation image reinstalls
apache-skywalking 1.2.0 from PyPI, since the agent wheel in apache/skywalking-python's 1.2.0 image
lacks skywalking.protocol and the agent never started.
The Sessionizer moves to eb30abaa, which renders conversations with Horizon 1401336, the UI this
showcase now runs. Its configuration follows the release: the per-adapter `metrics` and
`metrics_lookback` became one top-level `metrics` block, which keeps deriving every landed file whatever
its age (the old keys are now ignored, which would have meant a 72h lookback); `claude-code-changes` is
named `changes`; and the `claude-code-otlp` entry, an adapter the release removed, is gone. The
scenarios image is unchanged.
The latest master image. Its two new commits read Kubernetes metadata in the background and build the
dated Elasticsearch index names through one policy; the settings this showcase passes are unchanged.
@wankai123
wankai123 merged commit 7d955be into main Oct 15, 2026
@wankai123
wankai123 deleted the feat/otlp-trace-astronomy-shop branch October 15, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant