Repository navigation
Conversation
…r broadcasts rows The metric is defined in the Tenant PromEx plugin and documented in OBSERVABILITY_METRICS.md, but the poller never fired its telemetry event, so the series never appeared on /tenant-metrics.
Member
|
@leandrocp can you remember what happened here? I think you were the last one that touched the PG changes metrics. I'm not sure if we should remove the docs about this metric or add the telemetry event. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[:realtime, :replication, :poller, :changes, :dispatch]with the number of rows it broadcast, sorealtime_replication_poller_changes_dispatchshows up on/tenant-metricscount: 2when a poll returns two rowsWhy
realtime_replication_poller_changes_dispatchis documented in OBSERVABILITY_METRICS.md ("Number of Postgres Changes rows the poller broadcast to subscribers") and defined in the Tenant PromEx plugin, but nothing inlib/emitted its telemetry event. Peep only exports series that have been written, so the metric never appeared for any tenant. #1928 added it together withrealtime_replication_poller_changes_skip, and emitted only the:skipevent in the rate-limited branch ofhandle_list_changes_result/4. The poller test module already attaches a handler for:dispatch, but no test asserted on it.This emits the event right after the broadcast loop, counting rows the same way the
:skipevent does.Validation
origin/main(ce84f7d7): the poller polled and broadcast both rows, but no:dispatchevent arrivedtest/extensions/postgres_cdc_rls/replication_poller_test.exswithsynchronous_commit_delivery_test.exs: 52 passed, 2 excludedtest/realtime/monitoring/prom_ex/plugins/tenant_test.exspasses. Its existing test already maps the event torealtime_replication_poller_changes_dispatchmix format --check-formatted,MIX_ENV=test mix credo --stricton the changed files,git diff --checkmix compile --force --warnings-as-errors,MIX_ENV=test mix compile --warnings-as-errorsandmix format --check-formattedwith the CI-pinned Elixir 1.19.5 / OTP 28 (elixir:1.19.5-otp-28container)I didn't run the full suite or dialyzer locally, and I didn't scrape a live
/tenant-metricsendpoint.