Skip to content

manifests: count telemetry by service on kind - #1070

Merged
Da Huang (git286) merged 1 commit into
agent-substrate:mainfrom
JeffLuoo:obs-kind-telemetry-counts
Aug 25, 2026
Merged

Da Huang (git286) merged 1 commit into
agent-substrate:mainfrom
JeffLuoo:obs-kind-telemetry-counts

Conversation

@JeffLuoo

@JeffLuoo Jeff Luo (JeffLuoo) commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

The volume measurement in current benchmarking repo worked on GKE only. There the managed collector cannot hold a connector, thus benchmarking/telemetry/meter.yaml puts a second collector in front of it and counts the data as it goes through.

This PR adds the support to kind cluster to count the telemetry data.

Follow-up to #749.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@JeffLuoo

Copy link
Copy Markdown
Collaborator Author

cc - Krisztian F (@krisztianfekete)

@JeffLuoo
Jeff Luo (JeffLuoo) force-pushed the obs-kind-telemetry-counts branch 2 times, most recently from 4b9dab5 to 3224a52 Compare August 24, 2026 15:27
Comment on lines +42 to +46
# max_streams bounds the cardinality. There is one stream for each pair
# of a count and a service, thus a limit far above the count of
# services is sufficient.
deltatocumulative:
max_streams: 1000

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I just tested this locally and in max_streams streams are actually per source resource, and since serverboot gives every process its own service.instance.id 1000 is not a lot. Maybe we can use locally, but in meter.yaml we can configure a lot higher value?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Consider this will be used by benchmarking. How about 10000 in kind and 100k in meter.yaml?

At a few hundred bytes per tracked datapoint that's roughly 40~50 MB of data in memory, negligible against the memory limit of collector.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

10000 on kind sounds right to me. I measured ~5KiB per stream end to end, so 10k is ~ 50MiB.

For 100k on the meter the memory is OK with 263MiB live heap, 675MiB RSS, but it becomes 38.5 MiB per scrape at 100k series, and we scrape every 10s from a local Prometheus.

I'd take 20000 there and add sum(otelcol_deltatocumulative_datapoints{error="limit"}) must be 0 + streams_tracked / streams_limit to the pass criteria, since a limit hit deletes series from the scrape with no log line at all.

Wdyt?

@JeffLuoo Jeff Luo (JeffLuoo) Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sg, updated

@JeffLuoo
Jeff Luo (JeffLuoo) force-pushed the obs-kind-telemetry-counts branch 2 times, most recently from 715ea0c to c671804 Compare August 24, 2026 19:41
@JeffLuoo Jeff Luo (JeffLuoo) self-assigned this Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are some flakes (?), but LGTM!

The volume measurement worked on GKE only. There the managed collector
cannot hold a connector, thus benchmarking/telemetry/meter.yaml puts a
second collector in front of it and counts the data as it goes through.
On kind the collector is ours, thus it can do the count itself and the
cluster needs no meter and no extra hop.

Add the count connector to the kind collector. It now gives the same two
counts as the meter, substrate_spans_total{service_name} and
substrate_datapoints_total{service_name}, on the Prometheus exporter port
that it already opens. The connector resolves each key from the attributes
of the item, then the scope, then the resource, thus service.name resolves
with no transform in front of it. Drop the transform from the meter also.

Give the collector its otelcol_* counters also. The default reader binds
to localhost, thus nothing outside the pod could read it. Bind it to each
interface and open port 8888. The counters are the positive control of a
measurement: without them a service that reports zero volume and data that
never arrived look the same.

One scrape job reads both ports. The prometheus.io/scrape annotation can
name one port only, and port 8889 re-exports each metric that the pipelines
push. The pods of ateapi, atelet, and atenet-router already carry that
annotation on 9090, thus an annotation on the collector would bring each of
their series in a second time and sum() would give double. The job keeps
the substrate_* and otelcol_* names only.

The actors need no change. benchmarking/workloads/deploy.sh reads the
endpoint from the ate-otel-config ConfigMap, and the kind overlay of that
ConfigMap already names this collector.

Follow-up to agent-substrate#749.
@JeffLuoo
Jeff Luo (JeffLuoo) force-pushed the obs-kind-telemetry-counts branch from c671804 to 6c96cd3 Compare August 25, 2026 13:26
@git286
Da Huang (git286) merged commit 50bc287 into agent-substrate:main Aug 25, 2026
9 checks passed
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.

4 participants