Application Insight compression in REST POST

Prabhjot singh kalra 1 Reputation point
2021-07-06T11:59:44.78+00:00

Hi Team,

Is there a way or library to compress JSON data sent in the body of the REST call to Azure application Insight?

Sending (Post) data on this URL:
https://dc.applicationinsights.azure.com/v2/track

The json body contains 250 or so custom strings:

{
"tags": {
"ai.operation.name": "Search parameters",
"ai.operation.id": "xxxx",
"ai.id": "xxxx",
"ai.operation.parentId": "xxxx",
"ai.session.id": "xxxx",
"ai.session.isFirst": "false",
"ai.operation.correlationVector": "0",
"ai.internal.sdkVersion": "xxxx",
"ai.cloud.role": "xxxx",
"ai.cloud.roleInstance": "xxxx",
"ai.application.ver": "1"
},
"data": {
"baseData": {
"properties": {
"Custom String 1": "xxxx",
"Custom String 2": "xxxx",
"...": "...",
"...": "...",
"...": "...",
"Custom String 250": "xxxx",
},
"ver": "2",
"name": "xxxx"
},
"baseType": "EventData"
},
"time": "2021-06-29T07:25:16Z",
"iKey": "xxxx",
"name": "Microsoft.ApplicationInsights.Prod.xxxx.Event"
}

Notes:

  1. Collectively per data is going 1.5 GB to Azure Application insight.
  2. Compressing them will save bandwidth and time to send data.
  3. Individually, it might sound like a small compression but on a bigger perspective, it turns a huge benefit.

--
Regards,
Prabhjot

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. bharathn-msft 5,106 Reputation points Microsoft Employee Moderator
    2021-08-03T17:49:03.74+00:00

    @Prabhjot singh kalra Welcome to Microsoft Q&A and thanks for your query. Our sincere apologies for delay in getting this to this thread.

    Regarding your specific query, post validation with our internal team , it has been called out that currently Application Insights SDK does support compression based on what kind of SDK you are using.

    For instance , both .NET and Java SDK supports this and gzip is enabled by default only. For additional details on .NET SDK , please refer here.

    However for JS SDK it is not currently supported and if you see this feature being helpful to you , would request you to create an entry in our feedback channel here. Once you create the feedback item, it will be open for the user community to upvote & comment on. This allows our team to effectively prioritize your request against our existing feature backlog and also gives us insight into the potential impact of implementing the suggested feature.

    However if you are using any other SDK's please let us know.

    Hope the above information helps, thank you. Please let us know if you have any further queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.