Neon is expanding into a backend: Object Storage, Functions, and AI Gateway now in beta

How to send Postgres logs and metrics from Neon to SigNoz

Using the OpenTelemetry (OTEL) integration in Neon

SigNoz is an open source observability platform built on OpenTelemetry that brings logs, metrics, and traces together in one application. Neon's OpenTelemetry integration sends your project's metrics and Postgres logs to SigNoz, so you can monitor your database alongside the rest of your stack.

This guide walks you through setting up the integration. You'll learn how to:

  • Find the ingestion key and OTLP endpoint for your SigNoz Cloud account.
  • Set up the OpenTelemetry integration in your Neon project.
  • Verify that your Neon metrics and logs are flowing into SigNoz.
  • Build a dashboard in SigNoz to visualize your Neon metrics.

By the end, you'll have Neon metrics and logs flowing into a SigNoz dashboard.

Prerequisites

Before you begin, ensure you have the following:

  • Neon account and project: If you don't have one, sign up at Neon. Your Neon project must be on the Scale or Business plan to use the OpenTelemetry integration.
  • SigNoz account: A SigNoz Cloud account. A free trial is sufficient to start. This guide uses SigNoz Cloud; if you run a self-hosted SigNoz instance, the steps are the same except that you point Neon at your own collector endpoint.
  1. Get your SigNoz ingestion key and endpoint

    You need credentials that authorize Neon to send OpenTelemetry data to your SigNoz Cloud instance.

    1. Log in to your SigNoz Cloud account.

    2. Navigate to Settings > Ingestion Settings.

    3. Copy your Ingestion Key. Neon sends this value with every request to authenticate your data.

    4. Note your region. SigNoz Cloud is available in multiple regions, and your OTLP endpoint depends on it:

      RegionEndpoint
      UShttps://ingest.us.signoz.cloud
      EUhttps://ingest.eu.signoz.cloud
      Indiahttps://ingest.in.signoz.cloud

      Your region and endpoint are shown on the Ingestion Settings page. For more details, see the SigNoz ingestion overview.

      Keep the Ingestion Key and the OTLP endpoint URL for your region handy. You will need them in the next step to configure Neon.

  2. Configure the Neon OpenTelemetry integration

    Use the credentials from SigNoz to configure the integration in your Neon project.

    1. Navigate to the Neon Console and select your project.

    2. From the sidebar, go to the Integrations page.

    3. Find the OpenTelemetry card and click Add.

      Neon Integrations page with OpenTelemetry card

    4. A sidebar form opens. Choose the telemetry you want to export. Check both Metrics and Postgres logs to send all available data.

      Selecting metrics and Postgres logs to export from Neon

    5. Next, fill in the destination details using the credentials you gathered from SigNoz:

      • Connection: Select HTTP.
      • Endpoint: Paste the OTLP endpoint URL for your SigNoz region, for example https://ingest.us.signoz.cloud.

        important

        Enter only the base endpoint URL. Neon automatically appends the signal-specific paths (/v1/metrics and /v1/logs), so do not add them yourself or you will get 404 errors.

      • Authentication: Select API Key.
      • Header name: Enter signoz-ingestion-key.
      • API Key: Paste the Ingestion Key you copied from SigNoz.
      • Resource attributes: Add a service.name attribute to identify your data source in SigNoz. For example, set the key to service.name and the value to neon.
      • Click Save.

      Data scope

      The Neon OpenTelemetry integration sends data for all computes in your Neon project. For example, if you have multiple branches, each with an attached compute, metrics and logs will be collected and sent for each one.

      Configuring the Neon OpenTelemetry integration with SigNoz credentials

    6. Once saved, the OpenTelemetry integration appears as active on your project's Integrations page.

      Neon Integrations page showing the active OpenTelemetry integration

      The integration is now active and will begin sending data from your Neon project's computes to SigNoz.

  3. Verify the data flow in SigNoz

    To confirm that your integration is working, check that both logs and metrics are arriving in SigNoz.

    1. Go to your SigNoz instance and open the Logs > Logs Explorer.

    2. Filter by the resource attribute you set earlier, for example service.name = neon.

      You should see Postgres logs from your Neon compute streaming into SigNoz. This confirms that the integration is working correctly.

      Neon Postgres logs in the SigNoz Logs Explorer

      note

      It may take a few minutes for the first logs and metrics to appear after you enable the integration.

    3. To confirm metrics are arriving, open Metrics > Metrics Explorer and search for metrics prefixed with neon_, such as neon_connection_counts.

      Neon metrics in the SigNoz Metrics Explorer

      Compute activity

      Neon computes only send logs and metrics when they are active. If you have the Scale to Zero feature enabled and a compute is suspended due to inactivity, no telemetry data will be sent. If you notice gaps in your data, check your compute's status on the Branches page in the Neon console.

  4. Visualize Neon metrics with dashboards

    The Metrics Explorer works for ad-hoc queries. To track trends over time and see an overview of your database's health, build a SigNoz dashboard.

    Create a custom Neon dashboard

    1. From the left navigation menu in SigNoz, select Dashboards.
    2. Click New Dashboard > Create dashboard.
    3. Give your dashboard a descriptive name, such as Neon Project Metrics.

    Create your first panel

    1. On your new dashboard, click New Panel and choose the Time Series panel type.
    2. In the Query Builder, set the metric to neon_connection_counts to visualize the number of active and idle connections to your database over time.
    3. Adjust the aggregation and grouping as needed, then save the panel to your dashboard.

    Explore available Neon metrics

    Neon exports a range of metrics for your dashboards, including Neon-specific metrics and compute host metrics. For example:

    • neon_connection_counts: Monitor the number of active and idle database connections.
    • neon_db_total_size: Track the total size of all databases in your project, in bytes.
    • host_cpu_seconds_total: Track the CPU seconds accumulated in different operating modes (user, system, idle, etc.).
    • host_memory_active_bytes: Monitor active memory usage on the compute.

    For a comprehensive list of all metrics you can use in your dashboards, see the Neon Metrics and Logs Reference.

With Neon's database metrics and logs flowing into SigNoz alongside your application telemetry, you can correlate database behavior with the rest of your stack. For instance, you can line up a spike in neon_connection_counts against error logs from a specific service to quickly identify which application is putting pressure on your database.

Summary

You've configured Neon to send metrics and Postgres logs to SigNoz using the OpenTelemetry integration. Your database's metrics and logs now arrive in SigNoz alongside the rest of your application telemetry.

From here, you can build dashboards, set up alerts, and correlate database behavior with the rest of your stack.

Resources

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.

Was this page helpful?
Edit on GitHub