New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0-beta.11 - has no exported member 'Context' #1299
Comments
Hi @jerryjren, if you've already auto-instrumented your application when you created the Azure Function, you shouldn't need to do any manual instrumentation with this SDK. If your main goal is to be using OpenTelemetry concepts and instrumentations, I'd suggest using the Azure Monitor OpenTelemetry Distro for Node.js https://www.npmjs.com/package/@azure/monitor-opentelemetry. The intention of the shim is primarily to provide customers already heavily manually instrumented with ApplicationInsights SDK 2.x a simple path forward. |
Hi, According to this tutorial that opentelemetry nodejs api currently does not support custom events. It suggested to use application insights class api instead. See below. I might be reading it wrong, any suggestions are welcome. thank you |
@jerryjren Ah, I see. Yes, if you're looking for custom events, you're on the right track. Based on the error it looks like there's just a type |
|
@jerryjren It looks like the SDK is not compatible with @azure/functions 4.3.0's types. Could you try setting your @azure/functions package version to 3.2.0? |
hey, sorry about late reply. I tried with @azure/functions package version to 3.2.0, and it works. Thanks for that. Although I'm encounter another issue saying invalid metric name, even though I'm trying to track event. Here is the statcktrace
Here is my function app
|
@jerryjren That's normal for the OpenTelemetry based SDK. OpenTelemetry complains about the existence of spaces in the metric names for performance counters, but functionality shouldn't be impacted. |
Cool, just a warning then. Thanks Last question, do you know which table in App insights will contain the above events? I cannot see anything in customEvents. I do see logs in requests table, so that can confirm the connection string is correct. Thanks again |
@jerryjren In OpenTelemetry context (which the beta and now application insights 3.X SDK is built on) customEvents are a form of log. They should appear in the "Transaction Search" blade in the Azure portal. Please let me know if you're not seeing them there. Thanks! |
unfortunately, I'm not seeing anything :( Below is from requests table of same Application insights, just to confirm the application is able to connect to Application insights Update, I'm seeing this error in my function output. Could this be why?
|
@jerryjren Yeah, that looks to be the reason you're not receiving telemetry. Are you still on 3.0.0-beta.11? Or did you upgrade to version 3.0.0 of Application Insights? If you did upgrade, are you using the |
I'm using 3.0.0-beta.12 now, and I'm using Just tried using 3.0.0, saw same errors in the output. |
@jerryjren Thank you for raising this issue. After investigation, I've resolved the issue with this PR: #1312 and the fix will be available in the next release. |
Thanks for addressing this issue promptly. One last question, assuming this is working and we are able to see logs in Application Insights, how could we export the logs in Open Telemetry format and forward them to 3rd party i.e.cloudwatch ? I know this may not be the right place to ask this question. All good if you don't know. Thanks again |
Hi there,
I have added application insights library to my Azure function app in order to send custom events.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=nodejs#send-custom-telemetry-using-the-application-insights-classic-api
After npm start, I'm getting the below error. Any suggestion?
Another question, my function has associated application insights. Do I still need to use this library? The reason to use this library was I want my logs to be in OpenTelemetry format, hence followed the tutorial below.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=nodejs
Func version: 4.0.5455
The text was updated successfully, but these errors were encountered: