lib/google/cloud/trace/v2/trace_service/rest/client.rb in google-cloud-trace-v2-0.9.0 vs lib/google/cloud/trace/v2/trace_service/rest/client.rb in google-cloud-trace-v2-1.0.0

- old
+ new

@@ -37,10 +37,13 @@ # A span is an individual timed event which forms a node of the trace tree. # A single trace can contain spans from multiple services. # class Client # @private + API_VERSION = "" + + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" include Paths # @private @@ -226,16 +229,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.batch_write_spans.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Trace::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_write_spans.timeout, metadata: call_metadata, retry_policy: @config.rpcs.batch_write_spans.retry_policy @@ -360,15 +364,16 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.create_span.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Trace::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_span.timeout, metadata: call_metadata, retry_policy: @config.rpcs.create_span.retry_policy