AccelByte Blog: Insights on Game Development & Backend

Practical Guide to Troubleshooting with Extend Observability - Logging

Written by AccelByte Inc | Jul 2, 2025 3:00:00 PM

Your custom matchmaking logic is breaking. Players can’t open loot boxes. You know it’s not AGS, it’s your Extend app. But where do you even start debugging?

Extend gives you the power to customize game backend behavior beyond what AccelByte Gaming Services (AGS) supports out of the box—all fully hosted and operated by AccelByte. There are three types of Extend apps you can build:

  • Extend Override – Override default AGS logic. For example, tweak matchmaking logic or loot box odds.

  • Extend Service Extension – Host custom RESTful APIs alongside AGS. For example, calculate player skills using your own algorithm.

  • Extend Event Handler – React to in-game events with custom logic. For example, automatically grant an item when a player logs in.

This level of flexibility is powerful—but when something breaks, pinpointing the root cause without visibility can be frustrating and time-consuming.

That’s where Extend Observability comes in. It gives you real-time insight into how your custom code behaves at runtime, through three key lenses: metrics, distributed tracing, and structured logging.

  • Metrics help you track performance trends, usage rates, and request volume.

  • Distributed tracing shows the path of a request as it moves through multiple services.

  • Structured logging is your first and fastest line of defense when something goes wrong.

Among these, logging is often the most immediately useful for debugging. Logs give you a detailed, time-stamped record of what your app did, helping you trace execution flow, identify errors, and resolve issues faster. In this guide, you’ll learn how to:

  • Implement structured logging in your Extend apps

  • Access and filter logs in Grafana

  • Use logs to diagnose and fix problems quickly

Implementing Structured Logging in the Extend App

All Extend templates come with a preconfigured logging library. That means you can start instrumenting your code without setting up external agents or pipelines. The key? Log smart—not just often.

Here’s a quick guide to logging levels and when to use them:

Level

When to Use It

Example 

Info

Track the normal flow of operations

"Started matchmaking for playerId 123"

Warn

A potential issue occurred, but didn’t stop execution

"Token is close to expiry"

Error

Something failed that may impact functionality

"Failed to save player progress"

Debug

Deep-dive details useful for dev-only analysis

"Request payload: {...}"

Accessing and Analyzing Log Data in Grafana

Here's how to get started:

  1. Log in to the AccelByte Admin Portal and navigate to the Extend section

  2. Select the Extend app you want to inspect

  3. On the app detail page, click Open Grafana Cloud to access your dedicated dashboard

  4. In Grafana, open the Explore view from the left-hand menu. This brings up a query editor where you can specify exactly what log data you want to retrieve. Make sure the data source dropdown is set to grafanacloud-accelbyte-logs. Your application’s logs will typically follow the pattern log-<your-studio-name>.

  5. Results will be returned in structured JSON format.

Utilizing Logs for Effective Troubleshooting

Once your Extend app is instrumented with structured logging, Grafana makes it easy to explore those logs in real time. Logs appear in structured JSON format, which makes them both human-readable and machine-parsable—ideal for quick filtering and deep analysis.

Each log entry typically includes:

  • Timestamp – The exact UTC time of the event

  • Log level – Severity such as info, warn, error, or debug

  • Message – A descriptive string captured in the log

  • Contextual fields – Key-value pairs like userId, itemId, guildId, namespace, or traceId that add depth to your logs

Once deployed, these logs show up in real time inside the Grafana Cloud dashboard. Developers can immediately filter by key fields, verify the behavior of their custom logic, and spot anomalies without digging through unstructured output or scattered error messages.

This structured, searchable logging experience—paired with a centralized observability platform—can drastically speed up your debugging workflow. Whether you're validating API behavior or chasing down a hard-to-reproduce bug, the ability to reconstruct runtime events with precision makes troubleshooting faster, clearer, and more reliable.

To see structured logging in action, here’s an example from a typical Extend Service Extension. The app is responsible for creating or updating guild progress and logs each operation with contextual metadata for easy filtering in Grafana.

Info Log Example – Successful Operation

This log captures a successful write operation and includes useful context like the guildId and namespace. If something breaks later, you can easily trace the last successful event by filtering for this log message in Grafana.

By using code above, the Extend App will response 500 error like this:

and with help from Grafana, we can check about the error log.

Advanced Troubleshooting with LogQL

Grafana’s LogQL lets you filter and search logs to pinpoint exactly what happened. Use it to:

  • Reconstruct event flows by filtering for log lines like "success create guild"

  • Validate data by checking info or debug logs for request payloads or API responses

With structured logs and the right queries, you can quickly trace issues, confirm behavior, and debug with confidence.

Real-World Example

A customer was facing intermittent 500 errors when players tried to open loot boxes, which impacted a in-game feature and was first identified by AccelByte’s LiveOps team, who reported it to the customer. At first glance, the logs in Grafana pointed to an expired token in their Extend app.

But with structured logging in place, they dug deeper.

By reconstructing the request lifecycle, they found the real issue: the authentication token was not being refreshed properly by the Extend SDK. Armed with this insight, they reached out to the AccelByte team, who quickly helped resolve the problem.

This is the power of structured logs. They turn obscure bugs into solvable problems.

Conclusion

Structured logging is one of the most powerful tools available in Extend Observability. When used effectively, it gives you a clear window into how your custom code behaves in real time.

By instrumenting your app with meaningful, contextual logs—and using Grafana to explore them—you can cut down troubleshooting time, ship fixes faster, and deliver a more reliable experience for your players.

To go deeper, check out the full Extend Observability documentation