otel_google_sign_in 0.1.0 copy "otel_google_sign_in: ^0.1.0" to clipboard
otel_google_sign_in: ^0.1.0 copied to clipboard

OpenTelemetry instrumentation for package:google_sign_in. Traces Google Sign-In auth flows with auth spans and enduser.id.

otel_google_sign_in #

OpenTelemetry instrumentation for package:google_sign_in (v7 API).

final gsi = GoogleSignIn.instance;

await gsi.tracedInitialize();
final account = await gsi.tracedAuthenticate();
await gsi.tracedSignOut();

Each call opens a CLIENT span named google_sign_in <op> with:

  • auth.system = google_sign_in
  • auth.operation = initialize / authenticate / attempt_lightweight_authentication / sign_out / disconnect
  • auth.provider = google.com
  • enduser.id — the user's Google account ID, on successful authentication (opt-out via recordUserId: false)

Failures record the exception and set span status to error (GoogleSignInException included, so canceled and misconfigured flows are visible in traces).

tracedAttemptLightweightAuthentication mirrors the underlying nullable-Future contract: a null return means no authentication attempt was possible, and no span is recorded.

Attribute keys are exposed as the GoogleSignInSemantics enum. tracedGoogleSignInCall<R> is the generic helper behind the extension methods, usable for custom operations.

Suppression: runWithoutGoogleSignInInstrumentation / runWithoutGoogleSignInInstrumentationAsync.

License #

Apache 2.0

0
likes
160
points
68
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

OpenTelemetry instrumentation for package:google_sign_in. Traces Google Sign-In auth flows with auth spans and enduser.id.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

dartastic_opentelemetry, dartastic_opentelemetry_api, flutter, google_sign_in

More

Packages that depend on otel_google_sign_in