@Nullable @Override public String requestHeader(@Nonnull Invocation invocation, @Nonnull String key) { return invocation.getContext().get(key); }
@Nullable @Override public String requestHeader(@Nonnull Invocation invocation, @Nonnull String key) { return invocation.getContext().get(key); }
@Nullable @Override public Integer statusCode(@Nonnull Response response) { return response.getStatusCode(); } }
@Nullable @Override public Integer statusCode(@Nonnull Response response) { return response.getStatusCode(); } }
@Nullable @Override public String method(@Nonnull Invocation invocation) { return invocation.getOperationMeta().getHttpMethod(); }
@Nullable @Override public String url(@Nonnull Invocation invocation) { return invocation.getEndpoint().getEndpoint(); }
@Nullable @Override public String path(@Nonnull Invocation request) { return request.getOperationMeta().getOperationPath(); }
@Nullable @Override public String url(@Nonnull Invocation invocation) { return invocation.getEndpoint().getEndpoint(); }
@Nullable @Override public String method(@Nonnull Invocation invocation) { return invocation.getOperationMeta().getHttpMethod(); }
@Nullable @Override public String path(@Nonnull Invocation request) { return request.getOperationMeta().getOperationPath(); }
/** The same as the value of a {@link Span#tags()} v2 span tag} or null if this is an address */ @Nullable public String stringValue() { return stringValue; }
/** * The text representation of the primary IPv4 address associated with this a connection. Ex. * 192.168.99.100 Absent if unknown. */ @Nullable public String ipv4() { return ipv4; }
@Nullable @Override Long start_duration() { return start_duration; }
V1Annotation(long timestamp, String value, @Nullable Endpoint endpoint) { this.timestamp = timestamp; if (value == null) throw new NullPointerException("value == null"); this.value = value; this.endpoint = endpoint; }
/** @see Endpoint#serviceName */ public Builder serviceName(@Nullable String serviceName) { this.serviceName = serviceName == null || serviceName.isEmpty() ? null : serviceName.toLowerCase(Locale.ROOT); return this; }
@Nullable @Override public String requestHeader(@Nonnull Invocation invocation, @Nonnull String key) { return invocation.getContext().get(key); }
/** @see Span#shared */ public Builder shared(@Nullable Boolean shared) { if (shared != null) return shared((boolean) shared); flags &= ~(FLAG_SHARED_SET | FLAG_SHARED); return this; }
/** Chaining variant of {@link #parseIp(InetAddress)} */ public Builder ip(@Nullable InetAddress addr) { parseIp(addr); return this; }
static List<LocalDate> getDays(long endTs, @Nullable Long lookback) { List<LocalDate> result = new ArrayList<>(); for (Date javaDate : DateUtil.getDays(endTs, lookback)) { result.add(LocalDate.fromMillisSinceEpoch(javaDate.getTime())); } return result; } }
@Nullable @Override public String method(@Nonnull Invocation invocation) { return invocation.getOperationMeta().getHttpMethod(); }