Enable SDK to create package for auto-instrumentation#2365
Enable SDK to create package for auto-instrumentation#2365rajkumar-rangaraj merged 12 commits intodevelopfrom
Conversation
…ights-dotnet into rajrang/redfield
...nInsights/Extensibility/Implementation/Tracing/DiagnosticsModule/DiagnosticsEventListener.cs
Outdated
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj
Outdated
Show resolved
Hide resolved
...ghts/Extensibility/Implementation/Tracing/FileDiagnosticsModule/TraceSourceForEventSource.cs
Show resolved
Hide resolved
WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs
Show resolved
Hide resolved
...rosoft.ApplicationInsights.Tests/Extensibility/Implementation/Tracing/CoreEventSourceTest.cs
Show resolved
Hide resolved
|
Note: Won't be able to support https://github.com/microsoft/ApplicationInsights-dotnet/pull/2185/files with this change |
We added a redfied sanity check in GitHub actions. This ensures builds are not broken with new changes. This is a temporary workaround until we resolve the DiagnosticSource versioning issue. We will remove these changes once the DiagnosticSource issue is resolved. |
| run: dotnet restore ./BASE/Microsoft.ApplicationInsights.sln | ||
|
|
||
| - name: Build | ||
| run: dotnet build -p:Redfield=True ./BASE/Microsoft.ApplicationInsights.sln --configuration Release --no-restore |
There was a problem hiding this comment.
only building Base sdk?
There was a problem hiding this comment.
Running our full test suite here will fail.
We have too many flaky tests and Github Actions does not have a mechanism for retries.
(I'm investigating this in #2345)
If we want to run more test projects here, we must filter those tests.
| { | ||
| try | ||
| { | ||
| #if REDFIELD |
There was a problem hiding this comment.
Can you open an issue to completely remove this class. it should not be required.
There was a problem hiding this comment.
Investigated a little and found methods from this class is called in several places.
For example Tryrun is called in OperationCorrelationTelemetryInitializer.cs.
Did I understand your comment incorrectly?
There was a problem hiding this comment.
yea all the places where this ActivityExtensions is used can be modified to directly use Activity API, instead of doing it via this class.
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.cs
Show resolved
Hide resolved
| /// <summary> | ||
| /// ETW EventSource tracing class. | ||
| /// </summary> | ||
| #if REDFIELD |
There was a problem hiding this comment.
for a separate PR , this file seems doing nothing and could be removed!
I think we can support PRs like the above, by doing it inside IF !REDFIELD check, as we'll have 5.0.0 of DS when not-redfield. |
Thanks @TimothyMothra for the PoC
To upgrade Application Insights SDK for .NET Core instrumentation following are the requirements and this PR propose the changes for it.
System.Diagnostics.DiagnosticSourcepackage reference to4.7.0from5.0.0.Changes
(Please provide a brief description of the changes here.)
REDFIELDwhich is used as preprocessor to decide the event source nameredfieldcompilation switch to build and generate package for auto-instrumentation