This plugin automatically instruments the grpc module.

interface grpc {
    client?: Grpc;
    enabled?: boolean;
    measured?: boolean | {
        [key: string]: boolean;
    };
    metadata?: string[] | ((variables) => {
        [key: string]: any;
    });
    server?: Grpc;
    service?: any;
}

Hierarchy

  • Grpc
    • grpc

Properties

client?: Grpc

Configuration for gRPC clients.

enabled?: boolean

Whether to enable the plugin.

Default

true
measured?: boolean | {
    [key: string]: boolean;
}

Whether to measure the span. Can also be set to a key-value pair with span names as keys and booleans as values for more granular control.

Type declaration

  • [key: string]: boolean
metadata?: string[] | ((variables) => {
    [key: string]: any;
})

An array of metadata entries to record. Can also be a callback that returns the key/value pairs to record. For example, using variables => variables would record all variables.

Type declaration

    • (variables): {
          [key: string]: any;
      }
    • Parameters

      • variables: {
            [key: string]: any;
        }
        • [key: string]: any

      Returns {
          [key: string]: any;
      }

      • [key: string]: any
server?: Grpc

Configuration for gRPC servers.

service?: any

The service name to be used for this plugin.