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

Configure App Insights for Aspire telemetry #15

Merged
merged 5 commits into from
Jan 8, 2025
Merged

Conversation

SulliNV
Copy link
Contributor

@SulliNV SulliNV commented Dec 17, 2024

Proposed Changes

  • Bug fix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes, no api changes)
  • Build or CI related changes
  • Documentation content changes
  • Other, please describe:

What is the current behavior?

No APM is configured for the application

What is the new behavior?

App Insights is configured for the application

Checklist

Please check that your PR fulfills the following requirements:

  • Documentation has been added/updated.
  • Automated tests for the changes have been added/updated.
  • Updated BREAKING_CHANGES.md (if you introduced a breaking change).

Other information

@SulliNV
Copy link
Contributor Author

SulliNV commented Dec 17, 2024

Please note:

This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

@SulliNV SulliNV marked this pull request as ready for review January 7, 2025 19:45
@MatFillion
Copy link
Member

Please note:

This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

Is that something we should add to the README?

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

@SulliNV
Copy link
Contributor Author

SulliNV commented Jan 7, 2025

Please note:
This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

Is that something we should add to the README?

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

@MatFillion I don't think so. I put this comment as an FYI of the current state for whoever was going to take over because I couldn't test automatic provisioning before I went on holiday. @MounirAbdousNventive was able to confirm that it worked so I removed the line for manual provisioning altogether (which I had commented in the first place).

README.md Outdated Show resolved Hide resolved
@SulliNV SulliNV merged commit 5df8be2 into main Jan 8, 2025
5 checks passed
@SulliNV SulliNV deleted the feat/app-insights branch January 8, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants