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

org.eclipse.edc.spi.telemetry.InMemoryTraceCarrier Maven / Gradle / Ivy

The newest version!
/*
 *  Copyright (c) 2022 Microsoft Corporation
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Contributors:
 *       Microsoft Corporation - Initial implementation
 *
 */

package org.eclipse.edc.spi.telemetry;

import java.util.Collections;
import java.util.Map;

/**
 * Simple {@link TraceCarrier} to use in situations where no entity is persisted (e.g. asynchronous processing)
 */
class InMemoryTraceCarrier implements TraceCarrier {

    private final Map traceContext;

    InMemoryTraceCarrier(Map traceContext) {
        this.traceContext = Collections.unmodifiableMap(traceContext);
    }

    @Override
    public Map getTraceContext() {
        return traceContext;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy