[LiveMetrics] add LogProcessor, refactor DocumentHelper, update tests#43081
Merged
TimothyMothra merged 9 commits intomainfrom Apr 17, 2024
Merged
[LiveMetrics] add LogProcessor, refactor DocumentHelper, update tests#43081TimothyMothra merged 9 commits intomainfrom
TimothyMothra merged 9 commits intomainfrom
Conversation
...nitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Internals/DataCollection/DocumentHelper.cs
Show resolved
Hide resolved
...nitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Internals/DataCollection/DocumentHelper.cs
Show resolved
Hide resolved
added 6 commits
April 10, 2024 13:11
…com/Azure/azure-sdk-for-net into tilee/livemetrics_refactor_document
| var activitySourceName = $"activitySourceName{uniqueTestId}"; | ||
| using var activitySource = new ActivitySource(activitySourceName); | ||
| // TODO: Replace this ActivityListener with an OpenTelemetry provider. | ||
| var listener = new ActivityListener |
Contributor
There was a problem hiding this comment.
@TimothyMothra - Why not just use the SDK here?
Member
There was a problem hiding this comment.
Other tests in the live metrics follow the same pattern. As a follow up in later PRs this could be modified to use SDK to keep it simple.
Author
There was a problem hiding this comment.
Do you mean OTel/InMemoryExporter?
That introduces additional overhead. This test needs only an Activity to test the DocumentHelper conversion methods.
Member
There was a problem hiding this comment.
he meant Sdk.CreateTracerProvider() instead of creating a listener.
Contributor
There was a problem hiding this comment.
This listener is listening to everything, that could be problematic. We should dispose it as well.
rajkumar-rangaraj
approved these changes
Apr 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors how we translate models to Documents for LiveMetrics.
This includes a bug fix, for how ActivityEvents were converted to Exceptions.
This PR also includes some helper methods that will be used in my next PR to add full support for Logs.
Changes
LiveMetricsLogProcessorNo change to the public api, this is intentionally internal only.
LiveMetricsActivityProcessorDocumentHelper.DocumentHelperLiveMetricsActivityProcessor. This is important because the LogProcessor will need to share some of these methods.