Skip to content
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

UseTinyInsightsAsILogger not working with Microsoft.Extensions.Logging.ILogger #44

Open
AlexScotte opened this issue Dec 18, 2024 · 3 comments
Labels
bug Something isn't working library

Comments

@AlexScotte
Copy link

Hello,

I have an application that works well using sswart/MauiInsights to send data to applications via ILogger.
I wanted to move to TinyInsights.Maui to be able to handle offline mode.

Unfortunately, no information is sent to Application Insight when I use UseTinyInsightsAsILogger. I'm sure about the connection string.

`builder
//.AddCrashLogging()
.UseTinyInsightsAsILogger(applicationInsightConnectionString,
(provider) =>
{
provider.IsTrackDependencyEnabled = true;
provider.IsTrackEventsEnabled = true;
provider.IsTrackErrorsEnabled = true;
provider.IsTrackPageViewsEnabled = true;
provider.IsTrackCrashesEnabled = true;
provider.IsAutoTrackPageViewsEnabled = true;
});

Maybe I missed something in the configuration ?

Thanks for your help !

Android version: 11
Dependencies:
CommunityToolkit.Maui" Version="9.1.0"
CommunityToolkit.Maui.Core" Version="9.1.0"
CommunityToolkit.Mvvm" Version="8.3.2"
Grace" Version="8.0.0-RC837"
Grace.DependencyInjection.Extensions" Version="8.0.0-RC138"
Microcharts.Maui" Version="1.0.0" />
Microsoft.Extensions.Configuration.Binder" Version="8.0.2"
Microsoft.Extensions.Configuration.Json" Version="8.0.1"
Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0"
Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0"
Microsoft.Extensions.Logging.Console" Version="8.0.1"
Microsoft.Extensions.Logging.Debug" Version="8.0.1"
Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1"
Microsoft.IdentityModel.Tokens" Version="8.2.1"
Microsoft.Maui.Controls" Version="8.0.100"
Microsoft.Maui.Controls.Compatibility" Version="8.0.100"
Serilog" Version="4.1.0"
Serilog.Extensions.Logging" Version="8.0.0"
Serilog.Sinks.Console" Version="6.0.0"
Serilog.Sinks.File" Version="6.0.0"
SkiaSharp.Views.Maui.Controls" Version="2.88.9"
Syncfusion.Maui.Buttons" Version="27.2.2"
Syncfusion.Maui.Charts" Version="27.2.2"
Syncfusion.Maui.Core" Version="27.2.2"
Syncfusion.Maui.Expander" Version="27.2.2"
Syncfusion.Maui.Inputs" Version="27.2.2"
Syncfusion.Maui.ListView" Version="27.2.2"
Syncfusion.Maui.Picker" Version="27.2.2"
Syncfusion.Maui.Popup" Version="27.2.2"
Syncfusion.Maui.ProgressBar" Version="27.2.2"
Syncfusion.Maui.PullToRefresh" Version="27.2.2"
Syncfusion.Maui.Sliders" Version="27.2.2"
Syncfusion.Maui.TabView" Version="27.2.2"
TinyInsights.Maui.AppInsights" Version="1.5.0"

@AlexScotte
Copy link
Author

AlexScotte commented Dec 18, 2024

I'm trying to use it in connected mode for now for information

@dhindrik
Copy link
Owner

I will take a look.

I never actually tested it in offline mode. I know crashes will work, but not sure about what happens with other type of data. Maybe it is handled by the application insights lib. But what happens if app is killed?

@AlexScotte
Copy link
Author

Thanks @dhindrik

But even in online mode my data is not sent to application insight 🤔 I tried to do a simple logger.LogInformation

@dhindrik dhindrik added bug Something isn't working library labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working library
Projects
None yet
Development

No branches or pull requests

2 participants