Skip to content

Add guid correlation support and change activity processing - #169

Merged
Andrii Tretiak (AndreyTretyak) merged 14 commits into
masterfrom
feature/correlation-guid-support
Mar 19, 2020
Merged

Andrii Tretiak (AndreyTretyak) merged 14 commits into
masterfrom
feature/correlation-guid-support

Conversation

@AndreyTretyak

@AndreyTretyak Andrii Tretiak (AndreyTretyak) commented Mar 17, 2020 •

Copy link
Copy Markdown
Contributor
  • Move all Activty processing into extensible activity observres
  • Add logic for supporting guid correlation id
  • Change activity API to correspond to future activity changes Improvements to the System.Diagnostics.Activity APIs dotnet/designs#98
  • Switch to using BacgroungService for Omex SF services to reduce the amount of custom code
  • Now all core for using activities inside Abstraction package, add TimedScopes package needed only to log activities

/// <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());

@muiriswoulfe Muiris Woulfe (muiriswoulfe) Mar 18, 2020 •

Copy link
Copy Markdown
Member

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

@AndreyTretyak Andrii Tretiak (AndreyTretyak) Mar 19, 2020 •

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
Contributor Author

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

@muiriswoulfe

Muiris Woulfe (muiriswoulfe) commented Mar 18, 2020 •

Copy link
Copy Markdown
Member
  	string applicationName,

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)

serviceCollection.AddHostedService<ActivityObserversIntializer>();
serviceCollection.TryAddEnumerable(ServiceDescriptor.Transient<IActivityStopObserver, ActivityStopObserver>());

serviceCollection.TryAddTransient<IActivityProvider, SimpleActivityProvider>();

Copy link
Copy Markdown
Member

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

@AndreyTretyak Andrii Tretiak (AndreyTretyak) Mar 19, 2020 •

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🕐

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

@AndreyTretyak
Andrii Tretiak (AndreyTretyak) deleted the feature/correlation-guid-support branch March 19, 2020 11:36
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.

Investigate and fix possible breaking changes in Extension projects

3 participants