Skip to content

(feat): Make thread names identifiable.#1395

Merged
azabbasi merged 11 commits intomainfrom
azabbasi/identifyalbeThreads
Nov 4, 2021
Merged

(feat): Make thread names identifiable.#1395
azabbasi merged 11 commits intomainfrom
azabbasi/identifyalbeThreads

Conversation

@azabbasi
Copy link
Copy Markdown
Contributor

Checklist

Reference/Link to the issue solved with this PR (if any)

Description of the problem

Description of the solution

private static class ReactorRunner implements Callable<Object>
{
private final static String THREAD_NAME = "azure-iot-sdk-ReactorRunner";
private final static String THREAD_FIXED_NAME = "azure-iot-sdk-ReactorRunner-";
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.

Please ignore the static field rename, it's for my own tracking purposes, will revert when the PR is ready for review.

@timtay-microsoft
Copy link
Copy Markdown
Member

timtay-microsoft commented Oct 18, 2021

As a user, I think I would like to have some say in what these threads are named. Maybe allow for a pattern like:

<user supplied string>-<SDK specific context>-<connection-id>

like

"multiplexedClient1234-IothubReactorRunner-<connection id guid>"

And if users don't provide a prefix here, we can just name the thread

"IothubReactorRunner-<connection id guid>"

That way, users can distinguish threads not only per connection, but per client/user defined context as well

What do you think @azabbasi ?

@azabbasi
Copy link
Copy Markdown
Contributor Author

As a user, I think I would like to have some say in what these threads are named. Maybe allow for a pattern like:

<user supplied string>-<SDK specific context>-<connection-id>

like

"multiplexedClient1234-IothubReactorRunner-<connection id guid>"

And if users don't provide a prefix here, we can just name the thread

"IothubReactorRunner-<connection id guid>"

That way, users can distinguish threads not only per connection, but per client/user defined context as well

What do you think @azabbasi ?

Interesting, so where do you envision getting that prefix input? when instantiating the client?

@azabbasi azabbasi force-pushed the azabbasi/identifyalbeThreads branch from 452a14b to 932b696 Compare November 1, 2021 22:46
Fix dependency AMQPS connection

Update AmqpsConnection.java

Some more fixes are in.

Update AmqpsConnection.java

Make adjustments.
@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 1, 2021

/azp run Java Prod

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 2, 2021

/azp run Java Prod

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 2, 2021

/azp run Java Prod

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@timtay-microsoft
Copy link
Copy Markdown
Member

Just a heads up for when you merge: it is "identifiable" not "identifyable"

@azabbasi azabbasi changed the title Azabbasi/identifyalbe threads Make thread names identifiable. Nov 2, 2021
@azabbasi azabbasi marked this pull request as ready for review November 2, 2021 23:12
@azabbasi azabbasi changed the title Make thread names identifiable. (feat): Make thread names identifiable. Nov 2, 2021
@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 3, 2021

/azp run Java Prod

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 3, 2021

/azp run SDL

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

azabbasi and others added 6 commits November 3, 2021 22:43
…dk/iot/service/transport/amqps/AmqpFileUploadNotificationReceive.java

Co-authored-by: timtay-microsoft <timtay@microsoft.com>
…/iot/device/transport/IotHubTransportTest.java

Co-authored-by: timtay-microsoft <timtay@microsoft.com>
…/iot/device/transport/IotHubTransport.java

Co-authored-by: timtay-microsoft <timtay@microsoft.com>
…/iot/device/transport/amqps/AmqpsIotHubConnection.java

Co-authored-by: timtay-microsoft <timtay@microsoft.com>
…amqp/AmqpsConnection.java

Co-authored-by: timtay-microsoft <timtay@microsoft.com>
@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 3, 2021

/azp run Java Prod, SDL

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@azabbasi
Copy link
Copy Markdown
Contributor Author

azabbasi commented Nov 3, 2021

/azp run Java Prod Basic, horton-java-gate

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@azabbasi azabbasi merged commit f5512f5 into main Nov 4, 2021
@azabbasi azabbasi deleted the azabbasi/identifyalbeThreads branch November 4, 2021 16:16
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