datadog_grpc_interceptor

Creator: coderz1093

Last updated:

Add to Cart

Description:

datadog grpc interceptor

Datadog gRPC Interceptor / Plugin #

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

Getting started #
To utilize this plugin, create an instance of DatadogGrpcInterceptor, then pass it to your generated gRPC client:
import 'package:datadog_grpc_interceptor/datadog_grpc_interceptor.dart'

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

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

// Create the gRPC interceptor with the supported channel
final datadogInterceptor = DatadogGrpcInterceptor(DatadogSdk.instance, channel);

// Create the gRPC client, passing in the Datadog interceptor
final stub = GreeterClient(channel, interceptors: [datadogInterceptor]);
copied to clipboard
Contributing #
Pull requests are welcome. First, open an issue to discuss what you would like
to change. For more information, read the Contributing
guide in the root repository.
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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.