-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add guid correlation support and change activity processing #169
Conversation
src/Extensions/Abstractions/Activities/Processing/ActivityResultStrings.cs
Outdated
Show resolved
Hide resolved
src/Extensions/Abstractions/Activities/Processing/ActivityResultStrings.cs
Outdated
Show resolved
Hide resolved
src/Extensions/Abstractions/Activities/Processing/ActivityTagKeys.cs
Outdated
Show resolved
Hide resolved
src/Extensions/Abstractions/Activities/TimedScopesExtensions.cs
Outdated
Show resolved
Hide resolved
src/Extensions/Logging/Internal/EventSource/ActivityEnhensementObserver.cs
Outdated
Show resolved
Hide resolved
…eys.cs Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
…ltStrings.cs Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
tests/Extensions/Abstractions.UnitTests/Activities/ActivityExtensionsTests.cs
Show resolved
Hide resolved
tests/Extensions/Abstractions.UnitTests/Activities/TimedScopeTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Hosting.Services.UnitTests/ServiceAccessorTests.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
…ests.cs Co-Authored-By: Vlad Ion <vlad.ion@gmail.com>
/// <remarks>This property would be transfered to child activity and via web requests</remarks> | ||
[Obsolete(TransactionIdObsoleteMessage, false)] | ||
public static Activity SetObsoleteTransactionId(this Activity activity, uint transactionId) => | ||
activity.AddBaggage(ObsoleteTransactionId, transactionId.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToString [](start = 60, length = 8)
Add CultureInfo.InvariantCulture
as a parameter to avoid differences in behaviour on different machines #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Out of curiosity does it actually does anything for int
? I'm not aware of different formats for it. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are differing number systems around the world, which this could potentially get converted into. See https://en.wikipedia.org/wiki/Numeral_system#/media/File:Numeral_Systems_of_the_World.svg
In reply to: 394708563 [](ancestors = 394708563)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was hoping we have a single standard at least in numbers :) thanks
src/Extensions/Logging/Internal/EventSource/ActivityEnhensementObserver.cs
Outdated
Show resolved
Hide resolved
The parameters here are replicated throughout and then passed directly down the hierarchy of methods as far as I can tell, which is typically considered a code smell. It would be preferable to create a property bag class and pass this around, to avoid all of the replication #Closed Refers to: src/Extensions/Logging/Internal/EventSource/OmexLogEventSource.cs:15 in 1f380b6. [](commit_id = 1f380b6, deletion_comment = False) |
src/Extensions/Logging/Internal/Replayable/ReplayableActivityStopObserver.cs
Outdated
Show resolved
Hide resolved
src/Extensions/Logging/Internal/Replayable/ReplayableActivityStopObserver.cs
Outdated
Show resolved
Hide resolved
@@ -19,6 +20,9 @@ public static class ServiceCollectionExtensions | |||
public static IServiceCollection AddTimedScopes(this IServiceCollection serviceCollection) | |||
{ | |||
Activity.DefaultIdFormat = ActivityIdFormat.W3C; | |||
serviceCollection.AddHostedService<ActivityObserversIntializer>(); | |||
serviceCollection.TryAddEnumerable(ServiceDescriptor.Transient<IActivityStopObserver, ActivityStopObserver>()); | |||
|
|||
serviceCollection.TryAddTransient<IActivityProvider, SimpleActivityProvider>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for the line break? In my mind, it's indicating some difference but I'm not seeing one here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added it to split enumerable registration (hosted is also a special case of enumerable) from Transient, but I don't have a strong opinion and okay removing it if you insisting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to add a comment clarifying this for future readers
In reply to: 394724148 [](ancestors = 394724148)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sure that it worth a comment, it's like splitting different blocks in method, if blank line creates confusion we can just remove it
src/Extensions/TimedScopes/Internal/ActivityObserversIntializer.cs
Outdated
Show resolved
Hide resolved
src/Extensions/TimedScopes/Internal/ActivityObserversIntializer.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Abstractions.UnitTests/Activities/ActivityExtensionsTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Abstractions.UnitTests/Activities/TimedScopeTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Hosting.Services.UnitTests/OmexHostedServiceTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Hosting.Services.UnitTests/OmexHostedServiceTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/Hosting.Services.UnitTests/ServiceAccessorTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/TimedScopes.UnitTests/ActivityObserversIntializerTests.cs
Outdated
Show resolved
Hide resolved
tests/Extensions/TimedScopes.UnitTests/ActivityObserversIntializerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
tests/Extensions/TimedScopes.UnitTests/ActivityObserversIntializerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Activty
processing into extensible activity observres