Altinn/app-lib-dotnet

Removing TelemetryClient and prometheus-net

Opened this issue · 2 comments

Description

Part of the Monitoring epic.

Find all dependencies in app-developers apps to TelemetryClient and note if there are any hard dependencies - e.g. dependecy injection.

In scope

The usage of TelemetryClient in app developers apps running on TEs test or production clusters.

Out of scope

Any custom use of TelemetryClient - When a the app code creates a new instance of TelemetryClient.

Apps which are not deployed to any environment(?)

Additional Information

No response

Analysis

Initial analysis:

  1. Clone all repositories from Gitea (NOTE: All open repos - no auth)
  2. Search for 'TelemetryClient'

Findings:
Lots of apps creating a new instance of TelemetryClient in Program.cs (using a dated version of the nuget-packages)
One case of an app creating a new instance of TelemetryClients in Startup.cs.
No cases of dependency injection.

Preliminary conclusion: Removing TelemetryClient is not a breaking change.

Conclusion

No response

Question: As seen in the Analysis part of the issue, only open repos were cloned. Are there any repositories which require auth? @ivarne maybe you know the answer?

I think so. I've just assumed those who might have locked down access to their repositories don't want us to run such analyses, but I have not confirmed that.

Anyway, is the issue about not using AI and TememetryClient, or to use a wrapper for our code that allows future changes?