メインコンテンツまでスキップ

エクステンドの可観測性入門

Last updated on November 1, 2024
備考

The AccelByte Gaming Services (AGS) and Grafana Cloud integration is part of the full Extend package, available in both AGS tiers: Private Cloud and Shared Cloud. For Shared Cloud users on a free trial, you can access Grafana Cloud and all other Extend features once you unlock the tier.

Overview

AccelByte Gaming Services (AGS) Extend uses Grafana Cloud to provide you comprehensive observability dashboards for your Extend apps. With a focus on infrastructure and service health metrics, these dashboards aim to enhance your ability to monitor and troubleshoot effectively. Using the Grafana Cloud dashboards for your Extend apps, you can gain insights into your apps' performance and behavior.

AGS Shared Cloud

For Shared Cloud users on a free trial, you can access Grafana Cloud and all other Extend features once you unlock the tier.

Extend offers Grafana Cloud dashboards for each type of Extend apps, refer to the guide for each app type:

備考

Apart from the Extend dashboards, the AGS and Grafana Cloud integration also offers other dashboards such as Game Health dashboards, AMS Dashboard, and custom dashboards (or dashboards created based on customer request and requirements). For more information, refer to the Grafana Cloud Observability page.

Access Grafana Cloud dashboards

You can get the access link for your Grafana Cloud dashboards from the details page of your Extend apps. Follow these steps:

  1. Go to the details page of the Extend app with the Grafana Cloud dashboard you want to view.

  2. At the bottom of the App Detail table, click on Open Grafana Cloud. The Grafana Cloud login page is opened in a new browser tab.

  3. On the login page, click the Sign in with Admin Portal button and use your Admin Portal credentials to log in.

To learn how to navigate Grafana Cloud dashboards, refer to the guide for each app type:

Infrastructure health metrics

We provide the following infrastructure metrics in your Grafana stack:

  • App instances count & status
  • CPU Utilization
    • Limit
    • Request
  • Memory consumption
    • Limit
    • Request
  • Storage
    • Disk Space
    • IOPS
  • Network
    • Bandwidth
    • Network usage

Service health metrics

The following service metrics can be accessed in the Grafana stack:

  • Request count
    • gRPC
      • Total request
      • Total request per gRPC status code
      • Request latency
      • Error rates
    • HTTP
      • Total request
      • Total 2xx request
      • Total 4xx request
      • Total 5xx request
      • Request latency
  • Incoming kafka events (if applicable)
  • Application creation duration
  • Deployment creation duration

Metrics and logs query capabilities

As a developer of your Extend app, you have the capability to see your application logs and metrics in Grafana Cloud. We provide this capability by enabling LBAC data sourcing from our central stack to be queried and retrieved from your dedicated stack. To query metrics and logs from your Grafana Cloud stack, you can follow these steps:

  1. On the sidebar, go to the Explore section.

    click to explore logs and metrics

  2. Grafana Cloud provides you a query editor that allows you to specify the exact metrics or log data you want to retrieve. Data sources for your application usually follow the pattern log-<your studio name> or metrics-<your studio name>. You can pick the data source for logs/metrics by accessing the dropdown on the top.

    click to change data sources

  3. To get your application data, apply the label filters. Choose the namespace label and select extend-accelbyte-custom-service as the value. You can also narrow down the result by utilizing the time filters.

  4. Once your queries are defined, you can execute the query using the run query button in the top-right.

    click to run query

  5. Grafana Cloud will return logs and metrics based on the defined queries in JSON format.

Send logs to Grafana Cloud

You can send logs from your Extend app to Grafana Cloud by writing the logs to standard output.

Use ILogger<YourClassName> object in your gRPC service implementation class to write logs.

// Import namespace
using Microsoft.Extensions.Logging;

// Declare private logger object
private readonly ILogger<YourClassName> _Logger;

// Get logger object in constructor
public YourClassName(
...
ILogger<YourClassName> logger,
...
)
{
...
_Logger = logger;
...
}

// Use it within the method
_Logger.LogInformation("your log message");

Visualization

As an Extend app developer, you can visualize the health of an Extend service by utilizing the available dashboards. After your Extend app is provisioned, you can expect the following canned dashboards to be created:

Dashboards

Dashboards will be accessible in the following path: https://<your-grafana-dedicated-stack>.grafana.net/dashboards. As an example, your stack URL might be like this: https://accelbyte12345.grafana.net/dashboards

click to access dashboard

Custom metrics

You will have the ability to annotate and publish your service-specific metrics to help gain further insights into your app's performance. These metrics will be the metrics that you choose to expose and the metrics that are supplied by the Extend platform. Support and documentation for these metrics will be added soon.