1 /* 2 * Copyright 2018, OpenCensus Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package io.opencensus.contrib.spring.sleuth.v1x; 18 19 import io.opencensus.common.ExperimentalApi; 20 import org.springframework.boot.context.properties.ConfigurationProperties; 21 22 /** 23 * Sleuth annotation settings. 24 * 25 * @since 0.16 26 */ 27 @ExperimentalApi 28 @ConfigurationProperties("spring.opencensus.sleuth") 29 public class OpenCensusSleuthProperties { 30 31 private boolean enabled = true; 32 33 /** Returns whether OpenCensus trace propagation is enabled. */ 34 public boolean isEnabled() { 35 return this.enabled; 36 } 37 38 /** Enables OpenCensus trace propagation. */ 39 public void setEnabled(boolean enabled) { 40 this.enabled = enabled; 41 } 42 } 43