-
Notifications
You must be signed in to change notification settings - Fork 773
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
Rename ConfigureResource -> ConfigureResourceBuilder #3411
Rename ConfigureResource -> ConfigureResourceBuilder #3411
Conversation
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Codecov Report
@@ Coverage Diff @@
## main #3411 +/- ##
==========================================
- Coverage 86.21% 86.05% -0.16%
==========================================
Files 261 261
Lines 9411 9411
==========================================
- Hits 8114 8099 -15
- Misses 1297 1312 +15
|
…:alanwest/opentelemetry-dotnet into alanwest/rename-configureresourcebuilder
|
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.
I like this name better. Lets wait couple days to give more people to share feedbacks before merge.
@@ -39,7 +39,7 @@ private static object RunWithActivitySource() | |||
// and use Console exporter. | |||
using var tracerProvider = Sdk.CreateTracerProviderBuilder() | |||
.AddSource("Samples.SampleClient", "Samples.SampleServer") | |||
.ConfigureResource(res => res.AddService("console-test")) | |||
.ConfigureResourceBuilder(res => res.AddService("console-test")) |
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.
It seems the current code are bit random on the local variable naming.
Maybe use resourceBuilder
or resBldr
consistently across the repo?
I liked the old/current name a bit more. Just as in ASP.NET one uses ConfigureServices, not ConfigureServiceCollection. Or this method here, another example where one uses a Builder to configure something but which doesn't have Builder in the name: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.testing.webapplicationfactory-1.configurewebhost?view=aspnetcore-6.0 I could argue, I don't want to configure the builder, but use the builder to configure the resource(s) that will be created. But I do not have a very strong opinion. |
I agree, these are good examples and a good argument for keeping the name as is: |
Thanks for explanation. It looks reasonable to me to keep existing name, and abort this PR. |
Staging this up based on open question here #3307 (comment).