import { InstrumentType } from "../export/MetricData.mjs";
import { IAttributesProcessor } from "./AttributesProcessor.mjs";
import "./InstrumentSelector.mjs";
import "./Aggregation.mjs";
import { AggregationOption } from "./AggregationOption.mjs";
//#region src/view/View.d.ts
type ViewOptions = {
/**
* 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.
*/
name?: 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.
*
* @example
changes the description of all selected instruments to 'sample description'
* description: 'sample description'
*/
description?: string;
/**
* 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.
*
* @example drops all attributes with top-level keys except for 'myAttr' and 'myOtherAttr'
* attributesProcessors: [createAllowListProcessor(['myAttr', 'myOtherAttr'])]
* @example drops all attributes
* attributesProcessors: [createAllowListProcessor([])]
* @example allows all attributes except for 'myAttr'
* attributesProcessors: [createDenyListProcessor(['myAttr']]
*/
attributesProcessors?: IAttributesProcessor[];
/**
* Alters the metric stream:
* Alters the Aggregation of the metric stream.
*
* @example changes the aggregation of the selected instrument(s) to ExplicitBucketHistogramAggregation
* aggregation: { type: AggregationType.EXPLICIT_BUCKET_HISTOGRAM, options: { boundaries: [1, 10, 100] } }
* @example changes the aggregation of the selected instrument(s) to LastValueAggregation
* aggregation: { type: AggregationType.LAST_VALUE, options: { boundaries: [1, 10, 100] } }
*/
aggregation?: AggregationOption;
/**
* 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.
*
* @example sets the cardinality limit to 1000
* aggregationCardinalityLimit: 1000
*/
aggregationCardinalityLimit?: number;
/**
* Instrument selection criteria:
* The original type of the Instrument(s).
*
* @example selects all counters
* instrumentType: InstrumentType.COUNTER
* @example selects all histograms
* instrumentType: InstrumentType.HISTOGRAM
*/
instrumentType?: InstrumentType;
/**
* Instrument selection criteria:
* Original name of the Instrument(s) with wildcard support.
*
* @example select all instruments
* instrumentName: '*'
* @example select all instruments starting with 'my.instruments.'
* instrumentName: 'my.instruments.*'
* @example select all instruments named 'my.instrument.requests' exactly
* instrumentName: 'my.instruments.requests'
*/
instrumentName?: string;
/**
* Instrument selection criteria:
* The unit of the Instrument(s).
*
* @example select all instruments with unit 'ms'
* instrumentUnit: 'ms'
*/
instrumentUnit?: string;
/**
* Instrument selection criteria:
* The name of the Meter. No wildcard support, name must match the meter exactly.
*
* @example select all meters named 'example.component.app' exactly
* meterName: 'example.component.app'
*/
meterName?: string;
/**
* Instrument selection criteria:
* The version of the Meter. No wildcard support, version must match exactly.
*
* @example
* meterVersion: '1.0.1'
*/
meterVersion?: string;
/**
* Instrument selection criteria:
* The schema URL of the Meter. No wildcard support, schema URL must match exactly.
*
* @example Select all meters with schema URL 'https://example.com/schema' exactly.
* meterSchemaUrl: 'https://example.com/schema'
*/
meterSchemaUrl?: string;
};
//#endregion
export { ViewOptions };
//# sourceMappingURL=View.d.mts.map