Add Aspire metadata to MongoClient#6938
Conversation
eerhardt
left a comment
There was a problem hiding this comment.
Thanks for the contribution, @adelinowona!
I just had one simple comment. Once that is addressed, I think this can be merged.
| clientSettings.LoggingSettings ??= new LoggingSettings(serviceProvider.GetService<ILoggerFactory>()); | ||
|
|
||
| var aspireVersion = typeof(MongoDBSettings).Assembly.GetName().Version?.ToString(); | ||
| clientSettings.LibraryInfo = new LibraryInfo("aspire", aspireVersion); |
There was a problem hiding this comment.
Can you move this up to line 188, right after the clientSettings gets created?
The reasoning is that the app developer should be able to set this LibraryInfo in their configureClientSettings callback. Doing it here will overwrite anything the app developer tries configuring.
There was a problem hiding this comment.
Thanks @eerhardt for raising this, we still want to record the aspire info so I have updated the code to append it if the user has already set the LibraryInfo.
|
@eerhardt, @sebastienros, @radical anyone has a chance to review this PR? |
eerhardt
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution!
Description
MongoDB drivers are used in various flavors and languages. Making sure we exercise our due diligence in identifying the "origin" of the library calls makes it best to understand how our Atlas servers get accessed.
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):doc-ideatemplate):Microsoft Reviewers: Open in CodeFlow