com.netflix.spectator.sidecar.SidecarConfig Maven / Gradle / Ivy
/*
* Copyright 2014-2022 Netflix, Inc.
*
* Licensed 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 com.netflix.spectator.sidecar;
import com.netflix.spectator.api.RegistryConfig;
import java.util.Map;
/**
* Configuration for sidecar registry.
*/
public interface SidecarConfig extends RegistryConfig {
/**
* Returns the location for where to emit the data. The default is
* {@code udp://127.0.0.1:1234}. Supported values include:
*
*
* none: to disable output.
* stdout: write to standard out for the process.
* stderr: write to standard error for the process.
* file://$path_to_file: write to a file.
* udp://$host:$port: write to a UDP socket.
*
*/
default String outputLocation() {
String v = get("sidecar.output-location");
return (v == null) ? "udp://127.0.0.1:1234" : v;
}
/**
* Returns the common tags to apply to all metrics.
*/
default Map commonTags() {
return CommonTags.commonTags(System::getenv);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy