Enrich existing Mongo client with telemetry instrumentation
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
Hi,
Currently, in [Aspire.Npgsql.EntityFrameworkCore.PostgreSQL](https://github.com/dotnet/aspire/blob/main/src/Components/Aspire.Npgsql.EntityFrameworkCore.PostgreSQL) we have the capability of using existing DBContext and just enrich it with telemetry data with [`EnrichNpgsqlDbContext`](https://github.com/dotnet/aspire/blob/main/src/Components/Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/AspireEFPostgreSqlExtensions.cs#L107).
It is very better we have the same flexibility for [Aspire.MongoDB.Driver](https://github.com/dotnet/aspire/blob/main/src/Components/Aspire.MongoDB.Driver) and just add telemetry data with a `EnrichMongoClient` method and using exisitng MongoClient and MongoDatabase.
If it is acceptable, I can create a Pull Request for it.
Contributor guide
Assessment
This issue has not been assessed yet.