Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
Cloud Trace API - Class Google::Cloud::Trace::FaradayMiddleware (v0.43.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 0.43.0keyboard_arrow_down
Reference documentation and code samples for the Cloud Trace API class Google::Cloud::Trace::FaradayMiddleware.
Methods
#call
Create a Trace span with the HTTP request/response information.
#initialize
def initialize ( app , opts = {}) - > FaradayMiddleware
Trace FaradayMiddleware
A faraday middleware that setup request/response labels for trace.
Installing
To use this middleware, simply install it in your middleware stack.
Here is an example configuration enable the Trace middleware:
ruby
conn = Faraday.new(:url => 'http://example.com') do |faraday|
# enable cross project tracing with option to true
faraday.use Google::Cloud::Trace::FaradayMiddleware, enable_cross_project_tracing: true
faraday.request :url_encoded # form-encode POST params
faraday.response :logger # log requests to $stdout
faraday.adapter Faraday.default_adapter # use Net::HTTP adapter
end
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]