SkillHub Metrics Facade (metrics/SkillHubMetrics.java)

skillhub · server/skillhub-app/src/main/java/com/iflytek/skillhub/metrics/SkillHubMetrics.java · java · Apache-2.0
analytics, infra, lang:java

A Micrometer-based metrics wrapper for tracking application events. Use this to centralize and standardize custom telemetry across backend services.

// Source: https://github.com/iflytek/skillhub | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package com.iflytek.skillhub.metrics;

import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.stereotype.Component;

/**
 * Small facade over Micrometer that centralizes metric names and tags used by backend flows.
 */
@Component
public class SkillHubMetrics {

    private final MeterRegistry meterRegistry;

    public SkillHubMetrics(MeterRegistry meterRegistry) {
        this.meterRegistry = meterRegistry;
    }

    public void incrementUserRegister() {
        meterRegistry.counter("skillhub.user.register").increment();
    }

    public void recordLocalLogin(

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key