Documentation ¶
Index ¶
- Constants
- func APIAnalyticsElastic(apiEndpoint string) (string, int)
- func APIAnalyticsOracle(apiEndpoint string) (string, int)
- func APIAnalyticsQuery(apiEndpoint string) string
- func ApplicationAnalyticsElastic(appGroupId string) (string, int)
- func ApplicationAnalyticsOracle(applicationId string) (string, int)
- func ApplicationAnalyticsQuery(services []service.Service) string
- func LogsElastic(apiEndpoint string) (string, int)
- func LogsOracle(apiEndpoint string) (string, int)
- func LogsQuery(apiEndpoint string) string
- func LogsURL() string
- func RowsToLogRequestModel(rows *sql.Rows, containsPagination bool) []logsModels.RequestLogging
- type ApiAnalytics
- type AvgElapsedTimeStruct
- type BucketStruct
- type MaxElapsedTimeStruct
- type MinElapsedTimeStruct
- type RemoteAddrStruct
- type StatusCodeStruct
- type UserAgentStruct
Constants ¶
View Source
const ANALYTICS_QUERY_ORACLE = `` /* 138-byte string literal not displayed */
View Source
const APP_ANALYTICS_QUERY_ORACLE = ` SELECT count(*) as total_requests, MAX (elapsed_time) max_elapsed_time, AVG (elapsed_time) avg_elapsed_time, MIN (elapsed_time) min_elapsed_time, '','','', c.name, 1 FROM gapi_request_logs a, gapi_services b LEFT JOIN gapi_services_apps_groups c ON b.applicationgroupid = c.id WHERE a.index_name <> '` + constants.GAPI_API_LOGS_INDEX + `' and a.service_name = b.matchinguri ##WHERE_CLAUSE## GROUP BY c.name`
View Source
const LOGS_QUERY_ORACLE = `SELECT id,method,uri,request_body,host,user_agent,remote_addr,remote_ip,headers,query_args,date_time,response,elapsed_time,status_code,service_name,index_name,request_grouper_date FROM gapi_request_logs where index_name <> '` + constants.GAPI_API_LOGS_INDEX + `' and status_code >= 300 `
Variables ¶
This section is empty.
Functions ¶
func APIAnalyticsElastic ¶
func APIAnalyticsOracle ¶
func APIAnalyticsQuery ¶
func LogsElastic ¶
func LogsOracle ¶
func RowsToLogRequestModel ¶
func RowsToLogRequestModel(rows *sql.Rows, containsPagination bool) []logsModels.RequestLogging
Types ¶
type ApiAnalytics ¶
type ApiAnalytics struct { Key string `json:"key"` MaxElapsedTime MaxElapsedTimeStruct MinElapsedTime MinElapsedTimeStruct AvgElapsedTime AvgElapsedTimeStruct TotalRequests int `json:"doc_count"` RemoteAddr RemoteAddrStruct UserAgent UserAgentStruct StatusCode StatusCodeStruct }
func RowsToApiAnalyticsModel ¶
func RowsToApiAnalyticsModel(rows *sql.Rows) []ApiAnalytics
type AvgElapsedTimeStruct ¶
type AvgElapsedTimeStruct struct {
Value float32 `json:"value"`
}
type BucketStruct ¶
type MaxElapsedTimeStruct ¶
type MaxElapsedTimeStruct struct {
Value float32 `json:"value"`
}
type MinElapsedTimeStruct ¶
type MinElapsedTimeStruct struct {
Value float32 `json:"value"`
}
type RemoteAddrStruct ¶
type RemoteAddrStruct struct {
Buckets []BucketStruct `json:"buckets"`
}
type StatusCodeStruct ¶
type StatusCodeStruct struct {
Buckets []BucketStruct `json:"buckets"`
}
type UserAgentStruct ¶
type UserAgentStruct struct {
Buckets []BucketStruct `json:"buckets"`
}
Click to show internal directories.
Click to hide internal directories.