Skip to content

Commit c393d37

Browse files
feat: Expose OTLP destination delivery health
Stainless-Generated-From: 1e679cbc44b2a9df185702266e0fd950180e2438
1 parent e96506a commit c393d37

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/resources/telemetry/destinations.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ export type OtlpDestinationsOffsetPagination = OffsetPagination<OtlpDestination>
9292
export interface OtlpDestination {
9393
id: string;
9494

95+
/**
96+
* Failed deliveries since the last success, as observed by the relay process that
97+
* wrote the latest outcome. Zero means the most recently recorded outcome
98+
* succeeded.
99+
*/
100+
consecutive_failures: number;
101+
95102
created_at: string;
96103

97104
/**
@@ -116,6 +123,26 @@ export interface OtlpDestination {
116123
updated_at: string;
117124

118125
description?: string;
126+
127+
/**
128+
* Sanitized class of the delivery failure recorded at `last_error_at`. It is
129+
* retained after a later success, so its presence does not mean the destination is
130+
* currently failing. Response bodies, endpoint URLs, credentials, and raw
131+
* transport errors are never returned.
132+
*/
133+
last_error?: string;
134+
135+
/**
136+
* Timestamp of the most recent failed delivery. It is retained after a later
137+
* success, so it can predate `last_export_at`. Read `consecutive_failures` to tell
138+
* whether the destination is currently failing.
139+
*/
140+
last_error_at?: string;
141+
142+
/**
143+
* Timestamp of the most recent successful delivery. Moves only on success.
144+
*/
145+
last_export_at?: string;
119146
}
120147

121148
export interface DestinationCreateParams {

0 commit comments

Comments
 (0)