For applications accessing Application Performance Management (APM) via the OpenTelemetry solution, you can use the OpenTelemetry API to report custom metrics. The APM server can synchronize these metrics to TencentCloud Managed Service for Prometheus (TMP). This page describes how to configure the association between the APM business system and TMP instances. For more information on TMP, see TMP Overview. For more information on APM-TMP DataInLong, see TMP DataInLong and Dashboard Association Display. Directions
1. Log in to the APM console, and select System Configuration > Prometheus integration. 2. In Associate configuration, click Edit to enable the TMP association, and select any TMP instance in the current region, then click OK. Each APM business system can only be associated with up to 1 TMP instance in the same region.
When performing the association operation for the first time, the current account user needs to grant APM permissions to access TMP resources. Follow the prompts in the console to complete the service authorization. The system will automatically create a role named APM_QCSLinkedRoleInPromInstance in Cloud Access Management (CAM). Click Authorize.
3. Click Add metric synchronization rule to specify the metrics to be synchronized to the TMP instance.
For each synchronization rule, you can match the metric name using exact matching, prefix matching, or suffix matching. You can also specify the effective scope of the rule (it can be all applications of the business system or a specific application). When the APM server receives the custom metrics reported by the application, metrics that meet the synchronization rules will be written to the associated TMP instance, while those that do not meet the rules will be discarded.