Socket
Socket
Sign inDemoInstall

apollo-reporting-protobuf

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-reporting-protobuf

Protobuf format for Apollo usage reporting


Version published
Weekly downloads
1.1M
increased by0.7%
Maintainers
1
Weekly downloads
 
Created

What is apollo-reporting-protobuf?

The apollo-reporting-protobuf package is designed for use with Apollo GraphQL services. It provides functionality for generating, serializing, and deserializing Protocol Buffers (protobuf) definitions related to Apollo's usage reporting. This is particularly useful for Apollo Server operators who want to send detailed performance metrics and usage information to Apollo Studio in a highly efficient and compact format.

What are apollo-reporting-protobuf's main functionalities?

Generating Trace Reports

This feature allows you to generate trace reports for individual operations. These traces can include detailed performance metrics, such as resolver execution times, which are useful for debugging and optimization.

const { Trace } = require('apollo-reporting-protobuf');
const trace = new Trace();
trace.startTime = Date.now();
// Populate trace with details of the operation
trace.endTime = Date.now();

Serializing Trace Reports

This feature enables the serialization of trace reports into a compact binary format using Protocol Buffers. This is useful for efficiently transmitting data to Apollo Studio or other analysis tools.

const { Trace } = require('apollo-reporting-protobuf');
const trace = new Trace();
// Assume trace is populated
const serializedTrace = Trace.encode(trace).finish();

Deserializing Trace Reports

This feature allows for the deserialization of previously serialized trace reports. This is useful for analyzing or processing trace data received in a compact binary format.

const { Trace } = require('apollo-reporting-protobuf');
const serializedTrace = /* binary data */;
const trace = Trace.decode(serializedTrace);

Other packages similar to apollo-reporting-protobuf

Keywords

FAQs

Package last updated on 27 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc