Skip to main content

kubesense_grpc_interceptor 1.0.0 copy "kubesense_grpc_interceptor: ^1.0.0" to clipboard
kubesense_grpc_interceptor: ^1.0.0 copied to clipboard

A plugin for use with the KubesenseSdk, used to track performance of gRPC and enable Kubesense Distributed Tracing.

Kubesense gRPC Interceptor / Plugin #

A plugin for use with the KubesenseSdk, used to track performance of gRPC and enable Kubesense Distributed Tracing.

Getting started #

To utilize this plugin, create an instance of KubesenseGrpcInterceptor, then pass it to your generated gRPC client:

import 'package:kubesense_grpc_interceptor/kubesense_grpc_interceptor.dart'

// Initialize Kubesense, be sure to set the [KubesenseConfiguration.firstPartyHosts] member
// to enable Kubesense Distributed Tracing
final config = KubesenseConfiguration(
  // ...
  firstParthHosts = ['localhost']
)

// Create the gRPC channel
final channel = ClientChannel(
  'localhost',
  port: 50051,
  options: ChannelOptions(
    // ...
  ),
);

// Create the gRPC interceptor with the supported channel
final kubesenseInterceptor = KubesenseGrpcInterceptor(KubesenseSdk.instance, channel);

// Create the gRPC client, passing in the Kubesense interceptor
final stub = GreeterClient(channel, interceptors: [kubesenseInterceptor]);

Generating the test gRPC files #

If you are working on tests for this package and need to regenerate the gRPC client and related code, follow the instructions on the gRPC Quick Start page.

The protobuf spec is held in test/protos/helloworld.proto

License #

Apache License, v2.0

0
likes
130
points
41
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A plugin for use with the KubesenseSdk, used to track performance of gRPC and enable Kubesense Distributed Tracing.

Homepage

License

Apache-2.0 (license)

Dependencies

flutter, grpc, kubesense_flutter_plugin, uuid

More

Packages that depend on kubesense_grpc_interceptor