Package blob provides an easy and portable way to interact with blobs
within a storage location. Subpackages contain driver implementations of
blob for supported services.
OpenCensus supports tracing and metric collection for multiple languages and
backend providers. See https://opencensus.io.
This API collects OpenCensus traces and metrics for the following methods:
- Attributes - Copy - Delete - ListPage - NewRangeReader, from creation until the call to Close. (NewReader and ReadAll are included because they call NewRangeReader.) - NewWriter, from creation until the call to Close.
All trace and metric names begin with the package import path.
The traces add the method name.
For example, "gocloud.dev/blob/Attributes".
The metrics are "completed_calls", a count of completed method calls by driver,
method and status (error code); and "latency", a distribution of method latency
by driver and method.
For example, "gocloud.dev/blob/latency".
It also collects the following metrics:
- gocloud.dev/blob/bytes_read: the total number of bytes read, by driver. - gocloud.dev/blob/bytes_written: the total number of bytes written, by driver.
Package blob provides an easy and portable way to interact with blobs within a storage location. Subpackages contain driver implementations of blob for supported services.
See https://gocloud.dev/howto/blob/ for a detailed how-to guide.
*blob.Bucket implements io/fs.FS and io/fs.SubFS, so it can be used with functions in that package.
Errors
The errors returned from this package can be inspected in several ways:
The Code function from gocloud.dev/gcerrors will return an error code, also defined in that package, when invoked on an error.
The Bucket.ErrorAs method can retrieve the driver error underlying the returned error.
OpenCensus Integration
OpenCensus supports tracing and metric collection for multiple languages and backend providers. See https://opencensus.io.
This API collects OpenCensus traces and metrics for the following methods:
All trace and metric names begin with the package import path. The traces add the method name. For example, "gocloud.dev/blob/Attributes". The metrics are "completed_calls", a count of completed method calls by driver, method and status (error code); and "latency", a distribution of method latency by driver and method. For example, "gocloud.dev/blob/latency".
It also collects the following metrics:
To enable trace collection in your application, see "Configure Exporter" at https://opencensus.io/quickstart/go/tracing. To enable metric collection in your application, see "Exporting stats" at https://opencensus.io/quickstart/go/metrics.