diff --git a/log/doc.go b/log/doc.go index c6f5ad4a7..bf14ae48b 100644 --- a/log/doc.go +++ b/log/doc.go @@ -36,11 +36,11 @@ make: - Default to another implementation All interfaces in this API embed a corresponding interface from -go.opentelemetry.io/otel/log/embedded. If an author wants the default behavior -of their implementations to be a compilation failure, signaling to their users -they need to update to the latest version of that implementation, they need to -embed the corresponding interface from go.opentelemetry.io/otel/log/embedded in -their implementation. For example, +[go.opentelemetry.io/otel/log/embedded]. If an author wants the default +behavior of their implementations to be a compilation failure, signaling to +their users they need to update to the latest version of that implementation, +they need to embed the corresponding interface from +[go.opentelemetry.io/otel/log/embedded] in their implementation. For example, import "go.opentelemetry.io/otel/log/embedded" @@ -61,12 +61,12 @@ they need to embed the API interface directly. This is not a recommended behavior as it could lead to publishing packages that contain runtime panics when users update other package that use newer versions -of go.opentelemetry.io/otel/log. +of [go.opentelemetry.io/otel/log]. Finally, an author can embed another implementation in theirs. The embedded implementation will be used for methods not defined by the author. For example, an author who wants to default to silently dropping the call can use -o.opentelemetry.io/otel/log/noop: +[go.opentelemetry.io/otel/log/noop]: import "go.opentelemetry.io/otel/log/noop" diff --git a/log/embedded/embedded.go b/log/embedded/embedded.go index eeecbdae1..a82ab0907 100644 --- a/log/embedded/embedded.go +++ b/log/embedded/embedded.go @@ -21,7 +21,7 @@ // API] is extended (which is something that can happen without a major version // bump of the API package). // -// [OpenTelemetry Logs Bridge API]: https://github.com/open-telemetry/opentelemetry-go/tree/d3dcb3999c5689a7bb803cb0529e55a651ed14f1/log +// [OpenTelemetry Logs Bridge API]: https://pkg.go.dev/go.opentelemetry.io/otel/log package embedded // import "go.opentelemetry.io/otel/log/embedded" // LoggerProvider is embedded in the [Logs Bridge API LoggerProvider]. @@ -32,7 +32,7 @@ package embedded // import "go.opentelemetry.io/otel/log/embedded" // Bridge API LoggerProvider] interface is extended (which is something that // can happen without a major version bump of the API package). // -// [Logs Bridge API LoggerProvider]: https://github.com/open-telemetry/opentelemetry-go/blob/d3dcb3999c5689a7bb803cb0529e55a651ed14f1/log/provider.go#L22-L32 +// [Logs Bridge API LoggerProvider]: https://pkg.go.dev/go.opentelemetry.io/otel/log#LoggerProvider type LoggerProvider interface{ loggerProvider() } // Logger is embedded in [Logs Bridge API Logger]. @@ -43,5 +43,5 @@ type LoggerProvider interface{ loggerProvider() } // interface is extended (which is something that can happen without a major // version bump of the API package). // -// [Logs Bridge API Logger]: https://github.com/open-telemetry/opentelemetry-go/blob/d3dcb3999c5689a7bb803cb0529e55a651ed14f1/log/logger.go#L28-L39 +// [Logs Bridge API Logger]: https://pkg.go.dev/go.opentelemetry.io/otel/log#Logger type Logger interface{ logger() } diff --git a/log/noop/noop.go b/log/noop/noop.go index 936a9f5ff..2f0809064 100644 --- a/log/noop/noop.go +++ b/log/noop/noop.go @@ -12,15 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package noop provides an implementation of the OpenTelemetry Logs Bridge API -// that produces no telemetry and minimizes used computation resources. +// Package noop provides an implementation of the [OpenTelemetry Logs Bridge +// API] that produces no telemetry and minimizes used computation resources. // -// Using this package to implement the OpenTelemetry Logs Bridge API will +// Using this package to implement the [OpenTelemetry Logs Bridge API] will // effectively disable OpenTelemetry. // // This implementation can be embedded in other implementations of the -// OpenTelemetry Logs Bridge API. Doing so will mean the implementation +// [OpenTelemetry Logs Bridge API]. Doing so will mean the implementation // defaults to no operation for methods it does not implement. +// +// [OpenTelemetry Logs Bridge API]: https://pkg.go.dev/go.opentelemetry.io/otel/log package noop // import "go.opentelemetry.io/otel/log/noop" import (