You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to send logs from a Apache Camel application running in a Docker container to Application Insights.
I have created an Application Insight resource and provided the application with my connection string.
I can connect to the app via the Live Metrics in AI and see that logs are coming in, but when I try to view historic transaction I see no logs.
When looking in the applicationinsights-logs I can see that the agent is starting without complaints. But, after running a while I get this:
WARN c.m.a.a.i.telemetry.TelemetryChannel - In the last 5 minutes, the following operation has failed 20 times (out of 20): Sending telemetry to the ingestion service (telemetry will be stored to disk on failure)::
* Error sending telemetry items: instrumentationKey must be non-null when using ikey redirect policy (20 times)
When looking at the source-code the instrumenation key seems to be missing from the context in com.microsoft.applicationinsights.agent.internal.httpclient.RedirectPolicy
I've tried providing the connection string in the applicationinsights.json-file and via the env-var APPLICATIONINSIGHTS_CONNECTION_STRING without seeing any difference.
I've also tried to provide the instrumentation key explicitly by providing it via APPINSIGHTS_INSTRUMENTATIONKEY without success.
I have tried running a similar setup outside the Docker container, with Camel and the same connection string, and it works fine.
Now, I understand that there may be multiple causes to why I'm not seeing my logs in AI so for this report I'm focusing on the error I get in the logs.
Might be relevant that I get other exceptions before this, so I thought this was related: #1927 but I have upgraded to v3.2.2 as suggested in that issue.
Expected behavior
No error regarding missing instrumentation key when connection string has been provided.
Actual behavior
Getting error "instrumentationKey must be non-null when using ikey redirect policy" when connection string has been provided.
applicationinsights.log
The logs is from 3 different applications. They all run the same Java and Linux versions. You can see that I have tried different configurations. My last run starts at line 513. I get all kinds of fun exceptions during my runs.
I am trying to send logs from a Apache Camel application running in a Docker container to Application Insights.
I have created an Application Insight resource and provided the application with my connection string.
I can connect to the app via the Live Metrics in AI and see that logs are coming in, but when I try to view historic transaction I see no logs.
When looking in the applicationinsights-logs I can see that the agent is starting without complaints. But, after running a while I get this:
When looking at the source-code the instrumenation key seems to be missing from the context in com.microsoft.applicationinsights.agent.internal.httpclient.RedirectPolicy
I've tried providing the connection string in the applicationinsights.json-file and via the env-var APPLICATIONINSIGHTS_CONNECTION_STRING without seeing any difference.
I've also tried to provide the instrumentation key explicitly by providing it via APPINSIGHTS_INSTRUMENTATIONKEY without success.
I have tried running a similar setup outside the Docker container, with Camel and the same connection string, and it works fine.
Now, I understand that there may be multiple causes to why I'm not seeing my logs in AI so for this report I'm focusing on the error I get in the logs.
Might be relevant that I get other exceptions before this, so I thought this was related: #1927 but I have upgraded to v3.2.2 as suggested in that issue.
Expected behavior
No error regarding missing instrumentation key when connection string has been provided.
Actual behavior
Getting error "instrumentationKey must be non-null when using ikey redirect policy" when connection string has been provided.
System information
Please provide the following information:
Logs
applicationinsights.log
The logs is from 3 different applications. They all run the same Java and Linux versions. You can see that I have tried different configurations. My last run starts at line 513. I get all kinds of fun exceptions during my runs.