1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-14 02:33:21 +02:00

Add links to published packages (#4970)

This commit is contained in:
Tyler Yahn 2024-02-25 07:39:05 -08:00 committed by GitHub
parent 22a4f9cc55
commit 08c38ab6f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 14 deletions

View File

@ -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"

View File

@ -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() }

View File

@ -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 (