module Google::Cloud::Trace::V2::TraceService::Paths

Path helper methods for the TraceService API.

Public Instance Methods

project_path(project: "projects/ click to toggle source

Create a fully-qualified Project resource string.

The resource will be in the following format:

`projects/{project}`

@param project [String]

@return [::String]

# File lib/google/cloud/trace/v2/trace_service/paths.rb, line 37
def project_path project:
  "projects/#{project}"
end
span_path(project:, trace:, span: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Span resource string.

The resource will be in the following format:

`projects/{project}/traces/{trace}/spans/{span}`

@param project [String] @param trace [String] @param span [String]

@return [::String]

# File lib/google/cloud/trace/v2/trace_service/paths.rb, line 53
def span_path project:, trace:, span:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "trace cannot contain /" if trace.to_s.include? "/"

  "projects/#{project}/traces/#{trace}/spans/#{span}"
end