Test user-defined distributed metrics (#4559) - #4559
Open
thedavekwon wants to merge 7 commits into
Open
Conversation
Contributor
|
@thedavekwon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114282422. |
) Summary: Remove the private `cleanup_callbacks` fixture and its call sites because isolated tests mutate process-global telemetry registration in child processes while fixture teardown ran in the parent. Isolate the remaining public trace test so every test that installs global telemetry state uses subprocess isolation. Differential Revision: D113848487
Summary: Have Scuba and OTLP expose `PushMetricExporter` sinks while `otel::init_metrics` owns periodic-reader construction, export interval configuration, backend-provided resource attachment, provider construction, and process-global installation. Retain the first `SdkMeterProvider` in a `OnceLock` so repeated or concurrent initialization cannot replace the provider that existing instruments use. Keep resource identity policy in the existing backend configuration rather than introducing hard-coded host or process attributes. Differential Revision: D113848483
) Summary: Add the bounded-retention `metrics` record-batch schema with separate `f64`, `i64`, and `u64` columns, point and resource attributes, sum temporality and monotonicity, and raw explicit-histogram fields. Register the table with distributed telemetry before ingest starts, cover schema round-tripping and retention, and keep the Python binding documentation aligned with the expanded registration API. Differential Revision: D113848482
) Summary: - Register `UdsMetricExporter` as an independent `PeriodicReader` on the process-global `SdkMeterProvider`, alongside Scuba in Meta builds and OTLP in OSS builds. - Encode OTel gauges, sums, and explicit histograms into the aggregation-specific `metric_gauges`, `metric_sums`, and `metric_histograms` tables while preserving exact `f64`, `i64`, and `u64` values plus OTel metadata. - Route each non-empty metric buffer through the lazily activated process-global `UnixSocketSink` as its own nonblocking Arrow frame with existing dropped-frame accounting. - Cover typed row encoding, all three Unix-socket table routes, and distributed SQL queries against `metric_sums`. Differential Revision: D113848481
Summary: Explain how the process-global OTel metric provider feeds both the distributed telemetry UDS exporter and external exporters. Document the aggregation-specific metric tables, their typed columns, a delta-counter SQL query, and metric retention. Update the external OTel example to clarify that instrumentation is shared across exporters. Differential Revision: D114248851
Summary: Add a dedicated guide for Monarch metrics. Explain provider scope, instrument identity and cardinality, periodic collection, job-local distributed telemetry delivery, external OTLP/HTTP export, configuration, and best-effort delivery. Keep the observability overview concise and link the new guide from related documentation. Differential Revision: D114273104
Summary: Add an end-to-end regression test that creates a custom counter through the private `METER` adapter, records point attributes, and verifies the resulting scope, delta sum, and attributes in the distributed `metric_sums` table. Differential Revision: D114282422
thedavekwon
force-pushed
the
export-D114282422
branch
from
July 30, 2026 22:32
723ec61 to
eb034ce
Compare
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:
Add an end-to-end regression test that creates a custom counter through the private
METERadapter, records point attributes, and verifies the resulting scope, delta sum, and attributes in the distributedmetric_sumstable.Differential Revision: D114282422