| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
/* |
| 5 |
Package log provides the OpenTelemetry Logs SDK. |
| 6 |
|
| 7 |
See https://opentelemetry.io/docs/concepts/signals/logs/ for information |
| 8 |
about the concept of OpenTelemetry Logs and |
| 9 |
https://opentelemetry.io/docs/concepts/components/ for more information |
| 10 |
about OpenTelemetry SDKs. |
| 11 |
|
| 12 |
The entry point for the log package is [NewLoggerProvider]. |
| 13 |
[LoggerProvider] is the object that all Bridge API calls use to create |
| 14 |
Loggers, and ultimately emit log records. |
| 15 |
Also, it is an object that should be used to |
| 16 |
control the life-cycle (start, flush, and shutdown) of the Logs SDK. |
| 17 |
|
| 18 |
A LoggerProvider needs to be configured to process the log records, this is |
| 19 |
done by configuring it with a [Processor] implementation using [WithProcessor]. |
| 20 |
The log package provides the [BatchProcessor] and [SimpleProcessor] |
| 21 |
that are configured with an [Exporter] implementation which |
| 22 |
exports the log records to given destination. See |
| 23 |
[go.opentelemetry.io/otel/exporters] for exporters that can be used with these |
| 24 |
Processors. |
| 25 |
|
| 26 |
The data generated by a LoggerProvider needs to include information about its |
| 27 |
origin. A LoggerProvider needs to be configured with a Resource, by using |
| 28 |
[WithResource], to include this information. This Resource |
| 29 |
should be used to describe the unique runtime environment instrumented code |
| 30 |
is being run on. That way when multiple instances of the code are collected |
| 31 |
at a single endpoint their origin is decipherable. |
| 32 |
|
| 33 |
See [go.opentelemetry.io/otel/sdk/log/internal/x] for information about |
| 34 |
the experimental features. |
| 35 |
|
| 36 |
See [go.opentelemetry.io/otel/log] for more information about |
| 37 |
the OpenTelemetry Logs API. |
| 38 |
*/ |
| 39 |
package log // import "go.opentelemetry.io/otel/sdk/log" |