Skip to content
Start here

Observability

ObservabilityTelemetry

List keys
workers.observability.telemetry.keys(TelemetryKeysParams**kwargs) -> SyncSinglePage[TelemetryKeysResponse]
POST/accounts/{account_id}/workers/observability/telemetry/keys
Run a query
workers.observability.telemetry.query(TelemetryQueryParams**kwargs) -> TelemetryQueryResponse
POST/accounts/{account_id}/workers/observability/telemetry/query
List values
workers.observability.telemetry.values(TelemetryValuesParams**kwargs) -> SyncSinglePage[TelemetryValuesResponse]
POST/accounts/{account_id}/workers/observability/telemetry/values
Prepare live tail
workers.observability.telemetry.live_tail(TelemetryLiveTailParams**kwargs) -> TelemetryLiveTailResponse
POST/accounts/{account_id}/workers/observability/telemetry/live-tail
Live tail heartbeat
workers.observability.telemetry.live_tail_heartbeat(TelemetryLiveTailHeartbeatParams**kwargs) -> object
POST/accounts/{account_id}/workers/observability/telemetry/live-tail/heartbeat
ModelsExpand Collapse
class TelemetryKeysResponse: …
key: str
last_seen_at: float
type: Literal["string", "boolean", "number"]
One of the following:
"string"
"boolean"
"number"
class TelemetryQueryResponse: …

Complete results of a query run. The populated fields depend on the requested view type (events, calculations, invocations, traces, or agents).

run: Run

Represents a single execution of a query against Workers Observability data, including the query definition, execution status, and performance statistics.

id: str

Unique identifier for this query run.

account_id: str

Cloudflare account ID that owns this query run.

dry: bool

Whether this was a dry run (results not persisted).

granularity: float

Number of time-series buckets used for the query. Higher values produce more detailed series data.

query: RunQuery

A saved query definition with its parameters, metadata, and ownership information.

id: str
adhoc: bool

If the query wasn’t explcitly saved

created: Union[str, datetime]
formatdate-time
One of the following:
str
datetime
created_by: str
description: Optional[str]
maxLength1000
name: str

Query name

maxLength250
minLength1
parameters: RunQueryParameters
calculations: Optional[List[RunQueryParametersCalculation]]

Create Calculations to compute as part of the query.

One of the following:
class RunQueryParametersCalculationUnionMember0: …
operator: Literal["count", "COUNT"]
One of the following:
"count"
"COUNT"
alias: Optional[str]
key: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
class RunQueryParametersCalculationUnionMember1: …
key: str
operator: Literal["uniq", "max", "min", 33 more]
One of the following:
"uniq"
"max"
"min"
"sum"
"avg"
"median"
"p001"
"p01"
"p05"
"p10"
"p25"
"p75"
"p90"
"p95"
"p99"
"p999"
"stddev"
"variance"
"COUNT_DISTINCT"
"MAX"
"MIN"
"SUM"
"AVG"
"MEDIAN"
"P001"
"P01"
"P05"
"P10"
"P25"
"P75"
"P90"
"P95"
"P99"
"P999"
"STDDEV"
"VARIANCE"
alias: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
datasets: Optional[List[str]]

Set the Datasets to query. Leave it empty to query all the datasets.

filter_combination: Optional[Literal["and", "or", "AND", "OR"]]

Set a Flag to describe how to combine the filters on the query.

One of the following:
"and"
"or"
"AND"
"OR"
filters: Optional[List[RunQueryParametersFilter]]

Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.

One of the following:
class RunQueryParametersFilterUnionMember0: …
filter_combination: Literal["and", "or", "AND", "OR"]
One of the following:
"and"
"or"
"AND"
"OR"
filters: List[object]
kind: Literal["group"]
class RunQueryParametersFilterWorkersObservabilityFilterLeaf: …

A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.

key: str

Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.

operation: Literal["includes", "not_includes", "starts_with", 27 more]

Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.

One of the following:
"includes"
"not_includes"
"starts_with"
"ends_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
"ENDS_WITH"
type: Literal["string", "number", "boolean"]

Data type of the filter field. Must match the actual type of the key being filtered.

One of the following:
"string"
"number"
"boolean"
kind: Optional[Literal["filter"]]

Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.

value: Optional[Union[str, float, bool, null]]

Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).

One of the following:
str
float
bool
group_bys: Optional[List[RunQueryParametersGroupBy]]

Define how to group the results of the query.

type: Literal["string", "number", "boolean"]
One of the following:
"string"
"number"
"boolean"
value: str
havings: Optional[List[RunQueryParametersHaving]]

Configure the Having clauses that filter on calculations in the query result.

key: str
operation: Literal["eq", "neq", "gt", 3 more]
One of the following:
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
value: float
limit: Optional[int]

Set a limit on the number of results / records returned by the query

maximum100
minimum0
needle: Optional[RunQueryParametersNeedle]

Define an expression to search using full-text search.

value: RunQueryParametersNeedleValue
is_regex: Optional[bool]
match_case: Optional[bool]
order_by: Optional[RunQueryParametersOrderBy]

Configure the order of the results returned by the query.

value: str

Configure which Calculation to order the results by.

order: Optional[Literal["asc", "desc"]]

Set the order of the results

One of the following:
"asc"
"desc"
updated: Union[str, datetime]
formatdate-time
One of the following:
str
datetime
updated_by: str
status: Literal["STARTED", "COMPLETED"]

Current execution status of the query run.

One of the following:
"STARTED"
"COMPLETED"
timeframe: RunTimeframe

Time range for the query execution. ‘from’ must be earlier than ‘to’. No fractional milliseconds.

from_: int

Start timestamp for the query timeframe. Unix timestamp in milliseconds

maximum253402300799999
minimum0
to: int

End timestamp for the query timeframe. Unix timestamp in milliseconds

maximum253402300799999
minimum0
user_id: str

ID of the user who initiated the query run.

created: Optional[str]

ISO-8601 timestamp when the query run was created.

statistics: Optional[RunStatistics]

Query performance statistics from the database (does not include network latency).

bytes_read: float

Number of uncompressed bytes read from the table.

elapsed: float

Time in seconds for the query to run.

rows_read: float

Number of rows scanned from the table.

abr_level: Optional[float]

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

updated: Optional[str]

ISO-8601 timestamp when the query run was last updated.

statistics: Statistics

Query performance statistics from the database. Includes execution time, rows scanned, and bytes read. Does not include network latency.

bytes_read: float

Number of uncompressed bytes read from the table.

elapsed: float

Time in seconds for the query to run.

rows_read: float

Number of rows scanned from the table.

abr_level: Optional[float]

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

agents: Optional[List[Agent]]

Agent run summaries. Present when the query view is ‘agents’. Each entry represents one trace containing at least one agent invocation.

id: str

Stable pagination cursor for this agent run.

errors: List[str]

Distinct errors reported by spans in the run.

models: List[str]

Distinct models reported by chat spans across the run’s trace.

providers: List[str]

Distinct GenAI providers reported by chat spans in the run.

services: List[str]

Worker services represented in the run’s trace.

spans: float

Number of spans in the run’s trace.

status: Literal["completed", "error"]

Observed run status.

One of the following:
"completed"
"error"
trace_duration_ms: float

Total trace duration in milliseconds.

trace_end_ms: float

End of the run’s trace as a Unix epoch in milliseconds.

trace_id: str

Trace identifier for this agent run.

trace_start_ms: float

Start of the run’s trace as a Unix epoch in milliseconds.

agent_id: Optional[str]

ID from the earliest agent invocation that provides one.

agent_name: Optional[str]

Name from the earliest agent invocation that provides one.

conversation_id: Optional[str]

Conversation ID from the earliest invocation that provides one.

input_tokens: Optional[float]

Input tokens summed across chat spans in the run’s trace; informational, not billing data.

output_tokens: Optional[float]

Output tokens summed across chat spans in the run’s trace; informational, not billing data.

calculations: Optional[List[Calculation]]

Aggregated calculation results. Present when the query view is ‘calculations’. Contains computed metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series data.

aggregates: List[CalculationAggregate]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

