Skip to content

MetricDimensionBuilder

Declares a Dimension that Metrics can be broken down by.

Dimension values are Items of the subject Templates or Unions. Attach the Dimension to a Metric with MetricBuilder.addDimension together with a handler that resolves the value for each Event.

key: string

Dimension key within its App.


readonly prn: string

Platform Resource Name of the declared resource, derived from the App key and resource key.

BaseBuilder.prn

addSubject(subject): this

Adds a Template or Union whose Items are values of this Dimension.

TemplateBuilder | UnionBuilder

Template or Union to add.

this

This builder for chaining.

A country Template, for example, makes each country Item in the Workspace a Dimension value.


setDescription(description): this

Sets the description emitted into the definition and rendered in generated reference and application assets.

string

Human-readable description of the resource.

this

This builder for chaining.

BaseBuilder.setDescription


toDefinition(): MetricDimensionDefinition

Emits the Definition of this Dimension.

MetricDimensionDefinition