| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # Alipay Mini Program instance-level (per app version) metrics. |
| # Mirrors alipay-mini-program.yaml scoped to service instance. Meaningful only |
| # when the operator follows the recommended serviceInstance == serviceVersion |
| # pattern (see SWIP-12 §2) — otherwise the service_instance_id label is empty |
| # and no instance traffic is produced. |
| |
| expSuffix: instance(['service_name'], ['service_instance_id'], Layer.ALIPAY_MINI_PROGRAM) |
| metricPrefix: meter_alipay_mp_instance |
| filter: "{ tags -> tags.miniprogram_platform == 'alipay' }" |
| |
| metricsRules: |
| - name: app_launch_duration |
| exp: miniprogram_app_launch_duration.avg(['service_name', 'service_instance_id']) |
| - name: first_render_duration |
| exp: miniprogram_first_render_duration.avg(['service_name', 'service_instance_id']) |
| - name: request_cpm |
| exp: miniprogram_request_duration_count.sum(['service_name', 'service_instance_id']) |
| - name: request_duration_percentile |
| exp: miniprogram_request_duration.sum(['service_name', 'service_instance_id', 'le']).histogram("le", TimeUnit.MILLISECONDS).histogram_percentile([50,75,90,95,99]) |