protected void activate()

in src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverMetrics.java [99:133]


    protected void activate(BundleContext bundleContext) {
        numberOfVanityPathsGauge = registerGauge(
                bundleContext, METRICS_PREFIX + ".numberOfVanityPaths", () -> numberOfVanityPathsSupplier);
        numberOfResourcesWithVanityPathsOnStartupGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfResourcesWithVanityPathsOnStartup",
                () -> numberOfResourcesWithVanityPathsOnStartupSupplier);
        numberOfVanityPathLookupsGauge = registerGauge(
                bundleContext, METRICS_PREFIX + ".numberOfVanityPathLookups", () -> numberOfVanityPathLookupsSupplier);
        numberOfVanityPathBloomNegativesGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfVanityPathBloomNegatives",
                () -> numberOfVanityPathBloomNegativesSupplier);
        numberOfVanityPathBloomFalsePositivesGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfVanityPathBloomFalsePositives",
                () -> numberOfVanityPathBloomFalsePositivesSupplier);
        numberOfResourcesWithAliasedChildrenGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfResourcesWithAliasedChildren",
                () -> numberOfResourcesWithAliasedChildrenSupplier);
        numberOfResourcesWithAliasesOnStartupGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfResourcesWithAliasesOnStartup",
                () -> numberOfResourcesWithAliasesOnStartupSupplier);
        numberOfDetectedInvalidAliasesGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfDetectedInvalidAliases",
                () -> numberOfDetectedInvalidAliasesSupplier);
        numberOfDetectedConflictingAliasesGauge = registerGauge(
                bundleContext,
                METRICS_PREFIX + ".numberOfDetectedConflictingAliases",
                () -> numberOfDetectedConflictingAliasesSupplier);
        unclosedResourceResolvers = metricsService.counter(METRICS_PREFIX + ".unclosedResourceResolvers");
    }