You can use this document to resolve common issues with Application Monitoring, such as
missing metrics, logs, golden signals, alerts, or topology map edges, and
problems with saving dashboards or selecting resources.

## Known issues

This section lists known issues related to Application Monitoring:

- For the following resources, the topology map only displays edges when the
  corresponding service or workload has an
  [App Hub registration status of `discovered`](https://docs.cloud.google.com/app-hub/docs/overview#registration-status):

  - Firestore resources
  - Spanner resources
  - Cloud Storage resources
  - Google Cloud MCP servers

  A service or workload has a registration status of `discovered` when
  it is part of the application management boundary but isn't
  registered to any application.

## Troubleshoot

This section describes how to resolve issues related to Application Monitoring.

### You are told to create an application

You open the **Application monitoring** page in the Google Cloud console and
see the message "Create an Application to get started". You don't expect
to see this message because you've registered an
[App Hub application](https://docs.cloud.google.com/app-hub/docs/overview).

To resolve this failure, ensure that the resource picker is set to
your App Hub host project or management project.

### Your application doesn't show data for some golden signals

There are several reasons why you won't see a value for a
[golden signal](https://docs.cloud.google.com/monitoring/docs/application-monitoring#golden-signal):

- The infrastructure doesn't support the metric type. For example,
  Network Load Balancers don't support system metrics. For more information,
  see [Application Monitoring supported services and workloads](https://docs.cloud.google.com/monitoring/docs/application-monitoring-services).

- The metric type is supported, but there isn't any data available. For
  example, if the time range is set for an interval when no metric data was
  collected, then there isn't data to display for the golden signals.

For a list of resources that generate App Hub labels, see
[Application Monitoring supported services and workloads](https://docs.cloud.google.com/monitoring/docs/application-monitoring-services).

### Your application's metric data is missing or incomplete

You view a chart for a service or workload, and this chart either doesn't show
any metric data or some data is missing.

You might not need to do anything. The charts added to the predefined dashboard
for a service or workload are selected based on the resources used by
that service or workload. However, some resources might not generate data
for a specific metric type.
For a list of resources that generate App Hub labels, see
[Application Monitoring supported services and workloads](https://docs.cloud.google.com/monitoring/docs/application-monitoring-services).

If the metric data is incomplete, then do the following:

1. Make sure that the project picker is set to
   your App Hub host project or management project.

2. If you are using an App Hub host project, then make sure that
   the organization administrator has configured the metrics scope.
   For management projects, the metrics scope is automatically
   configured. For more information, see
   [Set up Application Monitoring](https://docs.cloud.google.com/monitoring/docs/setup-application-monitoring).

### Your application's log data is missing or incomplete

The logs panel on a dashboard doesn't show any log entries or it doesn't show
all log entries that are generated by your application.

To resolve this failure, do the following:

1.

   To get the permissions that
   you need to view log data,

   ask your administrator to grant you the
   following IAM roles:

   - [Logs Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/logging#logging.viewer) (`roles/logging.viewer`) on your App Hub host project or management project and any other projects listed in its default log scope. This role grants access to most log entries in the `_Default` log bucket. For more information, see [Logging roles](https://docs.cloud.google.com/logging/docs/access-control#considerations).
   - [Logs View Accessor](https://docs.cloud.google.com/iam/docs/roles-permissions/logging#logging.viewAccessor) (`roles/logging.viewAccessor`) on the log views listed in the default log scope of your App Hub host project or management project. To learn more about granting access to a log view, see [Control access to a log view](https://docs.cloud.google.com/logging/docs/logs-views#about-iam-policies).


2. Make sure that the organization administrator has configured the
   default log scope of your App Hub host project or management project
   to list the resources that store your application's log data.
   For more information, see
   [Set up Application Monitoring](https://docs.cloud.google.com/monitoring/docs/setup-application-monitoring).

### Your alerting policies are missing

For registered services and workloads, dashboards and the topology map show
alerts only when the corresponding alerting policy contains
application-specific labels. These are labels you add to the policy.
For discovered services and workloads, the topology map shows alerts
by filtering resource labels.

To associate an alerting policy with a workload or service by using
the Google Cloud console, do the following:

1. In the Google Cloud console, go to the
   **Alerting** page:

   [Go to **Alerting**](https://console.cloud.google.com/monitoring/alerting)

   <br />

   If you use the search bar to find this page, then select the result whose subheading is
   **Monitoring**.
2. In the toolbar of the Google Cloud console, select your App Hub host project or management project.
3. Find the alerting policy, click **View more** , select **Edit** , and then go to the **Notifications and name** section.
4. In the **Application labels** section, select your application and
   then select your service or workload:

   ![Alerting policy page displaying how to associate an alerting policy with App Hub labels.](https://docs.cloud.google.com/static/monitoring/images/app-hub-alerting.png)
5. Click **Save policy**.

After you complete these steps, labels with the following keys are attached to
your alerting policy. These labels identify your application and your service or
workload:

- `apphub_application_location`
- `apphub_application_id`
- `apphub_service_id` or `apphub_workload_id`

You can also add user labels to an alerting policy by using the
Google Cloud CLI, Terraform, or the Cloud Monitoring API.
However, you must use the label keys shown in the previous example.
For more information, see the following:

- [Manage alerting policies by API](https://docs.cloud.google.com/monitoring/alerts/using-alerting-api#api-update-policy).
- [Manage alerting policies with Terraform](https://docs.cloud.google.com/monitoring/alerts/manage-alerts-terraform).

### You've added application labels to your alerting policy, but the policy isn't listed

To resolve this failure, verify that the policy includes the following labels:

- `apphub_application_location`
- `apphub_application_id`
- `apphub_service_id` or `apphub_workload_id`

### The dashboards for your services and workloads differ

There is no action to take.

The resources used by a service or workload determine what data is displayed
for that service or workload.

### You can't save changes to the dashboard you are viewing

You are exploring data shown in a service or workload dashboard and you want
to save your changes. The toolbar displays a **Save to dashboard** button.
However, when you select that button, you can't save the changes to your
current dashboard.

The **Save to dashboard** button is shown only when the dashboard you are
viewing is read-only. However, you can use this button to save your
changes to a custom dashboard. For more information, see
[Dashboards overview](https://docs.cloud.google.com/monitoring/dashboards).

### You can't save your chart

When you are exploring telemetry data, in the toolbar, the
**Save to dashboard** button is disabled.

To resolve this failure, ensure that you have sufficient permissions.


To get the permissions that
you need to save changes to a custom dashboard,

ask your administrator to grant you the
[Monitoring Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/monitoring#monitoring.editor) (`roles/monitoring.editor`) IAM role on your App Hub host project or management project.


### Unexpected alerts are being opened

With the release of Application Monitoring, the
`metadata.system_labels.apphub_host_project_id` label was renamed as
`metadata.system_labels.apphub_application_container`. This change might result
in some new alerts being generated and some open alerts not
closing. For example, for metric-absence policies, you might get notified
because the change in labels might cause a monitored time series to stop
reporting samples.

There is no action to take. Alerts close automatically when data stops
arriving, after the auto-close duration expires. For more information, see
[Partial metric data](https://docs.cloud.google.com/monitoring/alerts/concepts-indepth#partial-metric-data).

### You can't access the logs in your app-enabled folder

You've selected an app-enabled folder with the resource
picker in the Google Cloud console. You then open an Google Cloud Observability page, like
the **Logs Explorer** page, and the resource picker is reset to
a project.

The behavior is intended. When you have selected an app-enabled folder
and then access an Google Cloud Observability page, the selected resource is reset to
the folder's management project. Typically, you want the project selected
when you want to view the telemetry data for an application.

To access the logs in the app-enabled folder, use the resource picker
to manually select the folder.

### You don't see edges in your application topology map

You can see your application services and workloads visualized in the
Application Monitoring topology map, but you don't see any edges connecting them. You might
also see a message similar to "No trace connections detected for the topology
graph. Instrument for Trace to enable the full topology experience."

Edges in the topology map represent traffic in your application and are
generated by data from Cloud Trace. To resolve this issue, try the following
steps:

1. Configure your application to use Trace:

   - Instrument your application to use OpenTelemetry. For more
     information, see
     [Instrument for Trace](https://docs.cloud.google.com/trace/docs/setup).

   - Send your traces using the OTLP endpoint. For more information, see
     [Migrate from the Trace exporter to the OTLP endpoint](https://docs.cloud.google.com/trace/docs/migrate-to-otlp-endpoints).

2. Verify that you have configured and set the default trace scope.
   For more information, see
   [Set up Application Monitoring](https://docs.cloud.google.com/monitoring/docs/setup-application-monitoring#view-trace).

3. Verify that your application trace spans are being labeled with
   application-specific resource attributes. For more information, see
   [Add application attributes to trace spans](https://docs.cloud.google.com/monitoring/docs/instrument-for-application-monitoring#add_application_attributes_to_trace_spans).