This is application insight query which i need to write in splunk , can some one help me please
let a=traces | where cloud_RoleInstance startswith "sams-card-account-update" | where message contains "Received Message from CAU:" | parse message with * "clientReqId='" clientReqId "', status=" * "resultReason='" resultReason "', message" * | project clientReqId, timestamp, resultReason | parse clientReqId with personId "_" paymentInstrumentId "_retry-" retry "_" epoch | project responseDate = bin(timestamp,1d),personId, paymentInstrumentId, retry, requestDate = bin(unixtime_milliseconds_todatetime(tolong(epoch)),1d), resultReason | where resultReason !in ("AU202","AU203","AU401","AU501","Z999") | distinct requestDate, personId, paymentInstrumentId, responseDate, resultReason | summarize receivedCount = count() by requestDate, responseDate; let b=customEvents | where cloud_RoleInstance startswith "sams-card-account-update" | where name == "CAU_UPDATE_REQUEST" | extend personId = tostring(customDimensions.personId) | extend paymentInstrumentId = tostring(customDimensions.paymentInstrumentId) | project requestDate = bin(timestamp,1d), personId, paymentInstrumentId | distinct requestDate, personId, paymentInstrumentId | summarize requestedCount = count() by requestDate; a | join kind=inner b on requestDate | project requestDate, responseDate, requestedCount, receivedCount | project received_perc = receivedCount / todouble(requestedCount) * 100, responseDate, requestDate=substring(requestDate,0,10) | sort by requestDate asc,responseDate asc | render timechart
this is how the data look like
{"kubernetes":{"labels":{"version":"v1","app":"card-account-update"},"pod_name":"card-account-update-5c4b875dc6-t7kzx","host":"stage-a6-vmss0003is","namespace_name":"n1497934467"},"time":"2023-03-25T09:05:16.023813003Z","log":{"timestamp":"2023-03-25T09:05:16.023Z","type":"trace","context":"default","thread":"org.springframework.kafka.KafkaListenerEndpointContainer#0-11-C-1","logger":"com.t.cau.integration.impl.CAUConsumer","level":"INFO","message":"Received Message from BST: BSTResponse{inquiryValue='20042341056', clientId='BSTclub.com', clientReqId='99f50c8e-4800-42af-b7ea-ccc9bf0a5349-4b40-9eea-aabfd0affec7_retry-2_1679735115331', status='ERROR', result='ERROR', resultReason='AU501', message='Unknown Error encountered', instrumentMap={xref=com.BST.payment.cau.integration.model.InstrumentInfo@6c3ad85}}"},"cluster_id":"wus-stage-a6"}
Thanks in advance
... View more