You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tools/get_traces.go
+3-10
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,9 @@ import (
12
12
)
13
13
14
14
typeGetTracesHandlerArgsstruct {
15
-
TimeConfig utils.TimeConfig`json:"time_config" jsonschema:"required,description=The time period to get traces for. e.g. if you want to get traces for the last 5 minutes you would set time_period=5 and time_window=Minutes. You can also set an absoulute time range by setting start_time and end_time. Try to use a time period 24 hours or less unless its requested."`
16
-
ServiceNames []string`json:"serviceNames" jsonschema:"description=Service names to return traces for"`
17
-
Filtersmap[string][]string`json:"filters" jsonschema:"description=Filters to apply to the traces. Only the traces that match these filters will be returned. Get the possible filter keys from the get_attribute_keys tool and possible values of a filter key from the get_attribute_values tool"`
18
-
ExcludeFiltersmap[string][]string`json:"excludeFilters" jsonschema:"description=The exclude filters to exclude/eliminate the traces. Traces matching the exclude traces will not be returned. Get the possible exclude filter keys from the get_attribute_keys tool and possible value for the key from the get_attribute_values tool"`
19
-
Regexes []string`json:"regexes" jsonschema:"description=The regexes to apply to the trace's endpoints. Traces with endpoints matching regexes will be returned"`
20
-
ExcludeRegexes []string`json:"excludeRegexes" jsonschema:"description=The regexes to exclude from the trace's endpoints. Traces with endpoints matching regexes will be excluded"`
21
-
Environments []string`json:"environments" jsonschema:"description=The environments to get traces from. If empty traces from all environments will be returned"`
15
+
TimeConfig utils.TimeConfig`json:"time_config" jsonschema:"required,description=The time period to get traces for. e.g. if you want to get traces for the last 5 minutes you would set time_period=5 and time_window=Minutes. You can also set an absoulute time range by setting start_time and end_time. Try to use a time period 1 hour or less unless its requested."`
16
+
Filtersmap[string][]string`json:"filters" jsonschema:"description=Filters to apply to the traces. Only the traces that match these filters will be returned. You have to get the possible filter keys from the get_attribute_keys tool and possible values of a filter key from the get_attribute_values tool. DO NOT GUESS THE FILTER KEYS OR VALUES. Multiple filter keys are ANDed together and values for a filter key are ORed together"`
17
+
ExcludeFiltersmap[string][]string`json:"excludeFilters" jsonschema:"description=The exclude filters to exclude/eliminate the traces. Traces matching the exclude traces will not be returned. You have to get the possible exclude filter keys from the get_attribute_keys tool and possible value for the key from the get_attribute_values tool. DO NOT GUESS THE FILTER KEYS OR VALUES. Multiple keys are ORed together and values for a filter key are ANDed together"`
Copy file name to clipboardexpand all lines: tools/tools.go
+15-15
Original file line number
Diff line number
Diff line change
@@ -23,27 +23,27 @@ var MetoroToolsList = []MetoroTools{
23
23
Handler: GetNamespacesHandler,
24
24
},
25
25
{
26
-
Name: "get_logs",
27
-
Description: `Get logs from all or specific services/hosts/pods running in your Kubernetes cluster. Results are limited to 100 logs lines. Log lines are large so if you want to check existence use get_timeseries_data. Before using this call get_attribute_keys to get the possible log attribute keys which can be used as Filter/ExcludeFilter keys.`,
28
-
Handler: GetLogsHandler,
26
+
Name: "get_logs",
27
+
Description: `Get individual log lines. Results are limited to 100 logs so try to use filters and regexes to narrow down what you are looking for.
28
+
Use this tool when you are interested in the contents of the log lines to get more information to answer why/what.
29
+
If you want to check existence use get_timeseries_data tool with type=logs to get count of logs.`,
30
+
Handler: GetLogsHandler,
29
31
},
30
32
{
31
33
Name: "get_traces",
32
-
Description: `Get traces from all or specific services/hosts/pods running in your Kubernetes cluster. Results are limited to 100 traces. How to use this tool:
33
-
First use get_trace_attributes tool to retrieve the available trace attribute keys which can be used as Filter/ExcludeFilter keys.
34
-
Then use get_trace_attribute_values_for_individual_attribute tool to get the possible values a trace attribute key can be for filtering traces.
35
-
Then you can use this tool (get_traces) to get the specific traces you are looking for.
36
-
e.g. Filter use case: get_traces with filters: {key: [value]} for including specific traces. Where key was retrieved from get_trace_attributes tool and value was retrieved from get_trace_attribute_values_for_individual_attribute tool. Multiple values for a key are ORed together.
37
-
Regexes and ExcludeRegexes arguments can be used to filter traces endpoints that match the given regexes.`,
34
+
Description: `Get individual traces from your cluster. Results are limited to 100 traces so try to use filters to narrow down what you are looking for.
35
+
Use this tool when you are interested in the trace attributes to get more information to answer why/what.
36
+
If you would like to check existence use get_timeseries_data tool with type=trace to get count/p50/p90/p95/p99 of traces instead of get_traces tool.
37
+
`,
38
38
Handler: GetTracesHandler,
39
39
},
40
40
{
41
41
Name: "get_timeseries_data",
42
42
Description: `Get one or more timeseries data for a metric or traces or logs or kubernetes resources. This tool is useful for understanding how the underlying type of data (specific/metric/trace/kubernetes resources/logs) change over time. You can also apply formulas to combine timeseries to calculate rates or ratios or differences etc. How to use this tool:
43
-
First you need the type of timeseries data you are requesting for. This can be one of metric or traces or logs or kubernetes resources. If it is metrics then you need to call the get_metric_names tool to get the available metric names which can be used as MetricName argument for this tool.
44
-
Then use get_attribute_keys tool to retrieve the available attribute keys and get_attribute_values to retrieve values you are interested in to use in Filter/ExcludeFilter keys for this tool.
43
+
First you need the type of timeseries data you are requesting for. This can be one of metric or traces or logs or kubernetes resources. If it is metrics then you HAVE TO call the get_metric_names tool to get the available metric names which can be used as MetricName argument for this tool.
44
+
Then YOU HAVE TO call get_attribute_keys tool to retrieve the available attribute keys and get_attribute_values to retrieve values you are interested in to use in Filter/ExcludeFilter keys for this tool.
45
45
You can also use Splits argument to group/split the metric data by the given metric attribute keys. Only use the attribute keys and values that are available for the MetricName that are returned from get_attribute_keys and get_attribute_values tools. If you are not getting proper results back then you might have forgotten to set the correct attribute keys and values. Try again with the correct attribute keys and values you get from get_attribute_values.
46
-
Metrics of type counter (or with _total suffix) are cumulative metrics but Metoro querying engine already accounts for rate differences when returning the value so you don't need to calculate the rate/monotonic difference yourself. You can just query those metrics as they are without extra functions. If you are in doubt, use the get_metric_metadata tool to get more information (description, type, unit) about the metric and how to use it.
46
+
Metrics of type counter (or with _total suffix) are cumulative metrics but Metoro querying engine already accounts for rate differences when returning the value so you don't need to calculate the rate/monotonic difference yourself. You can just query those metrics as they are without extra functions. If you are in doubt, use the get_metric_metadata tool to get more information (description, type, unit) about the metric and how to use it.
47
47
`,
48
48
Handler: GetMultiMetricHandler,
49
49
},
@@ -87,7 +87,7 @@ And then you can call this tool (get_k8s_events) to get the specific events you
87
87
},
88
88
{
89
89
Name: "get_k8s_events_volume",
90
-
Description: "Get the timeseries data for the number of Kubernetes events in your cluster, whether its filtered by a specific attribute or not. The volume of events are split by EventType so you can see the breakdown of Warning/Normal events.",
90
+
Description: "Get the timeseries data for the number of Kubernetes events in your cluster whether its filtered by a specific attribute or not. The volume of events are split by EventType so you can see the breakdown of Warning/Normal events.",
91
91
Handler: GetK8sEventsVolumeHandler,
92
92
},
93
93
{
@@ -106,8 +106,8 @@ And then you can call this tool (get_k8s_events) to get the specific events you
106
106
// Handler: GetPodsHandler,
107
107
//},
108
108
{
109
-
Name: "get_k8s_service_information",
110
-
Description: "Get detailed information including the YAML of a Kubernetes service. This tool is useful for understanding the configuration of a service.",
109
+
Name: "get_service_yaml",
110
+
Description: "Returns environment and YAML of a kubernetes resource/service. This tool is useful for understanding the YAML configuration of a service.",
0 commit comments