Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs: Remove Events operations in favor of making whole Logger user-facing #4352

Merged
merged 8 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ release.

### Logs

- Remove `Logger`'s Log Instrumentation operations.
([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352))
- Make all `Logger` operations user-facing.
([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352))

### Events

- Remove the deprecated Events API and SDK in favor of having Events support in the Logs API and SDK.
Expand Down
53 changes: 6 additions & 47 deletions specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ aliases: [bridge-api]
* [LoggerProvider operations](#loggerprovider-operations)
+ [Get a Logger](#get-a-logger)
- [Logger](#logger)
* [Log Bridge operations](#log-bridge-operations)
+ [Emit a LogRecord](#emit-a-logrecord)
+ [Enabled](#enabled)
* [Log Instrumentation operations](#log-instrumentation-operations)
+ [Emit an Event](#emit-an-event)
* [Emit a LogRecord](#emit-a-logrecord)
* [Enabled](#enabled)
- [Optional and required parameters](#optional-and-required-parameters)
- [Concurrency requirements](#concurrency-requirements)
- [References](#references)
Expand Down Expand Up @@ -97,30 +94,17 @@ instances where at least one parameter has a different value.

## Logger

The `Logger` is responsible for emitting `LogRecord`s. There are two types of
logging operations:
The `Logger` is responsible for emitting `LogRecord`s.

* **Log Bridge** operations to be used when receiving data from other logging
libraries.
* **Log Instrumentation** operations to be used when writing instrumentation
for OpenTelemetry.

The Logger contains methods for both types of operations. The `Logger` MUST
provide a function to:
The `Logger` MUST provide a function to:

- [Emit a `LogRecord`](#emit-a-logrecord)

The `Logger` SHOULD provide functions to:

- [Emit an `Event`](#emit-an-event)
- [Report if `Logger` is `Enabled`](#enabled)

### Log Bridge operations

Log Bridge operations are not intended to be used for writing instrumentation,
and SHOULD include documentation that discourages this use.

#### Emit a LogRecord
### Emit a LogRecord

The effect of calling this API is to emit a `LogRecord` to the processing pipeline.

Expand All @@ -139,7 +123,7 @@ The API MUST accept the following parameters:
- [Attributes](./data-model.md#field-attributes) (optional)
- **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional)

#### Enabled
### Enabled

**Status**: [Development](../document-status.md)

Expand All @@ -163,31 +147,6 @@ SHOULD be documented that instrumentation authors needs to call this API each
time they [emit a LogRecord](#emit-a-logrecord) to ensure they have the most
up-to-date response.

### Log Instrumentation operations

#### Emit an Event

**Status**: [Development](../document-status.md)

The effect of calling this API is to emit a `LogRecord` to the processing pipeline
formatted as an [event](./data-model.md#events).

**Parameters:**

* [Event Name](./data-model.md#field-eventname) (required)
* [Timestamp](./data-model.md#field-timestamp) (optional)
* [Observed Timestamp](./data-model.md#field-observedtimestamp) (optional). If unspecified
the implementation SHOULD set it equal to the current time.
* The [Context](../context/README.md) associated with the `Event`. When implicit
Context is supported, then this parameter SHOULD be optional and if unspecified
then MUST use current Context. When only explicit Context is supported, this parameter
SHOULD be required.
* [Severity Number](./data-model.md#field-severitynumber) (optional)
* [Severity Text](./data-model.md#field-severitytext) (optional)
* [Body](./data-model.md#field-body) (optional)
* [Attributes](./data-model.md#field-attributes) (optional) Event `Attributes` conform
to the [standard definition](../common/README.md#standard-attribute) of an attribute.

## Optional and required parameters

The operations defined include various parameters, some of which are marked
Expand Down
Loading