001/* 002 * Copyright 2012-2018 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx; 018 019import java.time.Duration; 020 021import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties; 022import org.springframework.boot.context.properties.ConfigurationProperties; 023 024/** 025 * {@link ConfigurationProperties} for configuring metrics export to SignalFX. 026 * 027 * @author Jon Schneider 028 * @author Andy Wilkinson 029 * @author Stephane Nicoll 030 * @since 2.0.0 031 */ 032@ConfigurationProperties(prefix = "management.metrics.export.signalfx") 033public class SignalFxProperties extends StepRegistryProperties { 034 035 /** 036 * Step size (i.e. reporting frequency) to use. 037 */ 038 private Duration step = Duration.ofSeconds(10); 039 040 /** 041 * SignalFX access token. 042 */ 043 private String accessToken; 044 045 /** 046 * URI to ship metrics to. 047 */ 048 private String uri = "https://ingest.signalfx.com"; 049 050 /** 051 * Uniquely identifies the app instance that is publishing metrics to SignalFx. 052 * Defaults to the local host name. 053 */ 054 private String source; 055 056 @Override 057 public Duration getStep() { 058 return this.step; 059 } 060 061 @Override 062 public void setStep(Duration step) { 063 this.step = step; 064 } 065 066 public String getAccessToken() { 067 return this.accessToken; 068 } 069 070 public void setAccessToken(String accessToken) { 071 this.accessToken = accessToken; 072 } 073 074 public String getUri() { 075 return this.uri; 076 } 077 078 public void setUri(String uri) { 079 this.uri = uri; 080 } 081 082 public String getSource() { 083 return this.source; 084 } 085 086 public void setSource(String source) { 087 this.source = source; 088 } 089 090}