The problem statement is to demonstrate apm transaction with certain labels using golang based lambda. But did not find suitable docs to continue the process.How to use "go.elastic.co/apm/v2" to show transaction on kibana with proper configurations.
The piece of code I am trying to perform is :
func SendApmTransactionFcm(ctx context.Context, Service string, ApmData *FcmApmJob) {
apmTransaction := apm.DefaultTracer().StartTransaction(Service, "request")
apmTransaction.Context.SetLabel("clientid", ApmData.ClientID)
apmTransaction.Context.SetLabel("messageid", ApmData.MessageId)
apmTransaction.Context.SetLabel("appid", ApmData.AppId)
apmTransaction.Context.SetLabel("personalized", ApmData.Personalized)
apmTransaction.Context.SetLabel("processtime", ApmData.ProcessTime)
apmTransaction.Context.SetLabel("successfcmrequest", ApmData.SuccessFcmBatch)
apmTransaction.Context.SetLabel("failedfcmrequest", ApmData.FailedFcmBatch)
apmTransaction.End()
CustomLogging("pushNotificaton", fmt.Sprintf("Apm transaction for %v service %+v with transaction id %+v", Service, ApmData, apmTransaction.TraceContext().Trace.String()))
}
but still not able to get apm transaction. Also if possible please share example of setting lambda conifguration for apm/v2 transaction.