Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on
01-08-2019
04:26 PM
- edited on
10-19-2021
05:49 PM
by
Claudia.Landiva
The AppDynamics Controller currently supports only ASCII characters in the metric path. Several reserved characters are not supported and can cause undesirable behavior if present in the metric path.
The characters separated by "|" in the metric path are called tokens. The Metric Char Replacement can be used on all metric paths that belong to any of the following scenarios :
These are things to consider when forming a metric path:
In order to use the metricPath CharSequence replacement feature of the Java SDK for AppDynamics Extensions, the following section must be included in your config.yml
:
metricPathReplacements: - replace: replaceWith:
In the section:
For example:
metricPathReplacements: - replace: "&" replaceWith: "" - replace: "-" replaceWith: "_"
This example configures two replacements: replace “&” with “” and replace “-” with “_”. So, if a metric has tokens like “Read&Write”, it will be converted to “ReadWrite”, and tokens like “wait-time” will get converted to “wait_time”.
The metric replacement module also loads some default replacements:
config.yml
to be replaced with another character.
For the “metricChar” replacement to work correctly, the path should not be formed in the extension’s code. Rather, the extensions commons library methods should be used to form the metric path. There are two ways to do this:
public Metric(String metricName, String metricValue, Map<String, ?> metricProperties, String metricPrefix, String... tokens)
MetricPathUtils.buildMetricPath(String metricPrefix, String... metricTokens)
to first build the metric path and then create the Metric object using the Metric constructor that accepts the metric path created earlier.Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form