Skip to content

Commit

Permalink
add examples for the missing endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemumma committed Dec 4, 2024
1 parent b03c40e commit ff38c5a
Showing 1 changed file with 165 additions and 44 deletions.
209 changes: 165 additions & 44 deletions snuba/admin/static/rpc_endpoints/exampleRequestTemplates.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
{
"default": {},
"TraceItemAttributesRequest": {
"v1alpha": {
"meta": {
"project_ids": [1],
"organization_id": 1,
"cogs_category": "something",
"referrer": "something",
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-06T00:00:00Z"
},
"limit": 10,
"offset": 0,
"type": "TYPE_STRING"
}
},
"AttributeValuesRequest": {
"v1alpha": {
"meta": {
"project_ids": [1],
"organization_id": 1,
"cogs_category": "something",
"referrer": "something",
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-06T00:00:00Z"
},
"name": "http.status_code",
"limit": 5,
"offset": 0
}
},
"EndpointTraceItemTable": {
"v1": {
"default": {},
"TraceItemAttributesRequest": {
"v1alpha": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"cogs_category": "something",
"referrer": "something",
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-06T00:00:00Z"
},
"limit": 10,
"offset": 0,
"type": "TYPE_STRING"
}
},
"AttributeValuesRequest": {
"v1alpha": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"cogs_category": "something",
"referrer": "something",
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-06T00:00:00Z"
},
"name": "http.status_code",
"limit": 5,
"offset": 0
}
},
"EndpointTraceItemTable": {
"v1": {
"meta": {
"project_ids": [1],
"project_ids": [
1
],
"organization_id": 1,
"cogs_category": "something",
"referrer": "something",
"start_timestamp":"2024-10-03T00:00:00Z",
"end_timestamp":"2024-10-31T00:00:00Z"
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-31T00:00:00Z"
},
"columns": [
{
Expand All @@ -58,16 +64,18 @@
}
}
],
"limit": 100
}
},
"AggregateBucketRequest": {
"v1alpha": {
"limit": 100
}
},
"AggregateBucketRequest": {
"v1alpha": {
"meta": {
"project_ids": [1],
"project_ids": [
1
],
"organization_id": 1,
"start_timestamp":"2024-10-03T00:00:00Z",
"end_timestamp":"2024-10-04T00:00:00Z"
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-04T00:00:00Z"
},
"key": {
"name": "sentry.duration_ms",
Expand All @@ -76,5 +84,118 @@
"aggregate": "FUNCTION_P99",
"granularity_secs": 900
}
},
"SpanSamplesRequest": {
"v1alpha": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-04T00:00:00Z"
},
"filter": {
"existsFilter": {
"key": {
"type": "TYPE_STRING",
"name": "color"
}
}
},
"keys": [
{
"type": "TYPE_STRING",
"name": "server_name"
}
],
"limit": 61
}
},
"EndpointTraceItemAttributeNames": {
"v1": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-04T00:00:00Z"
},
"limit": 30,
"type": "TYPE_STRING"
}
},
"EndpointTimeSeries": {
"v1": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-04T00:00:00Z"
},
"aggregations": [
{
"aggregate": "FUNCTION_SUM",
"key": {
"type": "TYPE_FLOAT",
"name": "test_metric"
},
"label": "sum",
"extrapolationMode": "EXTRAPOLATION_MODE_NONE"
},
{
"aggregate": "FUNCTION_AVG",
"key": {
"type": "TYPE_FLOAT",
"name": "test_metric"
},
"label": "avg",
"extrapolationMode": "EXTRAPOLATION_MODE_NONE"
}
],
"granularitySecs": "300"
}
},
"CreateSubscriptionRequest": {
"v1": {
"timeSeriesRequest": {
"meta": {
"project_ids": [
1
],
"organization_id": 1,
"start_timestamp": "2024-10-03T00:00:00Z",
"end_timestamp": "2024-10-04T00:00:00Z"
},
"filter": {
"comparisonFilter": {
"key": {
"type": "TYPE_STRING",
"name": "foo"
},
"op": "OP_NOT_EQUALS",
"value": {
"valStr": "bar"
}
}
},
"aggregations": [
{
"aggregate": "FUNCTION_SUM",
"key": {
"type": "TYPE_FLOAT",
"name": "test_metric"
},
"label": "sum",
"extrapolationMode": "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED"
}
]
},
"timeWindowSecs": 300,
"resolutionSecs": 60
}
}
}

0 comments on commit ff38c5a

Please sign in to comment.