-
Notifications
You must be signed in to change notification settings - Fork 273
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
Fix custom backend provider logging on Linux #1848
Conversation
If a custom durability provider uses its ETW event source before we instantiate the Linux logging architecture (like Netherite's ETW event for instantiating its orchestration service), then the OnEventSourceCreated method will call before our constructor finishes instantiating the event source name for the custom provider. This happens due to the ordering of constructor calls in .NET. To work around this, we temporarily store all event sources before our constructor establishes the durability provider event source name so that we can enable the correct provider when we do establish the provider name.
|
||
// Validate that the JSON has DurableTask-AzureStorage fields | ||
string[] lines = consoleOutput.Split('\n'); | ||
var azureStorageLogLines = lines.Where(l => l.Contains("DurableTask-CustomSource") && l.StartsWith(prefix)); |
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.
should change name of variable 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.
Thank you for this change! Seems like there are a few minor typos to address and I also left some comments.
Also, a question: Wouldn't it be possible to read the value for the durability provider from the app configuration itself inside of OnEventSourceCreated
?
Say, would it be possible to read it as an environment variable when this.durabilityProviderEventSourceName
is null
?
I think that would be a cleaner approach.
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.
LGTM so long as CI goes 🟢
If a custom durability provider uses its ETW event source before we
instantiate the Linux logging architecture (like Netherite's ETW event
for instantiating its orchestration service), then the
OnEventSourceCreated method will call before our constructor finishes
instantiating the event source name for the custom provider. This
happens due to the ordering of constructor calls in .NET.
To work around this, we temporarily store all event sources before our
constructor establishes the durability provider event source name so
that we can enable the correct provider when we do establish the provider name.
resolves #1796
Pull request checklist
pending_docs.md
release_notes.md