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

com.lightstep.tracer.shared.Status Maven / Gradle / Ivy

There is a newer version: 0.32.0
Show newest version
package com.lightstep.tracer.shared;

import com.lightstep.tracer.grpc.KeyValue;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Internal class used primarily for unit testing and debugging. This is not
 * part of the OpenTracing API and is not a supported API.
 */
public class Status {
    private final Map tags;
    private final long spansDropped;

    Status(List attrs, long spansDropped) {
        tags = new HashMap<>(attrs.size());
        for (KeyValue pair : attrs) {
            tags.put(pair.getKey(), pair.getStringValue());
        }
        this.spansDropped = spansDropped;
    }

    @SuppressWarnings("unused")
    public long getSpansDropped() {
        return spansDropped;
    }

    @SuppressWarnings("unused")
    public boolean hasTag(String key) {
        return tags.containsKey(key);
    }

    @SuppressWarnings("unused")
    public String getTag(String key) {
        return tags.get(key);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy