1 | /**
|
2 | * Copyright 2018, OpenCensus Authors
|
3 | *
|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | * you may not use this file except in compliance with the License.
|
6 | * You may obtain a copy of the License at
|
7 | *
|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
9 | *
|
10 | * Unless required by applicable law or agreed to in writing, software
|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 | * See the License for the specific language governing permissions and
|
14 | * limitations under the License.
|
15 | */
|
16 | import { LabelValue, MetricDescriptor } from '../metrics/export/types';
|
17 | import { TagValue } from '../tags/types';
|
18 | import { View } from './types';
|
19 | /** Utils to convert Stats data models to Metric data models */
|
20 | export declare class MetricUtils {
|
21 | /**
|
22 | * Gets the corresponding metric type for the given stats type.
|
23 | * @param measure The measure for which to find a metric type
|
24 | * @param aggregation The aggregation for which to find a metric type
|
25 | * @returns The Type of metric descriptor
|
26 | */
|
27 | private static getType;
|
28 | /**
|
29 | * Gets a MetricDescriptor for given view.
|
30 | * @param view The view for which to build a metric descriptor
|
31 | * @returns The MetricDescriptor.
|
32 | */
|
33 | static viewToMetricDescriptor(view: View): MetricDescriptor;
|
34 | /**
|
35 | * Converts tag values to label values.
|
36 | * @param tagValues the list of tag values
|
37 | * @returns The List of label values
|
38 | */
|
39 | static tagValuesToLabelValues(tagValues: Array<TagValue | null>): LabelValue[];
|
40 | }
|