mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(analytics): Add Clickhouse based analytics (#2988)
Co-authored-by: harsh_sharma_juspay <harsh.sharma@juspay.in> Co-authored-by: Ivor Dsouza <ivor.dsouza@juspay.in> Co-authored-by: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com> Co-authored-by: nain-F49FF806 <126972030+nain-F49FF806@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: akshay.s <akshay.s@juspay.in> Co-authored-by: Gnanasundari24 <118818938+Gnanasundari24@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										40
									
								
								crates/analytics/src/utils.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								crates/analytics/src/utils.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | ||||
| use api_models::analytics::{ | ||||
|     api_event::{ApiEventDimensions, ApiEventMetrics}, | ||||
|     payments::{PaymentDimensions, PaymentMetrics}, | ||||
|     refunds::{RefundDimensions, RefundMetrics}, | ||||
|     sdk_events::{SdkEventDimensions, SdkEventMetrics}, | ||||
|     NameDescription, | ||||
| }; | ||||
| use strum::IntoEnumIterator; | ||||
|  | ||||
| pub fn get_payment_dimensions() -> Vec<NameDescription> { | ||||
|     PaymentDimensions::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_refund_dimensions() -> Vec<NameDescription> { | ||||
|     RefundDimensions::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_sdk_event_dimensions() -> Vec<NameDescription> { | ||||
|     SdkEventDimensions::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_api_event_dimensions() -> Vec<NameDescription> { | ||||
|     ApiEventDimensions::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_payment_metrics_info() -> Vec<NameDescription> { | ||||
|     PaymentMetrics::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_refund_metrics_info() -> Vec<NameDescription> { | ||||
|     RefundMetrics::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_sdk_event_metrics_info() -> Vec<NameDescription> { | ||||
|     SdkEventMetrics::iter().map(Into::into).collect() | ||||
| } | ||||
|  | ||||
| pub fn get_api_event_metrics_info() -> Vec<NameDescription> { | ||||
|     ApiEventMetrics::iter().map(Into::into).collect() | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sampras Lopes
					Sampras Lopes