# MongoDB Query Tracing in .NET with Sentry + OTLP

DevFeed: [MongoDB Query Tracing in .NET with Sentry + OTLP](<https://devfeed.tech/articles/mongodb-query-tracing-in-net-with-sentry-otlp-24103.md>)

Original publisher: [Read original article](<https://blog.sentry.io/mongodb-query-tracing-dotnet-sentry/>)

Author: James Crosswell

Published: 2026-07-20T09:00:00Z

Content type: tutorial

Language: en

Sources: [Sentry Blog](<https://devfeed.tech/sources/sentry-blog.md>)

Topics: [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [OpenTelemetry](<https://devfeed.tech/topics/opentelemetry.md>), [tracing](<https://devfeed.tech/topics/tracing.md>), [.NET](<https://devfeed.tech/topics/net.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>), [SDK](<https://devfeed.tech/topics/sdk.md>)

Tags: [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [integration](<https://devfeed.tech/tags/integration.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [net](<https://devfeed.tech/tags/net.md>), [opentelemetry](<https://devfeed.tech/tags/opentelemetry.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [traces](<https://devfeed.tech/tags/traces.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

## AI overview

This tutorial demonstrates how to trace MongoDB queries in a .NET application by combining MongoDB's built-in OpenTelemetry instrumentation with Sentry's OTLP ingestion support in the .NET SDK. It explains how MongoDB spans and query data can flow into Sentry for performance analysis and correlation with errors and replays.

## Source excerpt

Trace MongoDB queries in .NET using OpenTelemetry and Sentry's OTLP ingestion. See spans, query data, and error correlation in Sentry.