有没有办法集成 Outlook 加载项和 Azure Application Insights?

问题描述 投票:0回答:1

我正在尝试创建一个 Outlook 插件,只需单击“发送”按钮即可工作。它应该尝试检查收件人是否是外部用户,并显示一个带有两个按钮的自定义对话框,即“仍然发送”和“不发送”。然后,我想计算弹出窗口显示的次数、单击按钮的次数等指标,并使这些指标在 Application Insights 上可用。

我尝试在我的 Outlook 插件的 JS 代码中使用它:

const appInsights = new ApplicationInsights({
    config: {
        instrumentationKey: '*****',
    },
});
appInsights.loadAppInsights();
appInsights.trackEvent({
                        name: 'PopupDisplayed',
                        properties: {
                            recipients: externalRecipients.join(';'),
                        },
                    });

这需要很长时间来处理,最后给我一个警告,说“我的加载项现在不可用,所以请稍后尝试”。这会有很大的帮助!如果有人可以分享我的文档和代码参考,可以帮助我显示自定义对话框 Onsend 并将弹出窗口与 Application Insights 集成(如果可以实现)。

ms-office outlook-addin azure-application-insights office-addins outlook-web-addins
1个回答
0
投票

了解 Azure 应用程序洞察: 熟悉 Azure Application Insights,这是一项全面的应用程序性能管理 (APM) 服务。它允许您监控并深入了解应用程序的使用情况和性能。

创建 Azure Application Insights 资源: 在 Azure 门户中设置 Azure Application Insights 资源。此资源将充当从 Outlook 加载项收集遥测数据的中心位置。

检索仪器密钥: 创建 Application Insights 资源后,获取 Instrumentation Key。此密钥是将您的 Outlook 加载项与相应的 Application Insights 资源关联起来的唯一标识符。

将 Application Insights 与 Outlook 插件集成: 将 Application Insights SDK 集成到 Outlook 加载项中。这涉及向您的外接程序项目添加必要的代码或配置,以使其能够将遥测数据发送到 Application Insights。

仪器遥测点: 确定 Outlook 加载项代码中要跟踪遥测数据的特定点。这些可能包括事件、用户交互或任何其他提供有关加载项使用情况的见解的相关指标。

处理错误和异常: 在加载项中实施错误跟踪,以捕获并记录用户可能遇到的任何错误或异常。这有助于快速识别和解决问题。

部署和监控: 使用集成的 Application Insights 工具部署 Outlook 加载项。监控加载项生成的遥测数据,以深入了解用户行为、性能瓶颈和任何潜在问题。

写一篇文章: 记录集成过程并在文章中分享您的经验。包括关键步骤、面临的挑战以及通过使用 Azure Application Insights 监视 Outlook 加载项获得的见解。为可能想要实现类似集成的开发人员提供有用的提示。

© www.soinside.com 2019 - 2024. All rights reserved.