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

io.micronaut.tracing.opentelemetry.instrument.http.client.OpenTelemetryHttpClientConfig Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
/*
 * Copyright 2017-2022 original 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 io.micronaut.tracing.opentelemetry.instrument.http.client;

import io.micronaut.context.annotation.ConfigurationProperties;
import io.micronaut.core.annotation.NonNull;

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

/**
 * Stores http Open Telemetry Http client configuration.
 *
 * @author Nemanja Mikic
 * @since 4.2.0
 */
@ConfigurationProperties(OpenTelemetryHttpClientConfig.PREFIX)
public class OpenTelemetryHttpClientConfig {
    public static final String PREFIX = "otel.http.client";

    private List responseHeaders = new ArrayList<>(10);
    private List requestHeaders = new ArrayList<>(10);

    /**
     * @return The List of response headers that will be included inside spans
     */
    public List getResponseHeaders() {
        return Collections.unmodifiableList(responseHeaders);
    }

    /**
     * @param responseHeaders The response headers
     */
    public void setResponseHeaders(@NonNull List responseHeaders) {
        this.responseHeaders = responseHeaders;
    }

    /**
     * @return The List of request headers that will be included inside spans
     */
    public List getRequestHeaders() {
        return Collections.unmodifiableList(requestHeaders);
    }

    /**
     * @param requestHeaders The request headers
     */
    public void setRequestHeaders(@NonNull List requestHeaders) {
        this.requestHeaders = requestHeaders;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy