ViewOptions: {
    aggregation?: metrics.AggregationOption;
    aggregationCardinalityLimit?: number;
    attributesProcessors?: metrics.IAttributesProcessor[];
    description?: string;
    instrumentName?: string;
    instrumentType?: metrics.InstrumentType;
    instrumentUnit?: string;
    meterName?: string;
    meterSchemaUrl?: string;
    meterVersion?: string;
    name?: string;
}

Type declaration

  • Optionalaggregation?: metrics.AggregationOption

    Alters the metric stream: Alters the Aggregation of the metric stream.

    aggregation: { type: AggregationType.EXPLICIT_BUCKET_HISTOGRAM, options: { boundaries: [1, 10, 100] } }
    
    aggregation: { type: AggregationType.LAST_VALUE, options: { boundaries: [1, 10, 100] } }
    
  • OptionalaggregationCardinalityLimit?: number

    Alters the metric stream: Sets a limit on the number of unique attribute combinations (cardinality) that can be aggregated. If not provided, the default limit will be used.

    aggregationCardinalityLimit: 1000
    
  • OptionalattributesProcessors?: metrics.IAttributesProcessor[]

    Alters the metric stream: If provided, the attributes will be modified as defined by the processors in the list. Processors are applied in the order they're provided. If not provided, all attribute keys will be used by default.

    attributesProcessors: [createAllowListProcessor(['myAttr', 'myOtherAttr'])]
    
    attributesProcessors: [createAllowListProcessor([])]
    
    attributesProcessors: [createDenyListProcessor(['myAttr']]
    
  • Optionaldescription?: string

    Alters the metric stream: This will be used as the description of the metrics stream. If not provided, the original Instrument description will be used by default.

    description: 'sample description'
    
  • OptionalinstrumentName?: string

    Instrument selection criteria: Original name of the Instrument(s) with wildcard support.

    instrumentName: '*'
    
    instrumentName: 'my.instruments.*'
    
    instrumentName: 'my.instruments.requests'
    
  • OptionalinstrumentType?: metrics.InstrumentType

    Instrument selection criteria: The original type of the Instrument(s).

    instrumentType: InstrumentType.COUNTER
    
    instrumentType: InstrumentType.HISTOGRAM
    
  • OptionalinstrumentUnit?: string

    Instrument selection criteria: The unit of the Instrument(s).

    instrumentUnit: 'ms'
    
  • OptionalmeterName?: string

    Instrument selection criteria: The name of the Meter. No wildcard support, name must match the meter exactly.

    meterName: 'example.component.app'
    
  • OptionalmeterSchemaUrl?: string

    Instrument selection criteria: The schema URL of the Meter. No wildcard support, schema URL must match exactly.

    meterSchemaUrl: 'https://example.com/schema'
    
  • OptionalmeterVersion?: string

    Instrument selection criteria: The version of the Meter. No wildcard support, version must match exactly.

    meterVersion: '1.0.1'
    
  • Optionalname?: string

    Alters the metric stream: This will be used as the name of the metrics stream. If not provided, the original Instrument name will be used.