因此,我创建了一个配置微服务的 Application Insights 的类库。这些是 Application Insights 配置方法:
这就是我在每个微服务的 Startup.cs 类中使用它们的方式:
但是,数据不会在 Log Analytics 中“保存”,因此我无法对数据运行任何查询(它始终返回 0 个结果)。
我认为这可能是因为每个微服务的 Program.cs 中存在以下代码:
我认为应用程序见解记录器可能未正确配置(未明确设置检测密钥)。但是,我尝试将 TelemetryConfiguration 的检测密钥设置为硬编码的检测密钥,但它没有执行任何操作。
我确实阅读了此文档:https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core 但我似乎没有错过任何步骤(我调用 AddApplicationInsights 和添加ApplicationInsightsKubernetesEnricher)。
我想知道是否有人可以看到这个问题,我真的不知道如何通过实时指标而不是 Log Analytics 查看数据。
注意:在使用完全相同的代码(当您right click on project > Setup Application Insights
和它完美运行时 VS 生成的默认代码)实现库之前,我确实尝试添加应用程序见解。
非常感谢!
我有一个离子 4 电容器应用程序,可以在 iOS 上正常工作。我正在使用 Angular 8 和延迟加载。
然而,每当我想运行 Android 应用程序时,我都会收到大量错误,指出许多块无法加载。
我没有遇到任何错误ionic build --prod
以下是错误消息:
E/Capacitor/Console: File: http://localhost/polyfills-es2015.92885f6bd7b81e5291ae.js - Line 1 - Msg: Unhandled Promise rejection: Cannot read property 'isProxied' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'isProxied' of undefined TypeError: Cannot read property 'isProxied' of undefined
at http://localhost/main-es2015.68cf7a0c19a90cf519a4.js:6:888639
E/Capacitor/Console: File: http://localhost/main-es2015.68cf7a0c19a90cf519a4.js - Line 6 - Msg: ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk 29 failed.
(error: http://localhost/29-es2015.34a50a13c82e01442deb.js)
ChunkLoadError: Loading chunk …
Run Code Online (Sandbox Code Playgroud) 我正在开发一个 Azure 函数,每次在 CosmosDB 中更新文档时都会触发该函数。我已经成功完成了它,但现在我想避免在 CosmosDBTrigger 装饰器内对值进行硬编码。
我已经尝试使用“%”符号引用存储的应用程序值,正如我在另一篇 SO 帖子中看到的那样。然而,它似乎不起作用。帖子是:是否可以配置 Azure C# 函数 DocumentDB 属性参数?
这是我正在尝试实现的解决方案:
public static void Run([CosmosDBTrigger(
databaseName: "%LogLevelsCachingDatabaseName%",
collectionName: "%LogLevelsCachingCollectionName%",
ConnectionStringSetting = "%LogLevelsCachingDatabaseSetting%",
LeaseCollectionName = "%LogLevelsCachingLeaseCollectionName%",
StartFromBeginning = true
)]IReadOnlyList<Document> input, ILogger log)
{
if (input == null || input.Count <= 0) return;
Run Code Online (Sandbox Code Playgroud)
工作解决方案完全相同,但“%”之间的值是硬编码值。
以下是将 Azure Function 发布到 Azure DevOps 时的输出。请注意,ConnectionStringSetting 值是有效的,因为我能够运行 Azure Function,而不会出现硬编码值的任何问题。
错误:
函数 (CacheLogLevels) 错误:Microsoft.Azure.WebJobs.Host:索引方法“CacheLogLevels”错误。Microsoft.Azure.WebJobs.Extensions.CosmosDB:无法为数据库 %LogLevelsCachingDatabaseName% 中的 %LogLevelsCachingCollectionName% 创建集合信息,并在数据库 %LogLevelsCachingLeaseCollectionName% 中创建租约 %LogLevelsCachingDatabaseName%:无法解析属性“CosmosDBTriggerAttribute.ConnectionStringSetting”的应用设置。确保应用程序设置存在并且具有有效值。Microsoft.Azure.WebJobs.Extensions.CosmosDB:无法解析属性“CosmosDBTriggerAttribute.ConnectionStringSetting”的应用程序设置。确保应用程序设置存在并且具有有效值。会话 ID:34dd30479d6a440caf063493bd1abc3d
时间戳: 2019-07-17T22:35:01.376Z
我想使用来自 Azure Function App 配置的值:
Azure 函数应用程序配置 …
我一直致力于使用firebase-admin
version^9.2.0
和react-native-push-notification
version添加自定义声音来推送react-native应用程序的通知^5.1.0
。
我没有升级到最新版本的原因react-native-push-notification
是,即使使用正确的通道配置,自定义声音似乎也不起作用。我们也在使用 expo,它在使用 7+ 版本时似乎会导致启动错误。
我有两个名为regular.mp3
和 的mp3 文件mass.mp3
。发送推送通知的 firebase 函数使用通用数据对象发送消息,还使用推送通知声音的平台特定字段:
admin.messaging().send({
data: {
title,
body,
lat: data.Latitude.toString(),
lng: data.Longitude.toString(),
notificationType: data.NotificationType.toString(),
},
notification:{title,body},
apns:{
payload:{
aps:{
alert:{
title,
body,
},
sound: data.NotificationType === 1 ? "mass.mp3" : "regular.mp3",
},
},
},
android: {
priority: "high",
data: {
sound: data.NotificationType === 1 ? "mass" : "regular",
},
notification: {
sound: data.NotificationType === 1 ? "mass" : "regular", …
Run Code Online (Sandbox Code Playgroud) android push-notification firebase react-native react-native-push-notification
android ×2
azure ×2
c# ×1
capacitor ×1
decorator ×1
firebase ×1
ionic4 ×1
react-native ×1
react-native-push-notification ×1
webpack ×1