Skip to content

NetCore remove TC.Active and fix NetCore Heartbeat #1886

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

Merged
merged 79 commits into from
Jul 7, 2020

Conversation

TimothyMothra
Copy link

@TimothyMothra TimothyMothra commented Jun 2, 2020

#1953, #1954

NetCore had a dependency on TelemetryConfiguration.Active to support DiagnosticTelemetryModule and Heartbeats.
This change removes that dependency and introduces a feature flag to support TelemetryConfiguration.Active.

Changes

  • remove TelemetryConfiguration.Active
  • remove TelemetryModules.Instance
  • Refactoring Heartbeats for NetCore scenarios previously dependent on TC.Active

Checklist

  • I ran Unit Tests locally.
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public surface reviewed

The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.

Notes for authors:

  • FxCop and other analyzers will fail the build. To see these errors yourself, compile localy using the Release configuration.

Notes for reviewers:

  • We support comment build triggers
    • /AzurePipelines run will queue all builds
    • /AzurePipelines run <pipeline-name> will queue a specific build

@cijothomas
Copy link
Contributor

Lets try to do this in steps
1st remove .Active (with a config option to enable it for some customers who use it)
Add all modules including DiagModule via DI.
Fix heartbeat modules like AppServiceMetadata, AzureMetadata etc.

@TimothyMothra
Copy link
Author

@cijothomas i don't think that will work because I think these things are too tightly coupled. Please respond if I'm misunderstanding...

  • First, supporting both .Active and not would be some additional work that I don't know if it's worth the effort.
  • Second, I can't support the "not .Active" config without first fixing the DiagModule and Heartbeat Modules.
  • Lastly, after I've fixed all the modules, I don't think there's any value in continuing to support .Active.

@cijothomas
Copy link
Contributor

@cijothomas i don't think that will work because I think these things are too tightly coupled. Please respond if I'm misunderstanding...

  • First, supporting both .Active and not would be some additional work that I don't know if it's worth the effort.
  • Second, I can't support the "not .Active" config without first fixing the DiagModule and Heartbeat Modules.
  • Lastly, after I've fixed all the modules, I don't think there's any value in continuing to support .Active.

If there are users somehow tied to use .Active, then we want to have a way to support them. For majority of cases, we can ask to switch to DI model, but there are cases like some logging adapters for which there is no better alternate than TC.Active.

@TimothyMothra TimothyMothra marked this pull request as ready for review July 2, 2020 20:34
@TimothyMothra TimothyMothra changed the title NetCore remove TC.Active NetCore remove TC.Active and fix NetCore Heartbeat Jul 2, 2020
@TimothyMothra TimothyMothra requested a review from cijothomas July 6, 2020 17:53
Copy link
Contributor

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Looks good. Couple of small issues added in comment.
Also a good description of the change as a Github issue for customers.

@TimothyMothra TimothyMothra requested a review from cijothomas July 6, 2020 23:21
@TimothyMothra TimothyMothra requested a review from cijothomas July 7, 2020 00:26
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.

3 participants