Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DurationCommand = &cli.Command{ Name: "duration", Usage: "Filter trace spans by total duration", Description: "The duration is calculated by subtracting start from the end time. Can be useful to troubleshoot " + "performance or latency issues within a specific trace", UsageText: "gtrace duration [command options]", Action: durationAction, Flags: []cli.Flag{ &cli.PathFlag{ Name: "file", Aliases: []string{"f"}, Value: "-", Usage: "input file path. '-' means stdin", }, &cli.DurationFlag{ Name: "min", Value: time.Second, Usage: "minimum duration threshold for filtering", }, &cli.BoolFlag{ Name: "summary", Value: true, Usage: "output a short summary of the results", }, &cli.BoolFlag{ Name: "sort", Value: true, Usage: "sort the results in descending order by span duration", }, }, }
View Source
var FormatCommand = &cli.Command{ Name: "format", Usage: "Format trace spans according to a given template", Description: "See more information at: https://cloud.google.com/trace/docs/reference/v1/rest/v1/projects.traces#TraceSpan", UsageText: "gtrace format [command options]", Action: formatAction, Flags: []cli.Flag{ &cli.PathFlag{ Name: "file", Aliases: []string{"f"}, Value: "-", Usage: "input file path. '-' means stdin", }, &cli.StringFlag{ Name: "template", Value: "{{ .Name }} ({{ .Start }} - took {{ .Duration }})\n{{ if .Labels }}\t{{ .Labels }}\n{{ end }}", Usage: "templated pattern to format each span record base on TraceSpan properties\n\t", }, }, }
View Source
var GetCommand = &cli.Command{ Name: "get", Action: getAction, Usage: "Get a specific trace by id from one or more projects", Description: "Retrieve the trace information from the given project(s), aggregate the results and sort the spans by their start time.", UsageText: "gtrace get [command options] <trace-id>", Flags: []cli.Flag{ &cli.StringSliceFlag{ Name: "project", Aliases: []string{"p"}, Usage: "the Google Cloud project ID to use for this invocation. values can be set multiple times or separated by comma", }, &cli.BoolFlag{ Name: "pretty", Usage: "prettify JSON output", }, }, }
View Source
var ListCommand = &cli.Command{ Name: "list", Action: listAction, Usage: "Query traces from a project according to the given conditions", UsageText: "gtrace list [command options]", Flags: []cli.Flag{ &cli.StringFlag{ Name: "project", Aliases: []string{"p"}, Usage: "the Google Cloud project ID to use for this invocation", }, &cli.IntFlag{ Name: "limit", Value: 10, Usage: "maximum number of traces to return", }, &cli.DurationFlag{ Name: "since", Usage: "time duration to inspect since now", }, &cli.StringSliceFlag{ Name: "filter", Aliases: []string{"f"}, Usage: "filter traces according to Cloud Trace API syntax. can be set multiple times. See: https://cloud.google.com/trace/docs/trace-filters#filter_syntax", }, &cli.TimestampFlag{ Name: "start", Layout: "2006-01-02T15:04:05", Usage: "start of the time interval (inclusive) during which the trace data was collected from the application", }, &cli.TimestampFlag{ Name: "end", Layout: "2006-01-02T15:04:05", Usage: "end of the time interval (inclusive) during which the trace data was collected from the application", }, &cli.BoolFlag{ Name: "pretty", Usage: "prettify JSON output", }, }, }
View Source
var SubtreeCommand = &cli.Command{ Name: "subtree", Usage: "Extract span and all its children for a given trace", Description: "Iterating the trace spans according to the original ordering and opt-out all spans that " + "are not descendants the given root span", UsageText: "gtrace subtree [command options]", Action: subtreeAction, Flags: []cli.Flag{ &cli.PathFlag{ Name: "file", Aliases: []string{"f"}, Value: "-", Usage: "input file path. '-' means stdin", }, &cli.Uint64Flag{ Name: "root", Value: 0, Usage: "root span id", }, }, }
View Source
var URLCommand = &cli.Command{ Name: "url", Usage: "Generate a browsable URL for a given trace", UsageText: "gtrace get [--project <project-id>] <trace-id>", Action: urlAction, Flags: []cli.Flag{ &cli.StringFlag{ Name: "project", Aliases: []string{"p"}, Usage: "the Google Cloud project ID to specify on the generated URL.", }, }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.