public async Task PatchTracesAsync()
        {
            // Snippet: PatchTracesAsync(string,Traces,CallSettings)
            // Additional: PatchTracesAsync(string,Traces,CancellationToken)
            // Create client
            TraceServiceClient traceServiceClient = TraceServiceClient.Create();
            // Initialize request argument(s)
            string projectId = "";
            Traces traces    = new Traces();
            // Make the request
            await traceServiceClient.PatchTracesAsync(projectId, traces);

            // End snippet
        }
        public async Task PatchTracesAsync_RequestObject()
        {
            // Snippet: PatchTracesAsync(PatchTracesRequest,CallSettings)
            // Create client
            TraceServiceClient traceServiceClient = await TraceServiceClient.CreateAsync();

            // Initialize request argument(s)
            PatchTracesRequest request = new PatchTracesRequest
            {
                ProjectId = "",
                Traces    = new Traces(),
            };
            // Make the request
            await traceServiceClient.PatchTracesAsync(request);

            // End snippet
        }
        /// <inheritdoc />
        public Task ReceiveAsync(IEnumerable <TraceProto> traces, CancellationToken cancellationToken = default)
        {
            GaxPreconditions.CheckNotNull(traces, nameof(traces));

            TraceProto trace = traces.FirstOrDefault();

            // If there are no traces do not try to send them.
            if (trace == null)
            {
                return(CommonUtils.CompletedTask);
            }

            Traces tracesObj = new Traces {
                Traces_ = { traces }
            };

            // If the client task has faulted this will throw when accessing 'Result'
            return(_client.PatchTracesAsync(trace.ProjectId, tracesObj, cancellationToken));
        }