Java Code Examples for io.micrometer.core.instrument.config.NamingConvention#identity()

The following examples show how to use io.micrometer.core.instrument.config.NamingConvention#identity() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CloudWatchNamingConvention.java    From micrometer with Apache License 2.0 4 votes vote down vote up
public CloudWatchNamingConvention() {
    this(NamingConvention.identity);
}
 
Example 2
Source File: CloudWatchNamingConvention.java    From micrometer with Apache License 2.0 4 votes vote down vote up
public CloudWatchNamingConvention() {
    this(NamingConvention.identity);
}
 
Example 3
Source File: GraphiteHierarchicalNamingConventionTest.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Test
void nameShouldPreserveDot() {
    GraphiteHierarchicalNamingConvention convention = new GraphiteHierarchicalNamingConvention(NamingConvention.identity);
    assertThat(convention.name("my.counter", Meter.Type.COUNTER)).isEqualTo("my.counter");
}
 
Example 4
Source File: GraphiteHierarchicalNamingConventionTest.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Test
void tagKeyShouldSanitizeDot() {
    GraphiteHierarchicalNamingConvention convention = new GraphiteHierarchicalNamingConvention(NamingConvention.identity);
    assertThat(convention.tagKey("my.tag")).isEqualTo("my_tag");
}
 
Example 5
Source File: MoreNamingConventions.java    From armeria with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@link NamingConvention} that uses the user-provided names and tags as they are.
 *
 * @deprecated Use {@link NamingConvention#identity}.
 */
@Deprecated
public static NamingConvention identity() {
    return NamingConvention.identity;
}
 
Example 6
Source File: MoreNamingConventions.java    From armeria with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@link NamingConvention} of <a href="http://metrics.dropwizard.io/">Dropwizard Metrics</a>.
 *
 * @deprecated Use Micrometer's default {@link NamingConvention}.
 */
@Deprecated
public static NamingConvention dropwizard() {
    return Flags.useLegacyMeterNames() ? NamingConvention.identity : NamingConvention.camelCase;
}