Page MenuHomePhabricator

Make MetricsClient accept instrument configs
Closed, DeclinedPublic8 Estimated Story Points

Description

Parent task/goal: T398480: [Epic] Update instruments configuration for xLab

Background

Currently, we deliver the configuration for the Metrics Platform client inside of stream configuration – sampling unit and sample size, and contextual attributes are configured on a per-stream basis. Therefore, there is a one to one relatonship between streams and instruments. However, this is misaligned with the relationship that we present through xLab. In xLab, an instrument owner can create many instruments that share the same stream, i.e. one stream can have many instruments.

(Emphasis mine)

We need to update the Metrics Platform client (MetricsClient) so that it can use both instrument configs fetched from xLab and stream configs fetched from the EventStreamConfig extension.

AC

  • MetricsClient#submit() still uses stream configs
  • MetricsClient#newInstrument() uses instrument configs first and falls back to stream configs
  • Instrument#submit() submits an event to the stream in the instrument config

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Draft: Allow instruments to be configured separately from streamsrepos/data-engineering/metrics-platform!95phuedxwork/phuedx/T401379main
Customize query in GitLab

Event Timeline

phuedx updated the task description. (Show Details)
Sfaci triaged this task as High priority.Aug 13 2025, 1:43 PM
phuedx changed the point value for this task from 5 to 8.

I'm being bold and declining this.

As I said in T401380#11162042, this is… sticky. However, I've had success with massaging instrument configs into EventStreamConfig-like configs, which I think is enough for now.