@@ -8,6 +8,7 @@ const fn default_betterstack_host() -> Cow<'static, str> {
88
99/// Status of a telemetry export configuration for an external sink
1010#[ derive( Eq , Clone , Debug , PartialEq , Serialize , Deserialize ) ]
11+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
1112#[ typeshare:: typeshare]
1213pub struct TelemetrySinkStatus {
1314 /// Indicates that the associated project is configured to export telemetry data to this sink
@@ -16,6 +17,7 @@ pub struct TelemetrySinkStatus {
1617
1718/// A safe-for-display representation of the current telemetry export configuration for a given project
1819#[ derive( Eq , Clone , Debug , Default , PartialEq , Serialize , Deserialize ) ]
20+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
1921#[ typeshare:: typeshare]
2022pub struct TelemetryConfigResponse {
2123 betterstack : Option < TelemetrySinkStatus > ,
@@ -63,14 +65,15 @@ impl From<Vec<TelemetrySinkConfig>> for TelemetryConfigResponse {
6365#[ cfg_attr( any( test, feature = "integration-tests" ) , derive( strum:: EnumIter ) ) ]
6466#[ serde( tag = "type" , content = "content" , rename_all = "snake_case" ) ]
6567#[ strum( serialize_all = "snake_case" ) ]
66- #[ typeshare:: typeshare]
6768#[ cfg_attr(
6869 any( test, feature = "integration-tests" ) ,
6970 strum_discriminants( derive( strum:: EnumIter ) )
7071) ]
7172#[ strum_discriminants( derive( Serialize , Deserialize , strum:: AsRefStr ) ) ]
7273#[ strum_discriminants( serde( rename_all = "snake_case" ) ) ]
7374#[ strum_discriminants( strum( serialize_all = "snake_case" ) ) ]
75+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
76+ #[ typeshare:: typeshare]
7477pub enum TelemetrySinkConfig {
7578 /// [Betterstack](https://betterstack.com/docs/logs/open-telemetry/)
7679 Betterstack ( BetterstackConfig ) ,
@@ -102,6 +105,7 @@ impl TelemetrySinkConfigDiscriminants {
102105
103106#[ derive( Eq , Clone , PartialEq , Serialize , Deserialize ) ]
104107#[ cfg_attr( feature = "integration-tests" , derive( Debug ) ) ]
108+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
105109#[ typeshare:: typeshare]
106110pub struct BetterstackConfig {
107111 #[ serde( default = "default_betterstack_host" ) ]
@@ -121,6 +125,7 @@ impl Default for BetterstackConfig {
121125
122126#[ derive( Eq , Clone , PartialEq , Serialize , Deserialize ) ]
123127#[ cfg_attr( feature = "integration-tests" , derive( Debug ) ) ]
128+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
124129#[ typeshare:: typeshare]
125130pub struct DatadogConfig {
126131 pub api_key : String ,
@@ -137,6 +142,7 @@ impl Default for DatadogConfig {
137142
138143#[ derive( Eq , Clone , PartialEq , Serialize , Deserialize ) ]
139144#[ cfg_attr( feature = "integration-tests" , derive( Debug ) ) ]
145+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
140146#[ typeshare:: typeshare]
141147pub struct GrafanaCloudConfig {
142148 pub token : String ,
0 commit comments