io.opentracing.tag.AbstractTag Java Examples
The following examples show how to use
io.opentracing.tag.AbstractTag.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestUtils.java From opentracing-java with Apache License 2.0 | 5 votes |
public static List<MockSpan> getByTag(List<MockSpan> spans, AbstractTag key, Object value) { List<MockSpan> found = new ArrayList<>(spans.size()); for (MockSpan span : spans) { if (span.tags().get(key.getKey()).equals(value)) { found.add(span); } } return found; }
Example #2
Source File: TestUtils.java From opentracing-java with Apache License 2.0 | 5 votes |
public static MockSpan getOneByTag(List<MockSpan> spans, AbstractTag key, Object value) { List<MockSpan> found = getByTag(spans, key, value); if (found.size() > 1) { throw new IllegalArgumentException("there is more than one span with tag '" + key.getKey() + "' and value '" + value + "'"); } if (found.isEmpty()) { return null; } else { return found.get(0); } }
Example #3
Source File: AbstractJettyTest.java From java-jaxrs with Apache License 2.0 | 4 votes |
public ImmutableTag(AbstractTag<?> tag, Object value) { this(tag.getKey(), value); }