Skip to content

Commit cf2f7b6

Browse files
authored
logs: Remove Events operations in favor of making whole Logger user-facing (#4352)
1 parent d46ad22 commit cf2f7b6

File tree

2 files changed

+11
-47
lines changed

2 files changed

+11
-47
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ release.
1515

1616
### Logs
1717

18+
- Remove `Logger`'s Log Instrumentation operations.
19+
([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352))
20+
- Make all `Logger` operations user-facing.
21+
([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352))
22+
1823
### Events
1924

2025
- Remove the deprecated Events API and SDK in favor of having Events support in the Logs API and SDK.

specification/logs/api.md

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ aliases: [bridge-api]
1818
* [LoggerProvider operations](#loggerprovider-operations)
1919
+ [Get a Logger](#get-a-logger)
2020
- [Logger](#logger)
21-
* [Log Bridge operations](#log-bridge-operations)
22-
+ [Emit a LogRecord](#emit-a-logrecord)
23-
+ [Enabled](#enabled)
24-
* [Log Instrumentation operations](#log-instrumentation-operations)
25-
+ [Emit an Event](#emit-an-event)
21+
* [Emit a LogRecord](#emit-a-logrecord)
22+
* [Enabled](#enabled)
2623
- [Optional and required parameters](#optional-and-required-parameters)
2724
- [Concurrency requirements](#concurrency-requirements)
2825
- [References](#references)
@@ -97,30 +94,17 @@ instances where at least one parameter has a different value.
9794

9895
## Logger
9996

100-
The `Logger` is responsible for emitting `LogRecord`s. There are two types of
101-
logging operations:
97+
The `Logger` is responsible for emitting `LogRecord`s.
10298

103-
* **Log Bridge** operations to be used when receiving data from other logging
104-
libraries.
105-
* **Log Instrumentation** operations to be used when writing instrumentation
106-
for OpenTelemetry.
107-
108-
The Logger contains methods for both types of operations. The `Logger` MUST
109-
provide a function to:
99+
The `Logger` MUST provide a function to:
110100

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

113103
The `Logger` SHOULD provide functions to:
114104

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

118-
### Log Bridge operations
119-
120-
Log Bridge operations are not intended to be used for writing instrumentation,
121-
and SHOULD include documentation that discourages this use.
122-
123-
#### Emit a LogRecord
107+
### Emit a LogRecord
124108

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

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

142-
#### Enabled
126+
### Enabled
143127

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

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

166-
### Log Instrumentation operations
167-
168-
#### Emit an Event
169-
170-
**Status**: [Development](../document-status.md)
171-
172-
The effect of calling this API is to emit a `LogRecord` to the processing pipeline
173-
formatted as an [event](./data-model.md#events).
174-
175-
**Parameters:**
176-
177-
* [Event Name](./data-model.md#field-eventname) (required)
178-
* [Timestamp](./data-model.md#field-timestamp) (optional)
179-
* [Observed Timestamp](./data-model.md#field-observedtimestamp) (optional). If unspecified
180-
the implementation SHOULD set it equal to the current time.
181-
* The [Context](../context/README.md) associated with the `Event`. When implicit
182-
Context is supported, then this parameter SHOULD be optional and if unspecified
183-
then MUST use current Context. When only explicit Context is supported, this parameter
184-
SHOULD be required.
185-
* [Severity Number](./data-model.md#field-severitynumber) (optional)
186-
* [Severity Text](./data-model.md#field-severitytext) (optional)
187-
* [Body](./data-model.md#field-body) (optional)
188-
* [Attributes](./data-model.md#field-attributes) (optional) Event `Attributes` conform
189-
to the [standard definition](../common/README.md#standard-attribute) of an attribute.
190-
191150
## Optional and required parameters
192151

193152
The operations defined include various parameters, some of which are marked

0 commit comments

Comments
 (0)