private static ListTracesFixedSizeCollection createEmptyCollection() {
      return new ListTracesFixedSizeCollection(null, 0);
    }
Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you
send matches that of an existing trace, any fields in the existing trace and its spans are
overwritten by the provided values, and any new fields provided are merged with the existing
trace data. If the ID does not match, a new trace is created.

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) {
  PatchTracesRequest request =
      PatchTracesRequest.newBuilder()
          .setProjectId("projectId-894832108")
          .setTraces(Traces.newBuilder().build())
          .build();
  ApiFuture<Empty> future = traceServiceClient.patchTracesCallable().futureCall(request);
  // Do something.
  future.get();
}
}</pre>
java-trace/google-cloud-trace/src/main/java/com/google/cloud/trace/v1/TraceServiceClient.java