Skip to main content

Platform Debugger

Platform Debugger​


The Multiplayer Platform Debugger is a powerful tool that leverages our comprehensive understanding of your entire backend system architecture to offer deep session replays with insights spanning frontend screens, platform traces, metrics, and logs.

It helps your team pinpoint and resolve bugs faster by providing a complete picture of your backend system architecture. No more wasted hours combing through APM data; the Multiplayer Platform Debugger does it all in one place.

New to Multiplayer​


If you’re new to Multiplayer we recommend following this 2-minute set up:

  • Create a workspace, project, and team
  • Visualize your system architecture with a platform (import an existing diagram image or manually add your platform components)
  • Invite your team

New to OpenTelemetry​


What is OpenTelemetry​

OpenTelemetry (OTel) is an observability framework and toolkit designed to create and manage telemetry data such as traces, metrics, and logs. It’s a vendor- and tool-agnostic, open source Cloud Native Computing Foundation (CNCF) project, born out of the need to standardize how to instrument code and send telemetry data to an observability backend.

Get Started with OpenTelemetry​

Instrumenting OTel in your application requires five minutes. Here are the steps:

  • Import the OpenTelemetry API and SDK
  • Configure the OpenTelemetry API
  • Configure the OpenTelemetry SDK
  • Create Telemetry Data

OTel provides language specific “getting started” guides for C++, .NET, Erlang/Elixir, Go, Java, JavaScript / Typescript, PHP, Python, Ruby, Rust, Swift, etc.

Set Up Platform Debugger​


To set up the Platform Debugger follow these steps:

  • Open your project
  • In the left-side menu, open “Debugger”
  • Click “Set up Debugger”
  • Customize your set up in the Platform Debugger dialog box

Select your environment​

This is particularly useful when setting up System Auto-Documentation (Radar). If you’re just setting up the Platform Debugger, you can leave the default “Any”.

Install the Platform Debugger library​

You can install the Multiplayer Platform Debugger using npm or yarn:

`npm install @multiplayer-app/session-debugger

or

yarn add @multiplayer-app/session-debugger`

Import the Debugger

import debuggerInstance from "@multiplayer-app/session-debugger";

Copy the OpenTelemetry Frontend Token

Copy the “OpenTelemetry Frontend Token” from the Multiplayer Platform Debugger set up window.

Initialization

Use the following code to initialize the debugger with your application details:

debuggerInstance.init({ version: "{YOUR_APPLICATION_VERSION}", application: "{YOUR_APPLICATION_NAME}", environment: "{YOUR_APPLICATION_ENVIRONMENT}", apiKey: "{OpenTelemetry_Frontend_Token}", });

Replace the placeholders with your application’s version, name, environment, and the copied OpenTelemetry Frontend Token.

Add User Metadata

To track user-specific metadata in session replays, add the following:

window["mpSessionDebuggerMetadata"] = { userId: "{userId}", userName: "{userName}", };

Replace the placeholders with the actual user information (e.g., user ID and username).

Add environment variables with the OpenTelemetry Backend Token​

Your approach to implementing the Multiplayer OTel integration will be slightly different depending on how you use OTel.

Using OTel for a single observability backend (Multiplayer)

If you’ll be using OTel to send telemetry data to a single observability backend (Multiplayer), add these three environment variables:

OTEL_EXPORTER_OTLP_HEADERS="Authorization={{OpenTelemetry_Backend_Token}}

  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - OTel Docs

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.multiplayer.app/v1/traces

  • OTEL_EXPORTER_OTLP_LOGS_ENDPOINT - OTel Docs

OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://api.multiplayer.app/v1/logs

Using OTel for multiple observability backends

If you’ll be using OTel to send telemetry data to multiple observability backends, you would need to follow these steps.

Confirm Your Set Up​

Once you click “Confirm”, we will proceed with the Multiplayer OTel integration and start adding backend data (e.g. traces and logs) to your Platform Debugger sessions.

Please note that if you close the set up window before finishing the set up, new OTel tokens will be generated when you re-open it.

Next Steps​


You did it! What’s next?