An Azure service that provides an event-driven serverless compute platform.
@Jeff Liu Thanks for your offline discussion. We have reviewed the configuration and found that the Stream Analytics job was configured correctly with the azure function.
Stream analytics job was able to trigger the function app correctly but due to function app code in a few of the scenarios, it was resulting in 500 internal errors.
We have reviewed the application insights logs to get more details on the exact error and fixed the function code.
Leveraged below code snippet to get the data in function app which was passed from Stream Analytics job and configure the output correctly at stream analytics end.
try:
req_body = req.get_json()
logging.info(req_body)
for body in req_body:
logging.info(body.get('yourjsonproperty'))
except ValueError:
logging.info("No parameter found in request body")
return func.HttpResponse("No alert parameter found in request body",status_code=400)
return func.HttpResponse(
"HTTP triggered function executed successfully.",
status_code=200
)
We have fixed the telegram API call with the out from stream analytics services and you confirmed that the message was successfully received at the telegram end.