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:
parent
22a4f9cc55
commit
08c38ab6f5
14
log/doc.go
14
log/doc.go
@ -36,11 +36,11 @@ make:
|
|||||||
- Default to another implementation
|
- Default to another implementation
|
||||||
|
|
||||||
All interfaces in this API embed a corresponding interface from
|
All interfaces in this API embed a corresponding interface from
|
||||||
go.opentelemetry.io/otel/log/embedded. If an author wants the default behavior
|
[go.opentelemetry.io/otel/log/embedded]. If an author wants the default
|
||||||
of their implementations to be a compilation failure, signaling to their users
|
behavior of their implementations to be a compilation failure, signaling to
|
||||||
they need to update to the latest version of that implementation, they need to
|
their users they need to update to the latest version of that implementation,
|
||||||
embed the corresponding interface from go.opentelemetry.io/otel/log/embedded in
|
they need to embed the corresponding interface from
|
||||||
their implementation. For example,
|
[go.opentelemetry.io/otel/log/embedded] in their implementation. For example,
|
||||||
|
|
||||||
import "go.opentelemetry.io/otel/log/embedded"
|
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
|
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
|
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
|
Finally, an author can embed another implementation in theirs. The embedded
|
||||||
implementation will be used for methods not defined by the author. For example,
|
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
|
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"
|
import "go.opentelemetry.io/otel/log/noop"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
// API] is extended (which is something that can happen without a major version
|
// API] is extended (which is something that can happen without a major version
|
||||||
// bump of the API package).
|
// 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"
|
package embedded // import "go.opentelemetry.io/otel/log/embedded"
|
||||||
|
|
||||||
// LoggerProvider is embedded in the [Logs Bridge API LoggerProvider].
|
// 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
|
// Bridge API LoggerProvider] interface is extended (which is something that
|
||||||
// can happen without a major version bump of the API package).
|
// 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() }
|
type LoggerProvider interface{ loggerProvider() }
|
||||||
|
|
||||||
// Logger is embedded in [Logs Bridge API Logger].
|
// 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
|
// interface is extended (which is something that can happen without a major
|
||||||
// version bump of the API package).
|
// 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() }
|
type Logger interface{ logger() }
|
||||||
|
@ -12,15 +12,17 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// Package noop provides an implementation of the OpenTelemetry Logs Bridge API
|
// Package noop provides an implementation of the [OpenTelemetry Logs Bridge
|
||||||
// that produces no telemetry and minimizes used computation resources.
|
// 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.
|
// effectively disable OpenTelemetry.
|
||||||
//
|
//
|
||||||
// This implementation can be embedded in other implementations of the
|
// 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.
|
// 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"
|
package noop // import "go.opentelemetry.io/otel/log/noop"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Loading…
Reference in New Issue
Block a user