Zimmergren/LogAnalytics.Client

Good work. What about time-generated-field and x-ms-AzureResourceId headers?

arka273 opened this issue · 5 comments

Hi, during my proof of concept with log analytics and your LogAnalytics.Client I found it useful to use x-ms-AzureResourceId and time-generated-field headers. They will be used eventually in my production solution. In the attached files you can find some quick changes I made to your code to use them. . Will you be planning on implementing those HTTP headers? Have a good day.

ILogAnalyticsClient.cs.txt
LogAnalyticsClient.cs.txt

Hey @arka273 ,

Thanks for the feedback and contributing this idea.

When reviewing the docs ( https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api#request-headers ), these headers definitely make sense.

While looking into this, are there other headers or properties that would be beneficial for the production scenarios you're considering?

Cheers,
Tobias.

Hi @Zimmergren, I used only those 2 additional properties in my POC. The x-ms-date may be handy as well, although I didn't find a use case for it yet. Regards, Arka

Hi @Zimmergren, I missed the plain fact that you were using the x-ms-date already.

Hey @arka273 ,

I've created a new PR #30 that contains the necessary changes and tests to verify. All green, version 1.2.0 will be published today that contains these changes.

Cheers,
Tobias.

Hey @Zimmergren, thank you. Arka