logo
search
EXPAND ALL
  • Home

Overview

Pixie's API allows developers to easily export data from Pixie's observability platform and integrate it into their existing stack.

Client Libraries

Pixie supplies two client libraries that provide a layer of abstraction on top of gRPC and handle the details of authentication, cluster connection, script execution, and more.

To get started using one of client libraries, check out our Quick Start guide.

gRPC API

Pixie uses a gRPC API to communicate between its backend platform and its Live UI, CLI, and API clients.

gRPC Streaming Details

Data from Pixie's observability platform is queried using PxL scripts. A PxL script can output multiple data tables.

The gRPC API's main endpoint, ExecuteScript, returns data on a stream. A PxL script with two tables, would produce a stream like the following:

  • The first message contains the metadata for a single table. Table Metadata Messages includes: name, id, relation (describing the table columns). For PxL scripts with multiple data tables, the channel does not guarantee that all Table Metadata Messages are sent before sending over any Data Messages, only that a client will receive metadata for a particular table before receiving data from that table.

  • The following messages contain the table data sent in batches. Data Messages contain a RowBatch containing a: tableID (matches the id in the table metadata), numRows, and eos. The message containing the final batch of data will have its end-of-stream (eos) flag set true. If the stream unexpectedly closes, there is no guarantee that a table will receive eos. It is important to note that users can write queries that stream forever and thus never send an eos

  • The final message contains script execution statistics.

The following diagram shows the response to ExecuteScript for a PxL script containing two tables:

Pixie `ExecuteScript` gRPC streaming output example.
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.