Skip to content

Why registring the ApplicationInsights in a try/catch #2971

@JJong-nl

Description

@JJong-nl

public static IServiceCollection AddApplicationInsightsTelemetryWorkerService(this IServiceCollection services)

Why regestring this in a try/catch ??
When we start the application, with wrong applicationinsight settings, nothing craches, but when we use the 'TelemetryClient' by dependency injection it does.
The service is not registred and the application crashes.

So, why not remove the try/catch.
When we want to register the ApplicationInsights, and something is wrong in registring all the dependencies, we want to know on start and the application should not be running at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions