saleem-mirza / serilog-sinks-azure-analytics

Serilog sink which writes to Azure analytics
Apache License 2.0
62 stars 45 forks source link

Question: Support for Log Ingestion API #80

Open cbykarl opened 1 year ago

cbykarl commented 1 year ago

Hello!

Is there any plans on adding support for sending log data using the Logs Ingestion API? From my understanding the "Data Collector API" that this package is using to send log data is treated as legacy by MSFT. Here is a migration guide they published in june.

Great package, thx so far! :)

saleem-mirza commented 1 year ago

@cbykarl thanks for bringing it up. Microsoft is notorious for deprecating/rebranding things for nothing ;) but I'll keep an eye on it.

ZenwalkerD commented 1 year ago

Looks like this is affected already. The library is unable to create a log table in the Log analytics workspace and nothing happening.

Is there a workaround or a new version coming up?

SonaSteve commented 1 year ago

Looks like we have a date (https://azure.microsoft.com/en-us/updates/azure-monitor-data-collection-api-retirement/):

"On 14 September 2026, we’ll retire Data Collector API for ingesting custom logs to Azure Monitor logs."

saleem-mirza commented 1 year ago

I am planning to support new API as soon as time permits. But if any brave soul wants to contribute, its highly appreciated 👍🏼

kakins commented 11 months ago

I am planning to support new API as soon as time permits. But if any brave soul wants to contribute, its highly appreciated 👍🏼

I was just thinking about this, and I may need to jump in.

It's been like 2 years since I've worked with this library and LA in Azure, and I'm still pretty dumbfounded still at how difficult Microsoft has made it to write to a custom LA log -- especially since I read in multiple places that this is the preferred way for isolating and querying application-specific logs.

So I'm glad I found this thread, because I still don't think there's another library out there that makes it as intuitive as this one to accomplish the goal. As far as I can tell, the only current alternative, aside from writing your own like we're discussing, is using the ingestion API client SDK directly. This kinda takes the point away from using logging abstractions ... why haven't they addressed this in a similar fashion like for logging to app insights?

well0549 commented 7 months ago

Well the new way to go is to write to Azure Monitor. You will need a Data Collection Endpoint and a data collection rule. Once that is in place you can still write to log analytics only with a different Rule.