@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.cloudtrace.v1.Trace)) { return super.equals(obj); } com.google.devtools.cloudtrace.v1.Trace other = (com.google.devtools.cloudtrace.v1.Trace) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getTraceId().equals(other.getTraceId()); result = result && getSpansList().equals(other.getSpansList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; hash = (53 * hash) + getTraceId().hashCode(); if (getSpansCount() > 0) { hash = (37 * hash) + SPANS_FIELD_NUMBER; hash = (53 * hash) + getSpansList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Project ID of the Cloud project where the trace data is stored. * </pre> * * <code>string project_id = 1;</code> */ public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.devtools.cloudtrace.v1.Trace other) { if (other == com.google.devtools.cloudtrace.v1.Trace.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged();
/** * Sizes a trace. * * @param trace a trace to be sized. * @return the size of the trace. */ @Override public int size(Trace trace) { int size = 0; size += trace.getProjectId().length(); size += trace.getTraceId().length(); for (TraceSpan span : trace.getSpansList()) { size += spanSize(span); } return size; }
/** * Sizes a trace. * * @param trace a trace to be sized. * @return the size of the trace. */ @Override public int size(Trace trace) { int size = 0; size += trace.getProjectId().length(); size += trace.getTraceId().length(); for (TraceSpan span : trace.getSpansList()) { size += spanSize(span); } return size; }
/** * Sizes a trace. * * @param trace a trace to be sized. * @return the size of the trace. */ @Override public int size(Trace trace) { int size = 0; size += trace.getProjectId().length(); size += trace.getTraceId().length(); for (TraceSpan span : trace.getSpansList()) { size += spanSize(span); } return size; }
/** * Sizes a trace. * * @param trace a trace to be sized. * @return the size of the trace. */ @Override public int size(Trace trace) { int size = 0; size += trace.getProjectId().length(); size += trace.getTraceId().length(); for (TraceSpan span : trace.getSpansList()) { size += spanSize(span); } return size; }
@Override public void receive(Traces traces) { if (traces.getTracesCount() == 0) { return; } String projectId = traces.getTraces(0).getProjectId(); processTraces(traces, projectId); }
/** * Adds a trace message to this trace buffer. * * @param trace a trace message to add this trace buffer. */ public void put(Trace trace) { TraceKey traceKey = new TraceKey(trace.getProjectId(), trace.getTraceId()); SpanBuffer spans = traceMap.get(traceKey); if (spans == null) { spans = new SpanBuffer(); traceMap.put(traceKey, spans); } for (TraceSpan span : trace.getSpansList()) { spans.put(span); } }
/** * Adds a trace message to this trace buffer. * * @param trace a trace message to add this trace buffer. */ public void put(Trace trace) { TraceKey traceKey = new TraceKey(trace.getProjectId(), trace.getTraceId()); SpanBuffer spans = traceMap.get(traceKey); if (spans == null) { spans = new SpanBuffer(); traceMap.put(traceKey, spans); } for (TraceSpan span : trace.getSpansList()) { spans.put(span); } }
/** * Adds a trace message to this trace buffer. * * @param trace a trace message to add this trace buffer. */ public void put(Trace trace) { TraceKey traceKey = new TraceKey(trace.getProjectId(), trace.getTraceId()); SpanBuffer spans = traceMap.get(traceKey); if (spans == null) { spans = new SpanBuffer(); traceMap.put(traceKey, spans); } for (TraceSpan span : trace.getSpansList()) { spans.put(span); } }
/** * Adds a trace message to this trace buffer. * * @param trace a trace message to add this trace buffer. */ public void put(Trace trace) { TraceKey traceKey = new TraceKey(trace.getProjectId(), trace.getTraceId()); SpanBuffer spans = traceMap.get(traceKey); if (spans == null) { spans = new SpanBuffer(); traceMap.put(traceKey, spans); } for (TraceSpan span : trace.getSpansList()) { spans.put(span); } }
@Override public void receive(Traces traces) { if (traces.getTracesCount() == 0) { return; } String projectId = traces.getTraces(0).getProjectId(); PatchTracesRequest.Builder requestBuilder = PatchTracesRequest.newBuilder() .setProjectId(projectId) .setTraces(traces); traceService.patchTraces(requestBuilder.build()); }