groups: Optional[List[CalculationAggregateGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
calculation: str
series: List[CalculationSeries]
data: List[CalculationSeriesData]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

first_seen: Optional[str]
groups: Optional[List[CalculationSeriesDataGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
last_seen: Optional[str]
time: str
alias: Optional[str]
compare: Optional[List[Compare]]

Comparison calculation results from the previous time period. Present when the compare option is enabled. Same structure as calculations.

aggregates: List[CompareAggregate]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

groups: Optional[List[CompareAggregateGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
calculation: str
series: List[CompareSeries]
data: List[CompareSeriesData]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

first_seen: Optional[str]
groups: Optional[List[CompareSeriesDataGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
last_seen: Optional[str]
time: str
alias: Optional[str]
distribution: Optional[Distribution]

Bucketed 2D histogram of a numeric field over time. Present when chartType is ‘distribution’.

bins: List[str]

Time-bucket labels (ISO-8601 strings), one per matrix column.

bucket_boundaries: List[float]

Raw bucket edges in the value’s native unit, length buckets.length + 1. Used for the colour scale and percentile mapping.

bucket_mode: Literal["log", "linear"]

Bucketing scheme used to derive the boundaries. ‘log’ produces geometric edges; ‘linear’ produces fixed-width edges.

One of the following:
"log"
"linear"
buckets: List[str]

Value-range labels, one per matrix row (e.g. ‘50–100ms’).

matrix: List[List[float]]

Sampling-corrected counts. matrix[bucketIdx][binIdx] is the estimated number of events in value-bucket ‘bucketIdx’ during time-bin ‘binIdx’.

events: Optional[Events]

Individual event results. Present when the query view is ‘events’. Contains the matching log lines and their metadata.

count: Optional[float]

Total number of events matching the query (may exceed the number returned due to limits).

events: Optional[List[EventsEvent]]

List of individual telemetry events matching the query.

metadata: EventsEventMetadata

Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.

id: str

Unique event ID. Use as the cursor value for offset-based pagination.

account: Optional[str]

Cloudflare account identifier.

cloud_service: Optional[str]

Cloudflare product that generated this event (e.g. workers, pages).

cold_start: Optional[int]
exclusiveMinimum
minimum0
cost: Optional[int]

Estimated cost units for this invocation.

exclusiveMinimum
minimum0
duration: Optional[int]

Span duration in milliseconds.

exclusiveMinimum
minimum0
end_time: Optional[int]

Span end time as a Unix epoch in milliseconds.

minimum0
end_time_ns: Optional[str]

Span end time as a Unix epoch in nanoseconds.

error: Optional[str]

Error message, present when the log represents an error.

error_template: Optional[str]

Templatized version of the error message used for grouping similar errors.

event_size: Optional[int]

Size of the stored telemetry event in bytes.

minimum0
fingerprint: Optional[str]

Content-based fingerprint used to group similar events.

level: Optional[str]

Log level (e.g. log, debug, info, warn, error).

message: Optional[str]

Log message text.

message_template: Optional[str]

Templatized version of the log message used for grouping similar messages.

metric_name: Optional[str]

Metric name when the event represents a metric data point.

origin: Optional[str]

Origin of the event (e.g. fetch, scheduled, queue).

parent_span_id: Optional[str]

Span ID of the parent span in the trace hierarchy.

provider: Optional[str]

Infrastructure provider identifier.

rayid: Optional[str]

Cloudflare Ray ID from the cf-ray header of the request that triggered the invocation.

region: Optional[str]

Cloudflare data center / region that handled the request.

request_id: Optional[str]

Cloudflare request ID that ties all logs from a single invocation together.

service: Optional[str]

Worker script name that produced this event.

span_id: Optional[str]

Span ID for this individual unit of work within a trace.

span_name: Optional[str]

Human-readable name for this span.

span_status: Optional[Literal["unset", "ok", "error"]]

OpenTelemetry span status. Present only on spans. unset when the span did not set a status, including spans recorded before status was captured.

One of the following:
"unset"
"ok"
"error"
span_status_message: Optional[str]

OpenTelemetry span status message. Present only on spans when the status is error and a message was set.

stack_id: Optional[str]

Stack / deployment identifier.

start_time: Optional[int]

Span start time as a Unix epoch in milliseconds.

minimum0
start_time_ns: Optional[str]

Span start time as a Unix epoch in nanoseconds.

status_code: Optional[int]

HTTP response status code returned by the Worker.

exclusiveMinimum
minimum0
timestamp_ns: Optional[str]

Event time as a Unix epoch in nanoseconds.

trace_duration: Optional[int]

Total duration of the entire trace in milliseconds.

exclusiveMinimum
minimum0
trace_id: Optional[str]

Distributed trace ID linking spans across services.

transaction_name: Optional[str]

Logical transaction name for this request.

trigger: Optional[str]

What triggered the invocation (e.g. GET /users, POST /orders, queue message).

type: Optional[str]

Event type classifier (e.g. cf-worker-event, cf-worker-log).

url: Optional[str]

Request URL that triggered the Worker invocation.

dataset: str

The dataset this event belongs to (e.g. cloudflare-workers).

source: Union[str, Dict[str, object]]

Raw log payload. May be a string or a structured object depending on how the log was emitted.

One of the following:
str
Dict[str, object]
timestamp: int

Event timestamp as a Unix epoch in milliseconds.

minimum0
containers: Optional[Dict[str, object]]

Cloudflare Containers event information that enriches your logs for identifying and debugging issues.

workers: Optional[EventsEventWorkers]

Cloudflare Workers event information that enriches your logs for identifying and debugging issues.

One of the following:
class EventsEventWorkersUnionMember0: …
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
script_name: str
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[EventsEventWorkersUnionMember0Gateway]
request_id: str
outcome: Optional[str]
preview: Optional[EventsEventWorkersUnionMember0Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[EventsEventWorkersUnionMember0ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
class EventsEventWorkersUnionMember1: …
cpu_time_ms: float
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
outcome: str
script_name: str
wall_time_ms: float
diagnostics_channel_events: Optional[List[EventsEventWorkersUnionMember1DiagnosticsChannelEvent]]
channel: str
message: str
timestamp: float
dispatch_namespace: Optional[str]
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[EventsEventWorkersUnionMember1Gateway]
request_id: str
preview: Optional[EventsEventWorkersUnionMember1Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[EventsEventWorkersUnionMember1ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
fields: Optional[List[EventsField]]

List of fields discovered in the matched events. Useful for building dynamic UIs.

key: str

Field name present in the matched events.

type: str

Data type of the field (string, number, or boolean).

series: Optional[List[EventsSeries]]

Time-series data for the matched events, bucketed by the query granularity.

data: List[EventsSeriesData]
aggregates: EventsSeriesDataAggregates
Deprecated_count: int
exclusiveMinimum
minimum0
Deprecated_interval: float
exclusiveMinimum
minimum0
Deprecated_first_seen: Optional[str]
Deprecated_last_seen: Optional[str]
Deprecatedbin: Optional[object]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

errors: Optional[float]
groups: Optional[Dict[str, Union[str, float, bool]]]

Groups in the query results.

One of the following:
str
float
bool
time: str
invocations: Optional[Dict[str, List[Invocation]]]

Events grouped by invocation (request ID). Present when the query view is ‘invocations’. Each key is a request ID mapping to all events from that invocation.

metadata: InvocationMetadata

Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.

id: str

Unique event ID. Use as the cursor value for offset-based pagination.

account: Optional[str]

Cloudflare account identifier.

cloud_service: Optional[str]

Cloudflare product that generated this event (e.g. workers, pages).

cold_start: Optional[int]
exclusiveMinimum
minimum0
cost: Optional[int]

Estimated cost units for this invocation.

exclusiveMinimum
minimum0
duration: Optional[int]

Span duration in milliseconds.

exclusiveMinimum
minimum0
end_time: Optional[int]

Span end time as a Unix epoch in milliseconds.

minimum0
end_time_ns: Optional[str]

Span end time as a Unix epoch in nanoseconds.

error: Optional[str]

Error message, present when the log represents an error.

error_template: Optional[str]

Templatized version of the error message used for grouping similar errors.

event_size: Optional[int]

Size of the stored telemetry event in bytes.

minimum0
fingerprint: Optional[str]

Content-based fingerprint used to group similar events.

level: Optional[str]

Log level (e.g. log, debug, info, warn, error).

message: Optional[str]

Log message text.

message_template: Optional[str]

Templatized version of the log message used for grouping similar messages.

metric_name: Optional[str]

Metric name when the event represents a metric data point.

origin: Optional[str]

Origin of the event (e.g. fetch, scheduled, queue).

parent_span_id: Optional[str]

Span ID of the parent span in the trace hierarchy.

provider: Optional[str]

Infrastructure provider identifier.

rayid: Optional[str]

Cloudflare Ray ID from the cf-ray header of the request that triggered the invocation.

region: Optional[str]

Cloudflare data center / region that handled the request.

request_id: Optional[str]

Cloudflare request ID that ties all logs from a single invocation together.

service: Optional[str]

Worker script name that produced this event.

span_id: Optional[str]

Span ID for this individual unit of work within a trace.

span_name: Optional[str]

Human-readable name for this span.

span_status: Optional[Literal["unset", "ok", "error"]]

OpenTelemetry span status. Present only on spans. unset when the span did not set a status, including spans recorded before status was captured.

One of the following:
"unset"
"ok"
"error"
span_status_message: Optional[str]

OpenTelemetry span status message. Present only on spans when the status is error and a message was set.

stack_id: Optional[str]

Stack / deployment identifier.

start_time: Optional[int]

Span start time as a Unix epoch in milliseconds.

minimum0
start_time_ns: Optional[str]

Span start time as a Unix epoch in nanoseconds.

status_code: Optional[int]

HTTP response status code returned by the Worker.

exclusiveMinimum
minimum0
timestamp_ns: Optional[str]

Event time as a Unix epoch in nanoseconds.

trace_duration: Optional[int]

Total duration of the entire trace in milliseconds.

exclusiveMinimum
minimum0
trace_id: Optional[str]

Distributed trace ID linking spans across services.

transaction_name: Optional[str]

Logical transaction name for this request.

trigger: Optional[str]

What triggered the invocation (e.g. GET /users, POST /orders, queue message).

type: Optional[str]

Event type classifier (e.g. cf-worker-event, cf-worker-log).

url: Optional[str]

Request URL that triggered the Worker invocation.

dataset: str

The dataset this event belongs to (e.g. cloudflare-workers).

source: Union[str, Dict[str, object]]

Raw log payload. May be a string or a structured object depending on how the log was emitted.

One of the following:
str
Dict[str, object]
timestamp: int

Event timestamp as a Unix epoch in milliseconds.

minimum0
containers: Optional[Dict[str, object]]

Cloudflare Containers event information that enriches your logs for identifying and debugging issues.

workers: Optional[InvocationWorkers]

Cloudflare Workers event information that enriches your logs for identifying and debugging issues.

One of the following:
class InvocationWorkersUnionMember0: …
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
script_name: str
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[InvocationWorkersUnionMember0Gateway]
request_id: str
outcome: Optional[str]
preview: Optional[InvocationWorkersUnionMember0Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[InvocationWorkersUnionMember0ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
class InvocationWorkersUnionMember1: …
cpu_time_ms: float
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
outcome: str
script_name: str
wall_time_ms: float
diagnostics_channel_events: Optional[List[InvocationWorkersUnionMember1DiagnosticsChannelEvent]]
channel: str
message: str
timestamp: float
dispatch_namespace: Optional[str]
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[InvocationWorkersUnionMember1Gateway]
request_id: str
preview: Optional[InvocationWorkersUnionMember1Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[InvocationWorkersUnionMember1ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
traces: Optional[List[Trace]]

Trace summaries matching the query. Present when the query view is ‘traces’. Each entry represents a distributed trace with its spans, duration, and services involved.

root_span_name: str

Name of the root span that initiated the trace.

root_transaction_name: str

Logical transaction name for the root span.

service: List[str]

List of Worker services involved in the trace.

spans: float

Total number of spans in the trace.

trace_duration_ms: float

Total duration of the trace in milliseconds.

trace_end_ms: float

Trace end time as a Unix epoch in milliseconds.

trace_id: str

Unique identifier for the distributed trace.

trace_start_ms: float

Trace start time as a Unix epoch in milliseconds.

errors: Optional[List[str]]

Error messages encountered during the trace, if any.

class TelemetryValuesResponse: …
dataset: str
key: str
type: Literal["string", "boolean", "number"]
One of the following:
"string"
"boolean"
"number"
value: Union[str, float, bool]
One of the following:
str
float
bool
class TelemetryLiveTailResponse: …
ws_url: str

WebSocket URL clients connect to in order to stream live tail events.

formaturi

ObservabilityAgents

ObservabilityAgentsTraces

List Agent Traces
workers.observability.agents.traces.list(TraceListParams**kwargs) -> SyncCursorPagination[TraceListResponse]
GET/accounts/{account_id}/workers/observability/agents/traces
Get an Agent Trace
workers.observability.agents.traces.get(strtrace_id, TraceGetParams**kwargs) -> TraceGetResponse
GET/accounts/{account_id}/workers/observability/agents/traces/{traceId}
List Agent Trace events
workers.observability.agents.traces.events(strtrace_id, TraceEventsParams**kwargs) -> TraceEventsResponse
GET/accounts/{account_id}/workers/observability/agents/traces/{traceId}/events
ModelsExpand Collapse
class TraceListResponse: …
agents: List[str]

Sorted distinct gen_ai.agent.name values of authorized Agent invocations in the Trace within the effective window. Includes every Agent in the Trace, not only those matching the agent filter.

conversation_ids: List[str]

Sorted distinct gen_ai.conversation.id values of authorized Agent invocations in the Trace within the effective window. Empty when none are recorded.

error_count: int

Recorded spans with a nonempty error or ERROR status. Counts spans, not distinct messages or incidents.

minimum0
input_tokens: Optional[float]

Input tokens reported by chat spans in the authorized Trace window; null when none report input usage. Informational, not billing data.

minimum0
last_activity_ms: int

Latest start of an authorized Agent invocation in the Trace within the effective window, as Unix epoch milliseconds. The Trace list is ordered by this value, newest first.

minimum0
llm_call_count: int

Recorded chat spans in the authorized Trace window.

minimum0
llm_error_count: int

Recorded chat spans with a nonempty error or ERROR status.

minimum0
models: List[str]

Sorted distinct response models, falling back to request models, from chat spans in the authorized Trace window.

output_tokens: Optional[float]

Output tokens reported by chat spans in the authorized Trace window; null when none report output usage. Informational, not billing data.

minimum0
providers: List[str]

Sorted distinct GenAI providers from chat spans in the authorized Trace window.

root_span_name: str

Name of the root span that initiated the trace.

root_transaction_name: str

Logical transaction name for the root span.

services: List[str]

Authorized Worker services represented in the trace.

spans: float

Total number of spans in the trace.

tool_call_count: int

Recorded execute_tool spans in the authorized Trace window. Custom-named approval spans are not counted.

minimum0
tool_error_count: int

Recorded execute_tool spans with a nonempty error or ERROR status.

minimum0
total_tokens: Optional[float]

Input plus output tokens; null if either direction is unreported. Does not add cache or reasoning breakdowns.

minimum0
trace_duration_ms: float

Total duration of the trace in milliseconds.

trace_end_ms: float

Trace end time as a Unix epoch in milliseconds.

trace_id: str

Unique identifier for the distributed trace.

trace_start_ms: float

Trace start time as a Unix epoch in milliseconds.

errors: Optional[List[str]]

Error messages encountered during the trace, if any.

class TraceGetResponse: …
agents: List[str]

Sorted distinct gen_ai.agent.name values of authorized Agent invocations in the Trace within the effective window. Includes every Agent in the Trace, not only those matching the agent filter.

conversation_ids: List[str]

Sorted distinct gen_ai.conversation.id values of authorized Agent invocations in the Trace within the effective window. Empty when none are recorded.

error_count: int

Recorded spans with a nonempty error or ERROR status. Counts spans, not distinct messages or incidents.

minimum0
input_tokens: Optional[float]

Input tokens reported by chat spans in the authorized Trace window; null when none report input usage. Informational, not billing data.

minimum0
last_activity_ms: int

Latest start of an authorized Agent invocation in the Trace within the effective window, as Unix epoch milliseconds. The Trace list is ordered by this value, newest first.

minimum0
llm_call_count: int

Recorded chat spans in the authorized Trace window.

minimum0
llm_error_count: int

Recorded chat spans with a nonempty error or ERROR status.

minimum0
models: List[str]

Sorted distinct response models, falling back to request models, from chat spans in the authorized Trace window.

output_tokens: Optional[float]

Output tokens reported by chat spans in the authorized Trace window; null when none report output usage. Informational, not billing data.

minimum0
providers: List[str]

Sorted distinct GenAI providers from chat spans in the authorized Trace window.

root_span_name: str

Name of the root span that initiated the trace.

root_transaction_name: str

Logical transaction name for the root span.

services: List[str]

Authorized Worker services represented in the trace.

spans: float

Total number of spans in the trace.

tool_call_count: int

Recorded execute_tool spans in the authorized Trace window. Custom-named approval spans are not counted.

minimum0
tool_error_count: int

Recorded execute_tool spans with a nonempty error or ERROR status.

minimum0
total_tokens: Optional[float]

Input plus output tokens; null if either direction is unreported. Does not add cache or reasoning breakdowns.

minimum0
trace_duration_ms: float

Total duration of the trace in milliseconds.

trace_end_ms: float

Trace end time as a Unix epoch in milliseconds.

trace_id: str

Unique identifier for the distributed trace.

trace_start_ms: float

Trace start time as a Unix epoch in milliseconds.

errors: Optional[List[str]]

Error messages encountered during the trace, if any.

List[TraceEventsResponseItem]
metadata: TraceEventsResponseItemMetadata

Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.

id: str

Unique event ID. Use as the cursor value for offset-based pagination.

account: Optional[str]

Cloudflare account identifier.

cloud_service: Optional[str]

Cloudflare product that generated this event (e.g. workers, pages).

cold_start: Optional[int]
exclusiveMinimum
minimum0
cost: Optional[int]

Estimated cost units for this invocation.

exclusiveMinimum
minimum0
duration: Optional[int]

Span duration in milliseconds.

exclusiveMinimum
minimum0
end_time: Optional[int]

Span end time as a Unix epoch in milliseconds.

minimum0
end_time_ns: Optional[str]

Span end time as a Unix epoch in nanoseconds.

error: Optional[str]

Error message, present when the log represents an error.

error_template: Optional[str]

Templatized version of the error message used for grouping similar errors.

event_size: Optional[int]

Size of the stored telemetry event in bytes.

minimum0
fingerprint: Optional[str]

Content-based fingerprint used to group similar events.

level: Optional[str]

Log level (e.g. log, debug, info, warn, error).

message: Optional[str]

Log message text.

message_template: Optional[str]

Templatized version of the log message used for grouping similar messages.

metric_name: Optional[str]

Metric name when the event represents a metric data point.

origin: Optional[str]

Origin of the event (e.g. fetch, scheduled, queue).

parent_span_id: Optional[str]

Span ID of the parent span in the trace hierarchy.

provider: Optional[str]

Infrastructure provider identifier.

rayid: Optional[str]

Cloudflare Ray ID from the cf-ray header of the request that triggered the invocation.

region: Optional[str]

Cloudflare data center / region that handled the request.

request_id: Optional[str]

Cloudflare request ID that ties all logs from a single invocation together.

service: Optional[str]

Worker script name that produced this event.

span_id: Optional[str]

Span ID for this individual unit of work within a trace.

span_name: Optional[str]

Human-readable name for this span.

span_status: Optional[Literal["unset", "ok", "error"]]

OpenTelemetry span status. Present only on spans. unset when the span did not set a status, including spans recorded before status was captured.

One of the following:
"unset"
"ok"
"error"
span_status_message: Optional[str]

OpenTelemetry span status message. Present only on spans when the status is error and a message was set.

stack_id: Optional[str]

Stack / deployment identifier.

start_time: Optional[int]

Span start time as a Unix epoch in milliseconds.

minimum0
start_time_ns: Optional[str]

Span start time as a Unix epoch in nanoseconds.

status_code: Optional[int]

HTTP response status code returned by the Worker.

exclusiveMinimum
minimum0
timestamp_ns: Optional[str]

Event time as a Unix epoch in nanoseconds.

trace_duration: Optional[int]

Total duration of the entire trace in milliseconds.

exclusiveMinimum
minimum0
trace_id: Optional[str]

Distributed trace ID linking spans across services.

transaction_name: Optional[str]

Logical transaction name for this request.

trigger: Optional[str]

What triggered the invocation (e.g. GET /users, POST /orders, queue message).

type: Optional[str]

Event type classifier (e.g. cf-worker-event, cf-worker-log).

url: Optional[str]

Request URL that triggered the Worker invocation.

dataset: str

The dataset this event belongs to (e.g. cloudflare-workers).

source: Union[str, Dict[str, object]]

Raw log payload. May be a string or a structured object depending on how the log was emitted.

One of the following:
str
Dict[str, object]
timestamp: int

Event timestamp as a Unix epoch in milliseconds.

minimum0
containers: Optional[Dict[str, object]]

Cloudflare Containers event information that enriches your logs for identifying and debugging issues.

workers: Optional[TraceEventsResponseItemWorkers]

Cloudflare Workers event information that enriches your logs for identifying and debugging issues.

One of the following:
class TraceEventsResponseItemWorkersUnionMember0: …
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
script_name: str
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[TraceEventsResponseItemWorkersUnionMember0Gateway]
request_id: str
outcome: Optional[str]
preview: Optional[TraceEventsResponseItemWorkersUnionMember0Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[TraceEventsResponseItemWorkersUnionMember0ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
class TraceEventsResponseItemWorkersUnionMember1: …
cpu_time_ms: float
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
outcome: str
script_name: str
wall_time_ms: float
diagnostics_channel_events: Optional[List[TraceEventsResponseItemWorkersUnionMember1DiagnosticsChannelEvent]]
channel: str
message: str
timestamp: float
dispatch_namespace: Optional[str]
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[TraceEventsResponseItemWorkersUnionMember1Gateway]
request_id: str
preview: Optional[TraceEventsResponseItemWorkersUnionMember1Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[TraceEventsResponseItemWorkersUnionMember1ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]

ObservabilityIssues

List detected issues
workers.observability.issues.list(IssueListParams**kwargs) -> SyncSinglePage[IssueListResponse]
GET/accounts/{account_id}/workers/observability/issues
Get an issue
workers.observability.issues.get(strissue_id, IssueGetParams**kwargs) -> IssueGetResponse
GET/accounts/{account_id}/workers/observability/issues/{issueId}
Modify an issue
workers.observability.issues.update(strissue_id, IssueUpdateParams**kwargs) -> IssueUpdateResponse
PATCH/accounts/{account_id}/workers/observability/issues/{issueId}
Summarize detected issues
workers.observability.issues.summary(IssueSummaryParams**kwargs) -> IssueSummaryResponse
GET/accounts/{account_id}/workers/observability/issues/summary
Create an issue group
workers.observability.issues.group(IssueGroupParams**kwargs) -> IssueGroupResponse
POST/accounts/{account_id}/workers/observability/issues/groups
Dissolve an issue group
workers.observability.issues.ungroup(strgroup_id, IssueUngroupParams**kwargs) -> IssueUngroupResponse
DELETE/accounts/{account_id}/workers/observability/issues/groups/{groupId}
Add issue group members
workers.observability.issues.add(strgroup_id, IssueAddParams**kwargs) -> IssueAddResponse
POST/accounts/{account_id}/workers/observability/issues/groups/{groupId}/members
Remove an issue group member
workers.observability.issues.remove(strissue_id, IssueRemoveParams**kwargs) -> IssueRemoveResponse
DELETE/accounts/{account_id}/workers/observability/issues/groups/{groupId}/members/{issueId}
Notify about an issue
workers.observability.issues.notify(strissue_id, IssueNotifyParams**kwargs) -> IssueNotifyResponse
POST/accounts/{account_id}/workers/observability/issues/{issueId}/notification-runs
List issue occurrences
workers.observability.issues.occurrences(strissue_id, IssueOccurrencesParams**kwargs) -> IssueOccurrencesResponse
GET/accounts/{account_id}/workers/observability/issues/{issueId}/occurrences
ModelsExpand Collapse
class IssueListResponse: …
id: str
activity: List[Activity]
id: str
created: float
inactivity_seconds: Optional[float]
initiated_by: Literal["automatic", "manual"]
One of the following:
"automatic"
"manual"
issue_count: float
issue_id: str
last_error: Optional[str]
policy_id: str
status: Literal["pending", "succeeded", "failed"]
One of the following:
"pending"
"succeeded"
"failed"
terminal_at: Optional[float]
threshold: Optional[float]
type: Literal["notification"]
automation_id: Optional[str]
automation_name: Optional[str]
automation_revision: Optional[float]
scope: Optional[Literal["account", "service"]]
One of the following:
"account"
"service"
trigger_type: Optional[Literal["occurrence_threshold", "recurrence_after_inactivity"]]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[Member]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueGetResponse: …
issue: Issue
id: str
activity: List[IssueActivity]
id: str
created: float
inactivity_seconds: Optional[float]
initiated_by: Literal["automatic", "manual"]
One of the following:
"automatic"
"manual"
issue_count: float
issue_id: str
last_error: Optional[str]
policy_id: str
status: Literal["pending", "succeeded", "failed"]
One of the following:
"pending"
"succeeded"
"failed"
terminal_at: Optional[float]
threshold: Optional[float]
type: Literal["notification"]
automation_id: Optional[str]
automation_name: Optional[str]
automation_revision: Optional[float]
scope: Optional[Literal["account", "service"]]
One of the following:
"account"
"service"
trigger_type: Optional[Literal["occurrence_threshold", "recurrence_after_inactivity"]]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[IssueMember]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueUpdateResponse: …
id: str
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[Member]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueSummaryResponse: …
active_issues: float
active_occurrences: float
last_issue: Optional[float]
resolved_issues: float
class IssueGroupResponse: …
id: str
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[Member]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueUngroupResponse: …
deleted: Literal[true]
class IssueAddResponse: …
id: str
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[Member]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueRemoveResponse: …
id: str
count: float
created: float
first_observed: float
last_observed: float
service: str
status: Literal["active", "resolved", "ignored"]
One of the following:
"active"
"resolved"
"ignored"
status_updated: float
title: str
updated: float
fingerprint: Optional[str]
members: Optional[List[Member]]
fingerprint: str
issue_id: str
title: str
type: Optional[str]
class IssueNotifyResponse: …
run: Run
id: str
created: float
inactivity_seconds: Optional[float]
initiated_by: Literal["automatic", "manual"]
One of the following:
"automatic"
"manual"
issue_count: float
issue_id: str
last_error: Optional[str]
policy_id: str
status: Literal["pending", "succeeded", "failed"]
One of the following:
"pending"
"succeeded"
"failed"
terminal_at: Optional[float]
threshold: Optional[float]
automation_id: Optional[str]
automation_name: Optional[str]
automation_revision: Optional[float]
scope: Optional[Literal["account", "service"]]
One of the following:
"account"
"service"
trigger_type: Optional[Literal["occurrence_threshold", "recurrence_after_inactivity"]]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
List[IssueOccurrencesResponseItem]
id: str

Unique occurrence ID.

error: IssueOccurrencesResponseItemError
handled: bool
mechanism: Literal["structured-log", "error-log", "stack-log", 3 more]
One of the following:
"structured-log"
"error-log"
"stack-log"
"http-status"
"exception"
"outcome"
message: str
name: str
signature: str
stack: Optional[str]
invocation: IssueOccurrencesResponseItemInvocation
id: str

Worker invocation request ID.

trace_id: str
type: str
batch_size: Optional[float]
cron: Optional[str]
jsrpc_method: Optional[str]
mail_from: Optional[str]
method: Optional[str]
path: Optional[str]
queue: Optional[str]
raw_size: Optional[float]
rayid: Optional[str]
rcpt_to: Optional[str]
scheduled_time: Optional[float]
span_id: Optional[str]
status_code: Optional[int]
minimum0
url: Optional[str]

Redacted request URL without query parameters.

websocket_close_code: Optional[float]
websocket_event: Optional[str]
timestamp: float

Occurrence timestamp as Unix epoch milliseconds.

trail: List[IssueOccurrencesResponseItemTrail]
One of the following:
class IssueOccurrencesResponseItemTrailUnionMember0: …
level: str
message: str
timestamp: float
type: Literal["log"]
class IssueOccurrencesResponseItemTrailUnionMember1: …
name: str
ongoing: bool
span_id: str
timestamp: float
type: Literal["span"]
parent_span_id: Optional[str]
worker: IssueOccurrencesResponseItemWorker
execution_model: str
script_name: str
script_tags: List[str]
dispatch_namespace: Optional[str]
entrypoint: Optional[str]
script_version: Optional[IssueOccurrencesResponseItemWorkerScriptVersion]
id: str
tag: Optional[str]
context: Optional[IssueOccurrencesResponseItemContext]
account: Optional[str]
session: Optional[str]
user: Optional[str]
request: Optional[IssueOccurrencesResponseItemRequest]
headers: Dict[str, str]

ObservabilityIssuesAutomations

List issue automations
workers.observability.issues.automations.list(AutomationListParams**kwargs) -> AutomationListResponse
GET/accounts/{account_id}/workers/observability/issues/automations
Get an issue automation
workers.observability.issues.automations.get(strautomation_id, AutomationGetParams**kwargs) -> AutomationGetResponse
GET/accounts/{account_id}/workers/observability/issues/automations/{automationId}
Create an issue automation
workers.observability.issues.automations.create(AutomationCreateParams**kwargs) -> AutomationCreateResponse
POST/accounts/{account_id}/workers/observability/issues/automations
Update an issue automation
workers.observability.issues.automations.update(strautomation_id, AutomationUpdateParams**kwargs) -> AutomationUpdateResponse
PUT/accounts/{account_id}/workers/observability/issues/automations/{automationId}
Delete an issue automation
workers.observability.issues.automations.delete(strautomation_id, AutomationDeleteParams**kwargs) -> AutomationDeleteResponse
DELETE/accounts/{account_id}/workers/observability/issues/automations/{automationId}
ModelsExpand Collapse
class AutomationListResponse: …
automations: List[Automation]
id: str
ans_policy_id: str
created: float
created_by_user_id: Optional[str]
enabled: bool
inactivity_seconds: Optional[float]
name: str
revision: float
scope: Literal["account", "service"]
One of the following:
"account"
"service"
service: Optional[str]
service_type: Optional[str]
threshold: Optional[float]
trigger_type: Literal["occurrence_threshold", "recurrence_after_inactivity"]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
updated: float
updated_by_user_id: Optional[str]
class AutomationGetResponse: …
automation: Automation
id: str
ans_policy_id: str
created: float
created_by_user_id: Optional[str]
enabled: bool
inactivity_seconds: Optional[float]
name: str
revision: float
scope: Literal["account", "service"]
One of the following:
"account"
"service"
service: Optional[str]
service_type: Optional[str]
threshold: Optional[float]
trigger_type: Literal["occurrence_threshold", "recurrence_after_inactivity"]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
updated: float
updated_by_user_id: Optional[str]
class AutomationCreateResponse: …
automation: Automation
id: str
ans_policy_id: str
created: float
created_by_user_id: Optional[str]
enabled: bool
inactivity_seconds: Optional[float]
name: str
revision: float
scope: Literal["account", "service"]
One of the following:
"account"
"service"
service: Optional[str]
service_type: Optional[str]
threshold: Optional[float]
trigger_type: Literal["occurrence_threshold", "recurrence_after_inactivity"]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
updated: float
updated_by_user_id: Optional[str]
class AutomationUpdateResponse: …
automation: Automation
id: str
ans_policy_id: str
created: float
created_by_user_id: Optional[str]
enabled: bool
inactivity_seconds: Optional[float]
name: str
revision: float
scope: Literal["account", "service"]
One of the following:
"account"
"service"
service: Optional[str]
service_type: Optional[str]
threshold: Optional[float]
trigger_type: Literal["occurrence_threshold", "recurrence_after_inactivity"]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
updated: float
updated_by_user_id: Optional[str]
class AutomationDeleteResponse: …
automation: Automation
id: str
ans_policy_id: str
created: float
created_by_user_id: Optional[str]
enabled: bool
inactivity_seconds: Optional[float]
name: str
revision: float
scope: Literal["account", "service"]
One of the following:
"account"
"service"
service: Optional[str]
service_type: Optional[str]
threshold: Optional[float]
trigger_type: Literal["occurrence_threshold", "recurrence_after_inactivity"]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"
updated: float
updated_by_user_id: Optional[str]

ObservabilityDestinations

Get Destinations
workers.observability.destinations.list(DestinationListParams**kwargs) -> SyncSinglePage[DestinationListResponse]
GET/accounts/{account_id}/workers/observability/destinations
Create Destination
workers.observability.destinations.create(DestinationCreateParams**kwargs) -> DestinationCreateResponse
POST/accounts/{account_id}/workers/observability/destinations
Update Destination
workers.observability.destinations.update(strslug, DestinationUpdateParams**kwargs) -> DestinationUpdateResponse
PATCH/accounts/{account_id}/workers/observability/destinations/{slug}
Delete Destination
workers.observability.destinations.delete(strslug, DestinationDeleteParams**kwargs) -> DestinationDeleteResponse
DELETE/accounts/{account_id}/workers/observability/destinations/{slug}
ModelsExpand Collapse
class DestinationListResponse: …
configuration: Configuration
headers: Dict[str, Optional[str]]
job_status: ConfigurationJobStatus
error_message: str
last_complete: str
last_error: str
logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"]
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
"opentelemetry-metrics"
type: Literal["logpush"]
url: str
enabled: bool
name: str
scripts: List[str]
slug: str
class DestinationCreateResponse: …
configuration: Configuration
headers: Dict[str, Optional[str]]
job_status: ConfigurationJobStatus
error_message: str
last_complete: str
last_error: str
logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"]
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
"opentelemetry-metrics"
type: Literal["logpush"]
url: str
enabled: bool
name: str
scripts: List[str]
slug: str
class DestinationUpdateResponse: …
configuration: Configuration
headers: Dict[str, Optional[str]]
job_status: ConfigurationJobStatus
error_message: str
last_complete: str
last_error: str
logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"]
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
"opentelemetry-metrics"
type: Literal["logpush"]
url: str
enabled: bool
name: str
scripts: List[str]
slug: str
class DestinationDeleteResponse: …
configuration: Configuration
headers: Dict[str, Optional[str]]
job_status: ConfigurationJobStatus
error_message: str
last_complete: str
last_error: str
logpush_dataset: Literal["opentelemetry-traces", "opentelemetry-logs", "opentelemetry-metrics"]
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
"opentelemetry-metrics"
type: Literal["logpush"]
url: str
enabled: bool
name: str
scripts: List[str]
slug: str

ObservabilityQueries

Save query
workers.observability.queries.create(QueryCreateParams**kwargs) -> QueryCreateResponse
POST/accounts/{account_id}/workers/observability/queries
List queries
workers.observability.queries.list(QueryListParams**kwargs) -> SyncSinglePage[QueryListResponse]
GET/accounts/{account_id}/workers/observability/queries
ModelsExpand Collapse
class QueryCreateResponse: …
id: str
adhoc: bool

If the query wasn’t explcitly saved

created: datetime
formatdate-time
created_by: str
description: Optional[str]
maxLength1000
name: str

Query name

maxLength250
minLength1
parameters: Parameters
calculations: Optional[List[ParametersCalculation]]

Create Calculations to compute as part of the query.

One of the following:
class ParametersCalculationUnionMember0: …
operator: Literal["count", "COUNT"]
One of the following:
"count"
"COUNT"
alias: Optional[str]
key: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
class ParametersCalculationUnionMember1: …
key: str
operator: Literal["uniq", "max", "min", 33 more]
One of the following:
"uniq"
"max"
"min"
"sum"
"avg"
"median"
"p001"
"p01"
"p05"
"p10"
"p25"
"p75"
"p90"
"p95"
"p99"
"p999"
"stddev"
"variance"
"COUNT_DISTINCT"
"MAX"
"MIN"
"SUM"
"AVG"
"MEDIAN"
"P001"
"P01"
"P05"
"P10"
"P25"
"P75"
"P90"
"P95"
"P99"
"P999"
"STDDEV"
"VARIANCE"
alias: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
datasets: Optional[List[str]]

Set the Datasets to query. Leave it empty to query all the datasets.

filter_combination: Optional[Literal["and", "or", "AND", "OR"]]

Set a Flag to describe how to combine the filters on the query.

One of the following:
"and"
"or"
"AND"
"OR"
filters: Optional[List[ParametersFilter]]

Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.

One of the following:
class ParametersFilterUnionMember0: …
filter_combination: Literal["and", "or", "AND", "OR"]
One of the following:
"and"
"or"
"AND"
"OR"
filters: List[object]
kind: Literal["group"]
class ParametersFilterWorkersObservabilityFilterLeaf: …

A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.

key: str

Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.

operation: Literal["includes", "not_includes", "starts_with", 27 more]

Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.

One of the following:
"includes"
"not_includes"
"starts_with"
"ends_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
"ENDS_WITH"
type: Literal["string", "number", "boolean"]

Data type of the filter field. Must match the actual type of the key being filtered.

One of the following:
"string"
"number"
"boolean"
kind: Optional[Literal["filter"]]

Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.

value: Optional[Union[str, float, bool, null]]

Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).

One of the following:
str
float
bool
group_bys: Optional[List[ParametersGroupBy]]

Define how to group the results of the query.

type: Literal["string", "number", "boolean"]
One of the following:
"string"
"number"
"boolean"
value: str
havings: Optional[List[ParametersHaving]]

Configure the Having clauses that filter on calculations in the query result.

key: str
operation: Literal["eq", "neq", "gt", 3 more]
One of the following:
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
value: float
limit: Optional[int]

Set a limit on the number of results / records returned by the query

maximum100
minimum0
needle: Optional[ParametersNeedle]

Define an expression to search using full-text search.

value: Union[str, float, bool]
maxLength1000
One of the following:
str
float
bool
is_regex: Optional[bool]
match_case: Optional[bool]
order_by: Optional[ParametersOrderBy]

Configure the order of the results returned by the query.

value: str

Configure which Calculation to order the results by.

order: Optional[Literal["asc", "desc"]]

Set the order of the results

One of the following:
"asc"
"desc"
updated: datetime
formatdate-time
updated_by: str
class QueryListResponse: …
id: str
adhoc: bool

If the query wasn’t explcitly saved

created: datetime
formatdate-time
created_by: str
description: Optional[str]
maxLength1000
name: str

Query name

maxLength250
minLength1
parameters: Parameters
calculations: Optional[List[ParametersCalculation]]

Create Calculations to compute as part of the query.

One of the following:
class ParametersCalculationUnionMember0: …
operator: Literal["count", "COUNT"]
One of the following:
"count"
"COUNT"
alias: Optional[str]
key: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
class ParametersCalculationUnionMember1: …
key: str
operator: Literal["uniq", "max", "min", 33 more]
One of the following:
"uniq"
"max"
"min"
"sum"
"avg"
"median"
"p001"
"p01"
"p05"
"p10"
"p25"
"p75"
"p90"
"p95"
"p99"
"p999"
"stddev"
"variance"
"COUNT_DISTINCT"
"MAX"
"MIN"
"SUM"
"AVG"
"MEDIAN"
"P001"
"P01"
"P05"
"P10"
"P25"
"P75"
"P90"
"P95"
"P99"
"P999"
"STDDEV"
"VARIANCE"
alias: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
datasets: Optional[List[str]]

Set the Datasets to query. Leave it empty to query all the datasets.

filter_combination: Optional[Literal["and", "or", "AND", "OR"]]

Set a Flag to describe how to combine the filters on the query.

One of the following:
"and"
"or"
"AND"
"OR"
filters: Optional[List[ParametersFilter]]

Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.

One of the following:
class ParametersFilterUnionMember0: …
filter_combination: Literal["and", "or", "AND", "OR"]
One of the following:
"and"
"or"
"AND"
"OR"
filters: List[object]
kind: Literal["group"]
class ParametersFilterWorkersObservabilityFilterLeaf: …

A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.

key: str

Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.

operation: Literal["includes", "not_includes", "starts_with", 27 more]

Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.

One of the following:
"includes"
"not_includes"
"starts_with"
"ends_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
"ENDS_WITH"
type: Literal["string", "number", "boolean"]

Data type of the filter field. Must match the actual type of the key being filtered.

One of the following:
"string"
"number"
"boolean"
kind: Optional[Literal["filter"]]

Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.

value: Optional[Union[str, float, bool, null]]

Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).

One of the following:
str
float
bool
group_bys: Optional[List[ParametersGroupBy]]

Define how to group the results of the query.

type: Literal["string", "number", "boolean"]
One of the following:
"string"
"number"
"boolean"
value: str
havings: Optional[List[ParametersHaving]]

Configure the Having clauses that filter on calculations in the query result.

key: str
operation: Literal["eq", "neq", "gt", 3 more]
One of the following:
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
value: float
limit: Optional[int]

Set a limit on the number of results / records returned by the query

maximum100
minimum0
needle: Optional[ParametersNeedle]

Define an expression to search using full-text search.

value: Union[str, float, bool]
maxLength1000
One of the following:
str
float
bool
is_regex: Optional[bool]
match_case: Optional[bool]
order_by: Optional[ParametersOrderBy]

Configure the order of the results returned by the query.

value: str

Configure which Calculation to order the results by.

order: Optional[Literal["asc", "desc"]]

Set the order of the results

One of the following:
"asc"
"desc"
updated: datetime
formatdate-time
updated_by: str

ObservabilityShared Queries

Create a sharable link to a query result
workers.observability.shared_queries.create(SharedQueryCreateParams**kwargs) -> SharedQueryCreateResponse
POST/accounts/{account_id}/workers/observability/shared/query
View a query that has been shared
workers.observability.shared_queries.get(strid, SharedQueryGetParams**kwargs) -> SharedQueryGetResponse
GET/accounts/{account_id}/workers/observability/shared/query/{id}
ModelsExpand Collapse
class SharedQueryCreateResponse: …
id: str

Specify the ID of the shared query.

class SharedQueryGetResponse: …

Complete results of a query run. The populated fields depend on the requested view type (events, calculations, invocations, traces, or agents).

run: Run

Represents a single execution of a query against Workers Observability data, including the query definition, execution status, and performance statistics.

id: str

Unique identifier for this query run.

account_id: str

Cloudflare account ID that owns this query run.

dry: bool

Whether this was a dry run (results not persisted).

granularity: float

Number of time-series buckets used for the query. Higher values produce more detailed series data.

query: RunQuery

A saved query definition with its parameters, metadata, and ownership information.

id: str
adhoc: bool

If the query wasn’t explcitly saved

created: Union[str, datetime]
formatdate-time
One of the following:
str
datetime
created_by: str
description: Optional[str]
maxLength1000
name: str

Query name

maxLength250
minLength1
parameters: RunQueryParameters
calculations: Optional[List[RunQueryParametersCalculation]]

Create Calculations to compute as part of the query.

One of the following:
class RunQueryParametersCalculationUnionMember0: …
operator: Literal["count", "COUNT"]
One of the following:
"count"
"COUNT"
alias: Optional[str]
key: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
class RunQueryParametersCalculationUnionMember1: …
key: str
operator: Literal["uniq", "max", "min", 33 more]
One of the following:
"uniq"
"max"
"min"
"sum"
"avg"
"median"
"p001"
"p01"
"p05"
"p10"
"p25"
"p75"
"p90"
"p95"
"p99"
"p999"
"stddev"
"variance"
"COUNT_DISTINCT"
"MAX"
"MIN"
"SUM"
"AVG"
"MEDIAN"
"P001"
"P01"
"P05"
"P10"
"P25"
"P75"
"P90"
"P95"
"P99"
"P999"
"STDDEV"
"VARIANCE"
alias: Optional[str]
key_type: Optional[Literal["string", "number", "boolean"]]
One of the following:
"string"
"number"
"boolean"
datasets: Optional[List[str]]

Set the Datasets to query. Leave it empty to query all the datasets.

filter_combination: Optional[Literal["and", "or", "AND", "OR"]]

Set a Flag to describe how to combine the filters on the query.

One of the following:
"and"
"or"
"AND"
"OR"
filters: Optional[List[RunQueryParametersFilter]]

Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.

One of the following:
class RunQueryParametersFilterUnionMember0: …
filter_combination: Literal["and", "or", "AND", "OR"]
One of the following:
"and"
"or"
"AND"
"OR"
filters: List[object]
kind: Literal["group"]
class RunQueryParametersFilterWorkersObservabilityFilterLeaf: …

A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.

key: str

Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.

operation: Literal["includes", "not_includes", "starts_with", 27 more]

Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.

One of the following:
"includes"
"not_includes"
"starts_with"
"ends_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
"ENDS_WITH"
type: Literal["string", "number", "boolean"]

Data type of the filter field. Must match the actual type of the key being filtered.

One of the following:
"string"
"number"
"boolean"
kind: Optional[Literal["filter"]]

Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.

value: Optional[Union[str, float, bool, null]]

Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).

One of the following:
str
float
bool
group_bys: Optional[List[RunQueryParametersGroupBy]]

Define how to group the results of the query.

type: Literal["string", "number", "boolean"]
One of the following:
"string"
"number"
"boolean"
value: str
havings: Optional[List[RunQueryParametersHaving]]

Configure the Having clauses that filter on calculations in the query result.

key: str
operation: Literal["eq", "neq", "gt", 3 more]
One of the following:
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
value: float
limit: Optional[int]

Set a limit on the number of results / records returned by the query

maximum100
minimum0
needle: Optional[RunQueryParametersNeedle]

Define an expression to search using full-text search.

value: RunQueryParametersNeedleValue
is_regex: Optional[bool]
match_case: Optional[bool]
order_by: Optional[RunQueryParametersOrderBy]

Configure the order of the results returned by the query.

value: str

Configure which Calculation to order the results by.

order: Optional[Literal["asc", "desc"]]

Set the order of the results

One of the following:
"asc"
"desc"
updated: Union[str, datetime]
formatdate-time
One of the following:
str
datetime
updated_by: str
status: Literal["STARTED", "COMPLETED"]

Current execution status of the query run.

One of the following:
"STARTED"
"COMPLETED"
timeframe: RunTimeframe

Time range for the query execution. ‘from’ must be earlier than ‘to’. No fractional milliseconds.

from_: int

Start timestamp for the query timeframe. Unix timestamp in milliseconds

maximum253402300799999
minimum0
to: int

End timestamp for the query timeframe. Unix timestamp in milliseconds

maximum253402300799999
minimum0
user_id: str

ID of the user who initiated the query run.

created: Optional[str]

ISO-8601 timestamp when the query run was created.

statistics: Optional[RunStatistics]

Query performance statistics from the database (does not include network latency).

bytes_read: float

Number of uncompressed bytes read from the table.

elapsed: float

Time in seconds for the query to run.

rows_read: float

Number of rows scanned from the table.

abr_level: Optional[float]

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

updated: Optional[str]

ISO-8601 timestamp when the query run was last updated.

statistics: Statistics

Query performance statistics from the database. Includes execution time, rows scanned, and bytes read. Does not include network latency.

bytes_read: float

Number of uncompressed bytes read from the table.

elapsed: float

Time in seconds for the query to run.

rows_read: float

Number of rows scanned from the table.

abr_level: Optional[float]

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

agents: Optional[List[Agent]]

Agent run summaries. Present when the query view is ‘agents’. Each entry represents one trace containing at least one agent invocation.

id: str

Stable pagination cursor for this agent run.

errors: List[str]

Distinct errors reported by spans in the run.

models: List[str]

Distinct models reported by chat spans across the run’s trace.

providers: List[str]

Distinct GenAI providers reported by chat spans in the run.

services: List[str]

Worker services represented in the run’s trace.

spans: float

Number of spans in the run’s trace.

status: Literal["completed", "error"]

Observed run status.

One of the following:
"completed"
"error"
trace_duration_ms: float

Total trace duration in milliseconds.

trace_end_ms: float

End of the run’s trace as a Unix epoch in milliseconds.

trace_id: str

Trace identifier for this agent run.

trace_start_ms: float

Start of the run’s trace as a Unix epoch in milliseconds.

agent_id: Optional[str]

ID from the earliest agent invocation that provides one.

agent_name: Optional[str]

Name from the earliest agent invocation that provides one.

conversation_id: Optional[str]

Conversation ID from the earliest invocation that provides one.

input_tokens: Optional[float]

Input tokens summed across chat spans in the run’s trace; informational, not billing data.

output_tokens: Optional[float]

Output tokens summed across chat spans in the run’s trace; informational, not billing data.

calculations: Optional[List[Calculation]]

Aggregated calculation results. Present when the query view is ‘calculations’. Contains computed metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series data.

aggregates: List[CalculationAggregate]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

groups: Optional[List[CalculationAggregateGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
calculation: str
series: List[CalculationSeries]
data: List[CalculationSeriesData]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

first_seen: Optional[str]
groups: Optional[List[CalculationSeriesDataGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
last_seen: Optional[str]
time: str
alias: Optional[str]
compare: Optional[List[Compare]]

Comparison calculation results from the previous time period. Present when the compare option is enabled. Same structure as calculations.

aggregates: List[CompareAggregate]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

groups: Optional[List[CompareAggregateGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
calculation: str
series: List[CompareSeries]
data: List[CompareSeriesData]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

value: float

Result of the calculation. count, sum, avg, median, and percentiles are weighted by each event’s sample interval

first_seen: Optional[str]
groups: Optional[List[CompareSeriesDataGroup]]
key: str
value: Union[str, float, bool]
One of the following:
str
float
bool
last_seen: Optional[str]
time: str
alias: Optional[str]
distribution: Optional[Distribution]

Bucketed 2D histogram of a numeric field over time. Present when chartType is ‘distribution’.

bins: List[str]

Time-bucket labels (ISO-8601 strings), one per matrix column.

bucket_boundaries: List[float]

Raw bucket edges in the value’s native unit, length buckets.length + 1. Used for the colour scale and percentile mapping.

bucket_mode: Literal["log", "linear"]

Bucketing scheme used to derive the boundaries. ‘log’ produces geometric edges; ‘linear’ produces fixed-width edges.

One of the following:
"log"
"linear"
buckets: List[str]

Value-range labels, one per matrix row (e.g. ‘50–100ms’).

matrix: List[List[float]]

Sampling-corrected counts. matrix[bucketIdx][binIdx] is the estimated number of events in value-bucket ‘bucketIdx’ during time-bin ‘binIdx’.

events: Optional[Events]

Individual event results. Present when the query view is ‘events’. Contains the matching log lines and their metadata.

count: Optional[float]

Total number of events matching the query (may exceed the number returned due to limits).

events: Optional[List[EventsEvent]]

List of individual telemetry events matching the query.

metadata: EventsEventMetadata

Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.

id: str

Unique event ID. Use as the cursor value for offset-based pagination.

account: Optional[str]

Cloudflare account identifier.

cloud_service: Optional[str]

Cloudflare product that generated this event (e.g. workers, pages).

cold_start: Optional[int]
exclusiveMinimum
minimum0
cost: Optional[int]

Estimated cost units for this invocation.

exclusiveMinimum
minimum0
duration: Optional[int]

Span duration in milliseconds.

exclusiveMinimum
minimum0
end_time: Optional[int]

Span end time as a Unix epoch in milliseconds.

minimum0
end_time_ns: Optional[str]

Span end time as a Unix epoch in nanoseconds.

error: Optional[str]

Error message, present when the log represents an error.

error_template: Optional[str]

Templatized version of the error message used for grouping similar errors.

event_size: Optional[int]

Size of the stored telemetry event in bytes.

minimum0
fingerprint: Optional[str]

Content-based fingerprint used to group similar events.

level: Optional[str]

Log level (e.g. log, debug, info, warn, error).

message: Optional[str]

Log message text.

message_template: Optional[str]

Templatized version of the log message used for grouping similar messages.

metric_name: Optional[str]

Metric name when the event represents a metric data point.

origin: Optional[str]

Origin of the event (e.g. fetch, scheduled, queue).

parent_span_id: Optional[str]

Span ID of the parent span in the trace hierarchy.

provider: Optional[str]

Infrastructure provider identifier.

rayid: Optional[str]

Cloudflare Ray ID from the cf-ray header of the request that triggered the invocation.

region: Optional[str]

Cloudflare data center / region that handled the request.

request_id: Optional[str]

Cloudflare request ID that ties all logs from a single invocation together.

service: Optional[str]

Worker script name that produced this event.

span_id: Optional[str]

Span ID for this individual unit of work within a trace.

span_name: Optional[str]

Human-readable name for this span.

span_status: Optional[Literal["unset", "ok", "error"]]

OpenTelemetry span status. Present only on spans. unset when the span did not set a status, including spans recorded before status was captured.

One of the following:
"unset"
"ok"
"error"
span_status_message: Optional[str]

OpenTelemetry span status message. Present only on spans when the status is error and a message was set.

stack_id: Optional[str]

Stack / deployment identifier.

start_time: Optional[int]

Span start time as a Unix epoch in milliseconds.

minimum0
start_time_ns: Optional[str]

Span start time as a Unix epoch in nanoseconds.

status_code: Optional[int]

HTTP response status code returned by the Worker.

exclusiveMinimum
minimum0
timestamp_ns: Optional[str]

Event time as a Unix epoch in nanoseconds.

trace_duration: Optional[int]

Total duration of the entire trace in milliseconds.

exclusiveMinimum
minimum0
trace_id: Optional[str]

Distributed trace ID linking spans across services.

transaction_name: Optional[str]

Logical transaction name for this request.

trigger: Optional[str]

What triggered the invocation (e.g. GET /users, POST /orders, queue message).

type: Optional[str]

Event type classifier (e.g. cf-worker-event, cf-worker-log).

url: Optional[str]

Request URL that triggered the Worker invocation.

dataset: str

The dataset this event belongs to (e.g. cloudflare-workers).

source: Union[str, Dict[str, object]]

Raw log payload. May be a string or a structured object depending on how the log was emitted.

One of the following:
str
Dict[str, object]
timestamp: int

Event timestamp as a Unix epoch in milliseconds.

minimum0
containers: Optional[Dict[str, object]]

Cloudflare Containers event information that enriches your logs for identifying and debugging issues.

workers: Optional[EventsEventWorkers]

Cloudflare Workers event information that enriches your logs for identifying and debugging issues.

One of the following:
class EventsEventWorkersUnionMember0: …
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
script_name: str
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[EventsEventWorkersUnionMember0Gateway]
request_id: str
outcome: Optional[str]
preview: Optional[EventsEventWorkersUnionMember0Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[EventsEventWorkersUnionMember0ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
class EventsEventWorkersUnionMember1: …
cpu_time_ms: float
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
outcome: str
script_name: str
wall_time_ms: float
diagnostics_channel_events: Optional[List[EventsEventWorkersUnionMember1DiagnosticsChannelEvent]]
channel: str
message: str
timestamp: float
dispatch_namespace: Optional[str]
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[EventsEventWorkersUnionMember1Gateway]
request_id: str
preview: Optional[EventsEventWorkersUnionMember1Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[EventsEventWorkersUnionMember1ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
fields: Optional[List[EventsField]]

List of fields discovered in the matched events. Useful for building dynamic UIs.

key: str

Field name present in the matched events.

type: str

Data type of the field (string, number, or boolean).

series: Optional[List[EventsSeries]]

Time-series data for the matched events, bucketed by the query granularity.

data: List[EventsSeriesData]
aggregates: EventsSeriesDataAggregates
Deprecated_count: int
exclusiveMinimum
minimum0
Deprecated_interval: float
exclusiveMinimum
minimum0
Deprecated_first_seen: Optional[str]
Deprecated_last_seen: Optional[str]
Deprecatedbin: Optional[object]
count: float

Estimated number of matching events: the sum of the sample intervals of the stored events. It equals the number of stored events when sampleInterval is 1.

Deprecatedinterval: float

Deprecated alias of sampleInterval. Always has the same value; use sampleInterval instead.

sample_interval: float

Average sample interval of the matched events. Each stored event has a sample interval of 1 / (the sampling rate applied when it was ingested): the Worker’s head_sampling_rate multiplied by any platform sampling applied to the account or script. A value of 1 means none of the matched events were sampled. A value above 1 means count and value are estimated from sampled data, not exact. This is independent of statistics.abr_level.

errors: Optional[float]
groups: Optional[Dict[str, Union[str, float, bool]]]

Groups in the query results.

One of the following:
str
float
bool
time: str
invocations: Optional[Dict[str, List[Invocation]]]

Events grouped by invocation (request ID). Present when the query view is ‘invocations’. Each key is a request ID mapping to all events from that invocation.

metadata: InvocationMetadata

Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.

id: str

Unique event ID. Use as the cursor value for offset-based pagination.

account: Optional[str]

Cloudflare account identifier.

cloud_service: Optional[str]

Cloudflare product that generated this event (e.g. workers, pages).

cold_start: Optional[int]
exclusiveMinimum
minimum0
cost: Optional[int]

Estimated cost units for this invocation.

exclusiveMinimum
minimum0
duration: Optional[int]

Span duration in milliseconds.

exclusiveMinimum
minimum0
end_time: Optional[int]

Span end time as a Unix epoch in milliseconds.

minimum0
end_time_ns: Optional[str]

Span end time as a Unix epoch in nanoseconds.

error: Optional[str]

Error message, present when the log represents an error.

error_template: Optional[str]

Templatized version of the error message used for grouping similar errors.

event_size: Optional[int]

Size of the stored telemetry event in bytes.

minimum0
fingerprint: Optional[str]

Content-based fingerprint used to group similar events.

level: Optional[str]

Log level (e.g. log, debug, info, warn, error).

message: Optional[str]

Log message text.

message_template: Optional[str]

Templatized version of the log message used for grouping similar messages.

metric_name: Optional[str]

Metric name when the event represents a metric data point.

origin: Optional[str]

Origin of the event (e.g. fetch, scheduled, queue).

parent_span_id: Optional[str]

Span ID of the parent span in the trace hierarchy.

provider: Optional[str]

Infrastructure provider identifier.

rayid: Optional[str]

Cloudflare Ray ID from the cf-ray header of the request that triggered the invocation.

region: Optional[str]

Cloudflare data center / region that handled the request.

request_id: Optional[str]

Cloudflare request ID that ties all logs from a single invocation together.

service: Optional[str]

Worker script name that produced this event.

span_id: Optional[str]

Span ID for this individual unit of work within a trace.

span_name: Optional[str]

Human-readable name for this span.

span_status: Optional[Literal["unset", "ok", "error"]]

OpenTelemetry span status. Present only on spans. unset when the span did not set a status, including spans recorded before status was captured.

One of the following:
"unset"
"ok"
"error"
span_status_message: Optional[str]

OpenTelemetry span status message. Present only on spans when the status is error and a message was set.

stack_id: Optional[str]

Stack / deployment identifier.

start_time: Optional[int]

Span start time as a Unix epoch in milliseconds.

minimum0
start_time_ns: Optional[str]

Span start time as a Unix epoch in nanoseconds.

status_code: Optional[int]

HTTP response status code returned by the Worker.

exclusiveMinimum
minimum0
timestamp_ns: Optional[str]

Event time as a Unix epoch in nanoseconds.

trace_duration: Optional[int]

Total duration of the entire trace in milliseconds.

exclusiveMinimum
minimum0
trace_id: Optional[str]

Distributed trace ID linking spans across services.

transaction_name: Optional[str]

Logical transaction name for this request.

trigger: Optional[str]

What triggered the invocation (e.g. GET /users, POST /orders, queue message).

type: Optional[str]

Event type classifier (e.g. cf-worker-event, cf-worker-log).

url: Optional[str]

Request URL that triggered the Worker invocation.

dataset: str

The dataset this event belongs to (e.g. cloudflare-workers).

source: Union[str, Dict[str, object]]

Raw log payload. May be a string or a structured object depending on how the log was emitted.

One of the following:
str
Dict[str, object]
timestamp: int

Event timestamp as a Unix epoch in milliseconds.

minimum0
containers: Optional[Dict[str, object]]

Cloudflare Containers event information that enriches your logs for identifying and debugging issues.

workers: Optional[InvocationWorkers]

Cloudflare Workers event information that enriches your logs for identifying and debugging issues.

One of the following:
class InvocationWorkersUnionMember0: …
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
script_name: str
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[InvocationWorkersUnionMember0Gateway]
request_id: str
outcome: Optional[str]
preview: Optional[InvocationWorkersUnionMember0Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[InvocationWorkersUnionMember0ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
class InvocationWorkersUnionMember1: …
cpu_time_ms: float
event_type: Literal["fetch", "scheduled", "alarm", 9 more]
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"jsrpc"
"websocket"
"workflow"
"unknown"
outcome: str
script_name: str
wall_time_ms: float
diagnostics_channel_events: Optional[List[InvocationWorkersUnionMember1DiagnosticsChannelEvent]]
channel: str
message: str
timestamp: float
dispatch_namespace: Optional[str]
durable_object_id: Optional[str]
entrypoint: Optional[str]
event: Optional[Dict[str, object]]
execution_model: Optional[Literal["durableObject", "stateless"]]
One of the following:
"durableObject"
"stateless"
gateway: Optional[InvocationWorkersUnionMember1Gateway]
request_id: str
preview: Optional[InvocationWorkersUnionMember1Preview]
id: Optional[str]
name: Optional[str]
slug: Optional[str]
request_id: Optional[str]
script_version: Optional[InvocationWorkersUnionMember1ScriptVersion]
id: Optional[str]
message: Optional[str]
tag: Optional[str]
span_id: Optional[str]
trace_id: Optional[str]
truncated: Optional[bool]
traces: Optional[List[Trace]]

Trace summaries matching the query. Present when the query view is ‘traces’. Each entry represents a distributed trace with its spans, duration, and services involved.

root_span_name: str

Name of the root span that initiated the trace.

root_transaction_name: str

Logical transaction name for the root span.

service: List[str]

List of Worker services involved in the trace.

spans: float

Total number of spans in the trace.

trace_duration_ms: float

Total duration of the trace in milliseconds.

trace_end_ms: float

Trace end time as a Unix epoch in milliseconds.

trace_id: str

Unique identifier for the distributed trace.

trace_start_ms: float

Trace start time as a Unix epoch in milliseconds.

errors: Optional[List[str]]

Error messages encountered during the trace, if any.