You have explicitly configured a reporter list, resulting in the slf4j reporter being ignored:

2020-07-06 13:48:22,191 INFO org.apache.flink.configuration.GlobalConfiguration            - Loading configuration property: metrics.reporters, prom 2020-07-06 13:48:23,203 INFO org.apache.flink.runtime.metrics.ReporterSetup                - Excluding reporter slf4j, not configured in reporter list (prom).

Note that nowadays metrics.reporters is no longer required; the set of reporters is automatically determined based on configured properties; the only use-case is disabling a reporter without having to remove the entire configuration.
I'd suggest to just remove the option, try again, and report back.

On 06/07/2020 16:35, Chesnay Schepler wrote:
Please enable debug logging and search for warnings from the metric groups/registry/reporter.

If you cannot find anything suspicious, you can also send the foll log to me directly.

On 06/07/2020 16:29, Manish G wrote:
Job is an infinite streaming one, so it keeps going. Flink configuration is as:

metrics.reporter.slf4j.class: org.apache.flink.metrics.slf4j.Slf4jReporter
metrics.reporter.slf4j.interval: 30 SECONDS



On Mon, Jul 6, 2020 at 7:57 PM Chesnay Schepler <ches...@apache.org <mailto:ches...@apache.org>> wrote:

    How long did the job run for, and what is the configured interval?


    On 06/07/2020 15:51, Manish G wrote:
    Hi,

    Thanks for this.

    I did the configuration as mentioned at the link(changes in
    flink-conf.yml, copying the jar in lib directory), and
    registered the Meter with metrics group and invoked markEvent()
    method in the target code. But I don't see any related logs.
    I am doing this all on my local computer.

    Anything else I need to do?

    With regards
    Manish

    On Mon, Jul 6, 2020 at 5:24 PM Chesnay Schepler
    <ches...@apache.org <mailto:ches...@apache.org>> wrote:

        Have you looked at the SLF4J reporter?

        
https://ci.apache.org/projects/flink/flink-docs-release-1.10/monitoring/metrics.html#slf4j-orgapacheflinkmetricsslf4jslf4jreporter

        On 06/07/2020 13:49, Manish G wrote:
        > Hi,
        >
        > Is it possible to log Flink metrics in application logs
        apart from
        > publishing it to Prometheus?
        >
        > With regards





Reply via email to