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

[AzureMonitorDistro] use IConfiguration to set ConnectionString #37999

Merged
merged 7 commits into from
Aug 8, 2023

Conversation

TimothyMothra
Copy link
Contributor

Follow up to #37913 (comment).

Changes

  • DefaultAzureMonitorOptions will use IConfiguration to set the ConnectionString
  • Add Tests for several configuration scenarios
    • via json
    • via Env Var
    • via IConfiguration

Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review - #34660 (comment)

@TimothyMothra
Copy link
Contributor Author

Please review - #34660 (comment)

You beat me to it :)

We documented that EnvVar should take precedence.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=aspnetcore#connection-string

I just added more tests for this scenario

@rajkumar-rangaraj
Copy link
Contributor

Please review - #34660 (comment)

You beat me to it :)

We documented that EnvVar should take precedence. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=aspnetcore#connection-string

I just added more tests for this scenario

There is no guarantee that Environment Variables are part of IConfiguration, please review the feedback in previous feedback.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@TimothyMothra TimothyMothra enabled auto-merge (squash) August 8, 2023 21:09
@TimothyMothra TimothyMothra merged commit 3ac5b2b into main Aug 8, 2023
@TimothyMothra TimothyMothra deleted the tilee/iconfig branch August 8, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Monitor - Distro Monitor OpenTelemetry Distro
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants