All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.flink.configuration.MetricOptions Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.configuration;

import org.apache.flink.annotation.PublicEvolving;

import static org.apache.flink.configuration.ConfigOptions.key;

/**
 * Configuration options for metrics and metric reporters.
 */
@PublicEvolving
public class MetricOptions {

	/**
	 * An optional list of reporter names. If configured, only reporters whose name matches any of the names in the list
	 * will be started. Otherwise, all reporters that could be found in the configuration will be started.
	 *
	 * 

Example: *

{@code
	 * metrics.reporters = foo,bar
	 *
	 * metrics.reporter.foo.class = org.apache.flink.metrics.reporter.JMXReporter
	 * metrics.reporter.foo.interval = 10
	 *
	 * metrics.reporter.bar.class = org.apache.flink.metrics.graphite.GraphiteReporter
	 * metrics.reporter.bar.port = 1337
	 * }
*/ public static final ConfigOption REPORTERS_LIST = key("metrics.reporters") .noDefaultValue(); public static final ConfigOption REPORTER_CLASS = key("metrics.reporter..class") .noDefaultValue() .withDescription("The reporter class to use for the reporter named ."); public static final ConfigOption REPORTER_INTERVAL = key("metrics.reporter..interval") .noDefaultValue() .withDescription("The reporter interval to use for the reporter named ."); public static final ConfigOption REPORTER_CONFIG_PARAMETER = key("metrics.reporter..") .noDefaultValue() .withDescription("Configures the parameter for the reporter named ."); public static final ConfigOption FAIL_ON_REPORTER_NOT_INSTANTIATED = key(String.format("metrics.reporter..%s", ConfigConstants.METRICS_REPORTER_FAIL_ON_NOT_INSTANTIATED)) .defaultValue(false) .withDescription("The reporter would fail on not instantiated successfully."); /** The delimiter used to assemble the metric identifier. */ public static final ConfigOption SCOPE_DELIMITER = key("metrics.scope.delimiter") .defaultValue("."); /** The scope format string that is applied to all metrics scoped to a JobManager. */ public static final ConfigOption SCOPE_NAMING_JM = key("metrics.scope.jm") .defaultValue(".jobmanager") .withDescription("Defines the scope format string that is applied to all metrics scoped to a JobManager."); /** The scope format string that is applied to all metrics scoped to a TaskManager. */ public static final ConfigOption SCOPE_NAMING_TM = key("metrics.scope.tm") .defaultValue(".taskmanager.") .withDescription("Defines the scope format string that is applied to all metrics scoped to a TaskManager."); /** The scope format string that is applied to all metrics scoped to a job on a JobManager. */ public static final ConfigOption SCOPE_NAMING_JM_JOB = key("metrics.scope.jm.job") .defaultValue(".jobmanager.") .withDescription("Defines the scope format string that is applied to all metrics scoped to a job on a JobManager."); /** The scope format string that is applied to all metrics scoped to a job on a TaskManager. */ public static final ConfigOption SCOPE_NAMING_TM_JOB = key("metrics.scope.tm.job") .defaultValue(".taskmanager..") .withDescription("Defines the scope format string that is applied to all metrics scoped to a job on a TaskManager."); /** The scope format string that is applied to all metrics scoped to a task. */ public static final ConfigOption SCOPE_NAMING_TASK = key("metrics.scope.task") .defaultValue(".taskmanager....") .withDescription("Defines the scope format string that is applied to all metrics scoped to a task."); /** The scope format string that is applied to all metrics scoped to an operator. */ public static final ConfigOption SCOPE_NAMING_OPERATOR = key("metrics.scope.operator") .defaultValue(".taskmanager....") .withDescription("Defines the scope format string that is applied to all metrics scoped to an operator."); /** The number of measured latencies to maintain at each operator. */ public static final ConfigOption LATENCY_HISTORY_SIZE = key("metrics.latency.history-size") .defaultValue(128) .withDescription("Defines the number of measured latencies to maintain at each operator."); /** The sampling rate of tracing metric based on records count. */ public static final ConfigOption TRACING_SAMPLE_COUNT_INTERVAL = key("metrics.tracing.sample.count-interval") .defaultValue(100); public static final ConfigOption PROCESS_TREE_TM_METRICS_ENABLED = key("metrics.process-tree.tm.enabled") .defaultValue(false) .withDescription("Enable process-tree metrics of TM."); public static final ConfigOption PROCESS_TREE_TM_METRICS_UPDATE_INTERVAL = key("metrics.process-tree.tm.update-interval") .defaultValue(10000L) .withDescription("Interval of updating process-tree metrics of TM in milliseconds."); public static final ConfigOption PROCESS_TREE_TM_METRICS_SMAPS_BASED_ENABLED = key("metrics.process-tree.tm.smaps-based.enabled") .defaultValue(false) .withDescription("Enable smaps based process-tree metrics of TM, only works when " + PROCESS_TREE_TM_METRICS_ENABLED.key() + " is enabled."); private MetricOptions() { } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy