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

org.springframework.cloud.sleuth.autoconfig.SleuthBaggageProperties Maven / Gradle / Ivy

There is a newer version: 3.1.11
Show newest version
/*
 * Copyright 2013-2021 the original author or authors.
 *
 * 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
 *
 *      https://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.springframework.cloud.sleuth.autoconfig;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Sleuth Baggage settings.
 *
 * @author Adrian Cole
 * @since 3.0
 */
@ConfigurationProperties("spring.sleuth.baggage")
public class SleuthBaggageProperties {

	/**
	 * Enables correlating the baggage context with logging contexts.
	 */
	private boolean correlationEnabled = true;

	/**
	 * List of fields that should be propagated over the wire.
	 */
	private List correlationFields = new ArrayList<>();

	/**
	 * List of fields that should be accessible within the JVM process but not propagated
	 * over the wire.
	 */
	private List localFields = new ArrayList<>();

	/**
	 * List of fields that are referenced the same in-process as it is on the wire. For
	 * example, the field "x-vcap-request-id" would be set as-is including the prefix.
	 */
	private List remoteFields = new ArrayList<>();

	/**
	 * List of fields that should automatically become tags.
	 */
	private List tagFields = new ArrayList<>();

	public boolean isCorrelationEnabled() {
		return correlationEnabled;
	}

	public void setCorrelationEnabled(boolean correlationEnabled) {
		this.correlationEnabled = correlationEnabled;
	}

	public List getCorrelationFields() {
		return correlationFields;
	}

	public void setCorrelationFields(List correlationFields) {
		this.correlationFields = correlationFields;
	}

	public List getLocalFields() {
		return localFields;
	}

	public void setLocalFields(List localFields) {
		this.localFields = localFields;
	}

	public List getRemoteFields() {
		return remoteFields;
	}

	public void setRemoteFields(List remoteFields) {
		this.remoteFields = remoteFields;
	}

	public List getTagFields() {
		return this.tagFields;
	}

	public void setTagFields(List tagFields) {
		this.tagFields = tagFields;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy