Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
metrics
/
custom_search
Query Custom Metrics
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/metrics/custom_search \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "metric_details": [
    {
      "id": "<string>",
      "metric_name": "<string>",
      "aggregation": "Count"
    }
  ],
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filter_tree": {
    "filter": {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  },
  "interval_minutes": 5,
  "group_by": "<string>"
}
'
{
  "group_by_columns": [
    "<string>"
  ],
  "aggregate_metrics": {},
  "bucketed_metrics": {},
  "ems_captured_error": false,
  "standard_errors": {}
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json
start_time
string<date-time>
required

Include traces from this time onward.

end_time
string<date-time>
required

Include traces up to this time.

metric_details
MetricAggregationDetail · object[]
required

List of metrics to aggregate with their widget IDs and aggregation types (max 100)

Maximum array length: 100
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filter_tree
FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter, LogRecordsNumberFilter, LogRecordsBooleanFilter, LogRecordsCollectionFilter, LogRecordsTextFilter], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] · object

Filter expression tree for complex filtering

interval_minutes
integer
default:5

Time interval in minutes for bucketing

group_by
string | null

Column to group by

Response

Successful Response

group_by_columns
string[]
required
aggregate_metrics
Aggregate Metrics · object
required
bucketed_metrics
Bucketed Metrics · object
required
ems_captured_error
boolean
default:false

Whether any EMS error codes were encountered in the queried metrics

standard_errors
Standard Errors · object

Structured EMS errors for each error code encountered, keyed by code