otel_google_sign_in 0.1.0
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_inauth.operation = initialize/authenticate/attempt_lightweight_authentication/sign_out/disconnectauth.provider = google.comenduser.id— the user's Google account ID, on successful authentication (opt-out viarecordUserId: 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