结合应用见解

I use github.com/microsoft/ApplicationInsights-Go package to communicate with Azure Application Insights and I want to gather logs from logrus (logging package) and http request logs from gin (http server package). I managed to send both logs to AI as one of answers there presents.

The only problem is with sending these logs, because sometimes it lasts 3 minutes and sometimes around 15. Is this a problem with AI or Telemetries should be flushed somehow?

I also tried reducing max batch size and interval by

telemetryConfig := appinsights.NewTelemetryConfiguration(c.InstrumentationKey)
telemetryConfig.MaxBatchSize = 128 //default is 1024
telemetryConfig.MaxBatchInterval = 1 * time.Second //default is 10

and then creating a client

appinsights.NewTelemetryClient(telemetryConfig)

but it's still not close to second-like time.

performing Flush() on client channel does not work too.

Thanks in advance for any advice