Skip to content

[WIP] self-diagnostics#1724

Closed
TimothyMothra wants to merge 82 commits intodevelopfrom
tilee/config_diagnostics
Closed

[WIP] self-diagnostics#1724
TimothyMothra wants to merge 82 commits intodevelopfrom
tilee/config_diagnostics

Conversation

@TimothyMothra
Copy link
Copy Markdown

@TimothyMothra TimothyMothra commented Mar 10, 2020

#1981

Changes

  • Customers can enable file logging via environment variable.
  • New class SelfDiagnosticsProvider to interpret config string.
  • Migrate file logging functionality from FileDiagnosticsTelemetryModule into DiagnosticsTelemetryModule

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

@TimothyMothra TimothyMothra marked this pull request as ready for review March 17, 2020 17:31
@TimothyMothra TimothyMothra changed the title [WIP] self-diagnostics self-diagnostics Mar 17, 2020
Copy link
Copy Markdown
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.

Did a quick review and left comments. I think more commits are pending to this?

/// <summary>
/// This class encapsulates parsing and interpreting the self diagnostics configuration string.
/// </summary>
internal class SelfDiagnosticsProvider
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the name "Provider" does not sound correct.

this.Senders.Add(new PortalDiagnosticsQueueSender());

this.FileDiagnosticsSender = new FileDiagnosticsSender();
this.Senders.Add(this.FileDiagnosticsSender);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we are likely missing logs before initialization. Probably need similar approach as portalqueue to keep them in memory until a config is available.

private readonly DefaultTraceListener defaultTraceListener = new DefaultTraceListener();

private string logDirectory = Environment.ExpandEnvironmentVariables("%TEMP%");
private bool isEnabled = false; // TODO: NEED MORE PERFORMANT FILE WRITTER BEFORE ENABLING THIS BY DEFAULT
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

turning this on/off and what the default value should be - i think this should be the resposibility of DiagnosticmModule.

@TimothyMothra TimothyMothra marked this pull request as draft August 20, 2020 21:01
@TimothyMothra TimothyMothra removed this from the 2.15 milestone Sep 1, 2020
@TimothyMothra TimothyMothra removed the P1 label Sep 4, 2020
@TimothyMothra TimothyMothra changed the title self-diagnostics [WIP] self-diagnostics Sep 15, 2020
@TimothyMothra TimothyMothra deleted the tilee/config_diagnostics branch June 3, 2021 18:46
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.

2 participants