question

venkatahanumanchowdarysomepalli-8544 avatar image
0 Votes"
venkatahanumanchowdarysomepalli-8544 asked StephanGeissbhler-7126 commented

Azure Functions Log to Event Hub

Hi Team,

How to call an Event Hub When the Error/Success Message Occurred in the Functions?

azure-functionsazure-event-hubsazure-event-grid
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@venkatahanumanchowdarysomepalli-8544 ,

Following up to see if my answer helps. Do let us know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·

1 Answer

MughundhanRaveendran-MSFT avatar image
0 Votes"
MughundhanRaveendran-MSFT answered StephanGeissbhler-7126 commented

@venkatahanumanchowdarysomepalli-8544 ,

Thanks for reaching out to the Microsoft Q&A forum.

You can call/send events to eventhub using the eventhub output bindings in Functions or by using the Eventhub sdk in the function code. For the error/success handling, you may use a try/catch block in the function code and in case of failure you can catch the exception and send events to the eventhub.

I hope this helps! Feel free to reach out to me if you have any further queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@venkatahanumanchowdarysomepalli-8544 , Following up to see if the above answer helps. Do let us know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·

This article here from 2019 mentions a way to send the Logs to an azure Event Hub, but I couldn't find an implementation or example anywhere:
https://azure.microsoft.com/en-in/updates/azure-functions-integration-with-azure-monitor-logs-is-now-in-public-preview/

How can we replace or configure ILogger, to log to Event Hub?

The question is not clarified by the suggested answers :/



0 Votes 0 ·