sentry_grpc 10.0.0-alpha.4 copy "sentry_grpc: ^10.0.0-alpha.4" to clipboard
sentry_grpc: ^10.0.0-alpha.4 copied to clipboard

An integration which adds support for performance tracing and error monitoring for gRPC calls.

example/example.dart

import 'package:grpc/grpc.dart';
import 'package:sentry/sentry.dart';
import 'package:sentry_grpc/sentry_grpc.dart';

Future<void> main() async {
  // ATTENTION: Change the DSN below with your own to see the events in Sentry.
  // Get one at sentry.io
  const dsn =
      'https://e85b375ffb9f43cf8bdf9787768149e0@o447951.ingest.sentry.io/5428562';

  await Sentry.init((options) {
    options.dsn = dsn;
    options.tracesSampleRate = 1.0;
    options.captureFailedRequests = true;
  }, appRunner: runApp);
}

Future<void> runApp() async {
  final channel = ClientChannel('api.example.com');
  final interceptors = <ClientInterceptor>[SentryGrpcInterceptor()];

  // Pass [interceptors] to your generated client:
  // final stub = GreeterClient(channel, interceptors: interceptors);

  await channel.shutdown();
  await Sentry.close();
}
0
likes
0
points
1.24k
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

An integration which adds support for performance tracing and error monitoring for gRPC calls.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

grpc, meta, sentry

More

Packages that depend on sentry_grpc