> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bronto.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB Atlas logs and metrics with OpenTelemetry

> Send MongoDB Atlas database logs and metrics straight to Bronto with Atlas's built-in OpenTelemetry Log Export and OTel Metrics integrations. No Collector required.

MongoDB Atlas can push logs and metrics to Bronto's OTLP endpoint itself, with no Collector on your side. Both integrations are under **Project Settings → Integrations** in Atlas. This page lists the Bronto values to enter. For the full Atlas steps, see MongoDB's guides to [OpenTelemetry Log Export](https://www.mongodb.com/docs/atlas/export-logs-otel/) and [OpenTelemetry Metrics](https://www.mongodb.com/docs/atlas/tutorial/otel-integration/).

For self-hosted MongoDB, see [MongoDB logs and metrics with OpenTelemetry](https://docs.bronto.io/integrations/mongodb.md).

## Prerequisites

* A dedicated Atlas cluster (M10 or larger). Atlas Infinite clusters don't support log export.
* A Bronto API key with at least the **Ingestion** role ([how to create one](https://docs.bronto.io/Account-Management/API-Keys.md#create-a-new-api-key))
* Your Bronto region, `eu` or `us` (see [Endpoints](https://docs.bronto.io/agent-setup/open-telemetry.md#endpoints))

## Send metrics

In **OpenTelemetry (OTel) Metrics**, add a configuration with these values:

| Field | Value |
| - | - |
| Provider | **Custom** |
| OTLP Endpoint | `https://ingestion.<REGION>.bronto.io/v1/metrics` |
| Authentication | **Header**: `x-bronto-api-key` = `<BRONTO_API_KEY>` |
| Aggregation Temporality | **DELTA** (recommended) |
| Select Metrics to Send | **MongoDB Metrics** and **Hardware Metrics**. Add others as needed. |

![Atlas OpenTelemetry Metrics form with Provider Custom, the Bronto metrics endpoint, an x-bronto-api-key header, DELTA temporality, and Hardware Metrics and MongoDB Metrics selected](https://mintcdn.com/bronto/rb8jr-2abgjIBxgd/images/integrations/assets/images/atlas-otel-metrics-form.png?fit=max\&auto=format\&n=rb8jr-2abgjIBxgd\&q=85\&s=4a4936d412eab58c82ba866cb104c706)

About 480 `mongodb.*` metrics appear in the [Metric Explorer](https://docs.bronto.io/metrics/explore-metrics.md), for example `mongodb.derived.server_status.op_latencies.*`, `mongodb.derived.replstatus.lag_milliseconds`, and `mongodb.conn_pool_stats.*`.

## Send logs

In **OpenTelemetry Log Export**, add a configuration with these values:

| Field | Value |
| - | - |
| OTLP Endpoint | `https://ingestion.<REGION>.bronto.io/v1/logs` |
| OTLP Headers | `x-bronto-api-key` = `<BRONTO_API_KEY>`. Optionally add `x-bronto-dataset` and `x-bronto-collection` ([header reference](https://docs.bronto.io/agent-setup/open-telemetry.md#endpoints)). |
| Log Type | **Mongod**. Mongos and audit logs are also available. |

![Atlas OpenTelemetry Log Export form with the Bronto logs endpoint, x-bronto-api-key, x-bronto-dataset, and x-bronto-collection headers, and log type Mongod](https://mintcdn.com/bronto/rb8jr-2abgjIBxgd/images/integrations/assets/images/atlas-otel-log-export-form.png?fit=max\&auto=format\&n=rb8jr-2abgjIBxgd\&q=85\&s=a961fe707af6c3de9a8afc849c4e49cc)

Without the optional headers, logs land in the `mongodb-atlas` dataset, `default` collection. Bronto parses each mongod JSON line into fields such as `msg`, `c`, `s`, `ctx`, and `attr.*` (`attr.ns`, `attr.planSummary`, `attr.durationMillis`). The resource attributes `cluster.name`, `host.name`, and `log_type` identify the source.

## Search examples

| Find | Filter |
| - | - |
| Slow queries | `"msg" = 'Slow query'` |
| Collection scans | `"attr.planSummary" = 'COLLSCAN'` |
| Slower than 1 second | `"attr.durationMillis" > 1000` |
| Warnings and errors | `"s" IN ('W', 'E', 'F')` |

See [Search syntax](https://docs.bronto.io/query-syntax/search-syntax.md) for more.

## Troubleshooting

If logs or metrics don't arrive, contact [Bronto Support](mailto:support@bronto.io).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.