-
Notifications
You must be signed in to change notification settings - Fork 273
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
Replace ITelemetryActivator with ITelemetryModule #3009
Conversation
This looks good to me overall. But is it possible to add some unit tests for the Also are all the failing builds of concern or transient? |
I'm working on adding unit tests for the The failing build includes some existing tests that are failing now because of the changes so I'm looking into that. I left a comment in the PR that explains the issue. |
[InlineData(false, true, true)] | ||
[InlineData(true, true, false)] | ||
[InlineData(true, true, true)] | ||
public void TelemetryClientSetup_AppInsights_Warnings(bool instrumentationKeyIsSet, bool connStringIsSet, bool extendedSessions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call deleting this. Not something durable should be enforcing - particularly with OTel coming along which will not always be app-insights backed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Please resolve Jacob's remaining feedback items plus the one that I added and then go ahead and merge.
This PR replaces
ITelemetryActivator
withITelemetryModule
so we can have more flexibility with configuration. For example, with this change we can set Managed Identity credentials instead of only setting Application Insights relevant settings.For context:
ITelemetryActivator
: Used to activate or create telemetry objects. It also initializes the telemetry client for distributed tracing, allowing settings to be verified and adjusted during initializationITelemetryModule
: Used to initialize and configure telemetry modules fromTelemetryConfiguration
. It ensures that telemetry modules are properly set up to collect and send data using the same configuration.Also, in this PR, we remove some log statements and checks. With
ITelemetryActivator
, we checked if the customer was providingAPPINSIGHTS_INSTRUMENTATIONKEY
and/orAPPLICATIONINSIGHTS_CONNECTION_STRING
and logged different warnings based on the configuration. WithITelemetryModule
, it automatically has the configuration in theTelemetryConfiguration
object, so we no longer need to check for these configurations.Resolves #2870
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs