IntTagGetter.java 496 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
package org.skywalking.apm.sniffer.mock.trace.tag;

import org.skywalking.apm.trace.Span;
import org.skywalking.apm.trace.tag.IntTag;

/**
 * Test case util for getting the {@link Integer} type of the tag value.
 *
 * @author wusheng
 */
public class IntTagGetter {
    public static Integer get(Span span, IntTag tag) {
13 14 15 16 17 18
        Integer tagValue = span.getIntTag(tag.key());
        if (tagValue == null) {
            return null;
        } else {
            return tagValue;
        }
19 20
    }
}