Registry / observability / go-errorreporting

go-errorreporting

JSON →
library0.9.0gogounverified

Package errorreporting provides a Go client for the Google Cloud Error Reporting API.

go get cloud.google.com/go/errorreporting
INSTALL
IMPORT
SIG · GO-ERRORREPORTING
G
go-errorreporting
observabilitygov0.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

errorreporting
✓ cloud.google.com/go/errorreporting

Report an error to Google Cloud Error Reporting

package main import ( "cloud.google.com/go/errorreporting" "context" "log" ) func main() { ctx := context.Background() client, err := errorreporting.NewClient(ctx, "my-project", errorreporting.Config{ ServiceName: "myservice", ServiceVersion: "v1.0", }) if err != nil { log.Fatal(err) } defer client.Close() client.Report(errorreporting.Entry{ Error: log.Output(1, "something broke"), }) }
Debug
Known issues
gotchaRequires Google Cloud project and authentication setup
fix
Ensure GOOGLE_APPLICATION_CREDENTIALS is set or running in a GCP environment
affects: all
Upgrade
Version history
0.9.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources
go-errorreporting — go get go-errorreporting · libregistry