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

[AzureMonitorExporter] implementing Truncation rules for ExceptionDetails and StackFrame #29135

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

TimothyMothra
Copy link
Contributor

@TimothyMothra TimothyMothra commented Jun 6, 2022

Continuation of #29094

Changes

  • new class StringExtensions to hold Truncation() extension method.
  • new partial class StackFrame
    • custom ctor with truncation rules.
  • partial class TelemetryExceptionDetails
    • remove use of base ctor. Need to apply truncation rules to props in the base ctor, have to implement this in custom ctor.
    • remove public const int MaxParsedStackLength, use SchemaConstants instead.
    • moved helper methods to StackFrame class.
    • refactor method SanitizeStackFrame.
      • old: Tuple<List<TOutput>, bool> SanitizeStackFrame<TInput, TOutput>(IList<TInput> inputList, Func<TInput, int, TOutput> converter, Func<TOutput, int> lengthGetter)
      • new: List<StackFrame> GetSanitizedStackFrame(Exception exception, out bool hasFullStack)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@TimothyMothra TimothyMothra changed the title [AzureMonitorExporter] adding Truncation rules for ExceptionDetails and StackFrame [AzureMonitorExporter] implementing Truncation rules for ExceptionDetails and StackFrame Jun 6, 2022
…tions/Models/TelemetryExceptionDetails.cs

Co-authored-by: Vishwesh Bankwar <vishweshbankwar@users.noreply.github.com>
@TimothyMothra TimothyMothra enabled auto-merge (squash) June 7, 2022 16:40
auto-merge was automatically disabled June 7, 2022 20:05

Pull request was closed

@TimothyMothra TimothyMothra reopened this Jun 7, 2022
@TimothyMothra TimothyMothra merged commit 661af63 into main Jun 7, 2022
@TimothyMothra TimothyMothra deleted the tilee/truncation_ExceptionDetails_StackFrame branch June 7, 2022 20:06
@TimothyMothra TimothyMothra added the Monitor - Exporter Monitor OpenTelemetry Exporter label Jun 9, 2022
sarkar-rajarshi pushed a commit to sarkar-rajarshi/azure-sdk-for-net that referenced this pull request Jun 10, 2022
…ails and StackFrame (Azure#29135)

* initial commit

* cleanup

* Update sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Customizations/Models/TelemetryExceptionDetails.cs

Co-authored-by: Vishwesh Bankwar <vishweshbankwar@users.noreply.github.com>

Co-authored-by: Vishwesh Bankwar <vishweshbankwar@users.noreply.github.com>
zhihaoxue pushed a commit to zhihaoxue/azure-sdk-for-net that referenced this pull request Jul 27, 2022
…ails and StackFrame (Azure#29135)

* initial commit

* cleanup

* Update sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Customizations/Models/TelemetryExceptionDetails.cs

Co-authored-by: Vishwesh Bankwar <vishweshbankwar@users.noreply.github.com>

Co-authored-by: Vishwesh Bankwar <vishweshbankwar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Monitor - Exporter Monitor OpenTelemetry Exporter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants