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

Fixed usage of null WorkflowStep.Name in WorkflowActivity diagnostic service. #1198

Merged

Conversation

jakenuts
Copy link
Contributor

@jakenuts jakenuts commented Aug 6, 2023

Describe the change
In WorkflowActivity.Enrich(WorkflowStep workflowStep) there was a check for a null or empty WorkflowStep.Name and "inline" was used in it's place in the activity display name. A line immediately after referenced WorkflowStep.Name without that check and causes a NullReferenceException if System.Diagnostics.ActivitySource & System.Diagnostics.Activity are used by the host or workflow implementation.

Describe your implementation or design

Replaced workflowStep.Name with stepName defined several lines above which either contains the name or "inline" for unnamed steps (Sagas, Snline, etc).

Tests
Did you cover your changes with tests? No.

Breaking change
Do you changes break compatibility with previous versions? No.

Additional context
As far as I can tell usage of ActivitySource and related services like OpenTelemetry are not possible while this bug remains.

@jakenuts jakenuts force-pushed the fix-nullref-in-workflow-activity branch from f8e0e2b to 2355322 Compare August 6, 2023 22:14
@jakenuts
Copy link
Contributor Author

jakenuts commented Aug 6, 2023

Added additional nullable check for Body.Type.Name as that also is possibly null (End() step)

@danielgerlag danielgerlag merged commit b8c9e2c into danielgerlag:master Nov 8, 2023
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