microsoft / microsoft/aspire

Enrich existing Mongo client with telemetry instrumentation

Open
#10,685 4 comments 0 reactions 0 assignees View on GitHub
area-integrations
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.