Open kf6kjg opened 3 years ago
According to the Azure documentation it looks like the instrumentation keys are being phased out in favor of connection strings. It's possible that this is the source of the disconnect?
@kf6kjg Any fix for this?
@kf6kjg Any fix for this?
None that I'm aware of at this time.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
AFAICT this is still a problem, though I've not tried reproducing it since I reported it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I recently got application insights logging working just fine, using next.js and next-logger, pino-ms, and pino-applicationinsights.
I am using the connection string in place of the instrumentation key. The MS docs don't make it very clear. But it seems anywhere you would use an instrumentation key ("iKey") you can use a connection string.
https://github.com/atkinchris/next-logger/issues/12
In next.config.js, if process.env.APPINSIGHTS_CONNECTIONSTRING
is not defined, I recommend crashing so a build+deploy does not go through. Unfortunately, why that env var would not come through is an azure issue, has nothing to do with pino-applicationinsights. But if you have that issue, I'm not opposed to comparing your pipeline file to ours.
As I've had this working, I recommend closing the issue. Maybe the issue was solved by some other related dependency, maybe INSTRUMENTATION_KEY just does not work anymore, idk.
If that be the case, then maybe a documentation update is all that is needful.
I seem to have been mistaken in my previous analysis. In azure portal under "Diagnose and Solve Problems" it shows "Application Logs" (stdout) from my node server, without any of my logging code.
Application Insights != stdout. Iād expect nothing on stdout.
On Fri, Mar 4, 2022 at 1:14 AM Devin Rhode @.***> wrote:
I seem to have been mistaken in my previous analysis. In azure portal under "Diagnose and Solve Problems" it shows "Application Logs" (stdout) from my node server, without any of my logging code.
ā Reply to this email directly, view it on GitHub https://github.com/ovhemert/pino-applicationinsights/issues/42#issuecomment-1058979929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI2Q2F4IPBK5ROK5TLDSKLU6HH7JANCNFSM42NQ7QLA . You are receiving this because you were mentioned.Message ID: @.***>
Yeah I noticed when ApplicationInsights setup code runs, there isn't anything printed to stdout except this:
ApplicationInsights:An invalid instrumentation key was provided. There may be resulting telemetry loss [ 'asdf' ]
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
š Bug Report
The messages sent to Applications Insights do not appear to be being received.
To Reproduce
Steps to reproduce the behavior:
The REDACTED value in the above comes from the Application Insights Instrumentation Key line, the location of which on the Azure Portal interface is highlighted in green here:
Open an additional terminal and run the following
The REDACTED value here is the
Application ID
located under theAPI Access
sidebar.Alternatively, use the
Logs
sidebar and query for traces.Expected behavior
The logger to send the log object to the Azure Insights service and then the latter to be able to show the resulting entry.
Your Environment
node:14-alpine3.11
Docker image.