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

[MOB-21202]Add extension name to operation orderer tag for debugging #1051

Merged

Conversation

cdhoffmann
Copy link
Contributor

When looking at the crash reports for the ticket, i noticed that every operation orderer we create in our extension containers is anonymous. This will name each one with the extension name to help with debugging.

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@cdhoffmann cdhoffmann requested a review from praveek June 21, 2024 17:36
@@ -61,7 +61,7 @@ class ExtensionContainer {
init(_ name: String, _ type: Extension.Type, _ queue: DispatchQueue, completion: @escaping (EventHubError?) -> Void) {
extensionQueue = queue
containerQueue = DispatchQueue(label: "\(name).containerQueue")
eventOrderer = OperationOrderer<Event>()
eventOrderer = OperationOrderer<Event>(String(describing: type))
Copy link
Contributor

@praveek praveek Jun 21, 2024

Choose a reason for hiding this comment

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

Can you use "(name).operationOrderer"

Copy link
Contributor Author

@cdhoffmann cdhoffmann Jun 21, 2024

Choose a reason for hiding this comment

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

I tested that:
name = "com.adobe.eventhub.extension.AEPCore.Configuration"
String(describing: type) = "Configuration"

I'm ok with either, but thought just having the name of the extension only would be cleaner.

Copy link
Contributor

@praveek praveek Jun 21, 2024

Choose a reason for hiding this comment

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

For the sake of consistency with the previous line, we can reuse the name variable. If we decide to change, we need to use a consistent name for extensionQueue, containerQueue, and operationOrderer, preferably with a com.adobe prefix..

@cdhoffmann cdhoffmann merged commit b553cc8 into adobe:dev-5.2.0 Jun 21, 2024
15 of 17 checks passed
@cdhoffmann cdhoffmann deleted the addExtensionNameToOperationOrdererTag branch June 21, 2024 18:42
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.

2 participants