Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sentry/api/endpoints/organization_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def query_trace_data(
GlobalParams.START,
GlobalParams.END,
REFERRER_QUERY_PARAM,
TraceParams.TIMESTAMP,
ERROR_ID_QUERY_PARAM,
ADDITIONAL_ATTRIBUTES_PARAM,
INCLUDE_UPTIME_PARAM,
Expand Down
1 change: 1 addition & 0 deletions src/sentry/api/endpoints/organization_trace_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def query_meta_data(
GlobalParams.STATS_PERIOD,
GlobalParams.START,
GlobalParams.END,
TraceParams.TIMESTAMP,
INCLUDE_UPTIME_PARAM,
],
responses={
Expand Down
25 changes: 21 additions & 4 deletions src/sentry/apidocs/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,15 @@ class VisibilityParams:
name="interval",
location="query",
required=False,
type=int,
type={
"anyOf": [
{"type": "integer"},
{"type": "string", "pattern": r"^\d+[smhdw]?$"},
]
},
description="""The size of the bucket for the timeseries to have, must be a value smaller than the window being
queried. If the interval is invalid a default interval will be selected instead""",
queried. Either a number of seconds, or a number with a unit suffix of `s`, `m`, `h`, `d`, or `w`, such as `5m` or
`1h`. If the interval is invalid a default interval will be selected instead""",
)
GROUP_BY = OpenApiParameter(
name="groupBy",
Expand All @@ -933,8 +939,10 @@ class VisibilityParams:
location="query",
required=False,
type=str,
description="""The aggregate field to create the timeseries for, defaults to `count()` when
not included.
many=True,
description="""The aggregate fields to create timeseries for, defaults to `count()` when
not included. Pass the parameter more than once to get a timeseries for each aggregate, for
example `?yAxis=count()&yAxis=p95(span.duration)`.
- `count()` - Total count of events over the period.
- `avg(field)` - Average value of the field over the period.
- `pXX(field)` - Percentile value of the field over the period. One of: `p50`, `p75`, `p90`, `p95`, `p99`, `p100`.
Expand Down Expand Up @@ -1133,6 +1141,15 @@ class TraceParams:
type=str,
description="The ID of the trace, a 32-character hexadecimal string.",
)
TIMESTAMP = OpenApiParameter(
name="timestamp",
location="query",
required=False,
type=str,
description="""The timestamp of an event in the trace, as an ISO 8601 string or Unix timestamp in
seconds. When passed, the query is narrowed to a window around this time, which is faster than
searching the full time range.""",
)


class ProjectParams:
Expand Down
Loading