Skip to content

Commit

Permalink
Merge branch 'main' into codeboten/add-spec-for-collector
Browse files Browse the repository at this point in the history
  • Loading branch information
codeboten authored Dec 10, 2024
2 parents abc13c8 + a265ae0 commit 17cc1bf
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 125 deletions.
22 changes: 0 additions & 22 deletions .github/auto_assign_issue.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/auto_assign_pr.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/auto-assign-pr.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ release.
([#4183](https://github.com/open-telemetry/opentelemetry-specification/pull/4183))
- Remove the recommendation to not synchronize access to `LoggerConfig.disabled`.
([#4310](https://github.com/open-telemetry/opentelemetry-specification/pull/4310))
- Remove the in-development isolating log record processor.
([#4301](https://github.com/open-telemetry/opentelemetry-specification/pull/4301))
- Change `event.name` attribute into top-level event name field.
([#4320](https://github.com/open-telemetry/opentelemetry-specification/pull/4320))

### Events

- Deprecate Events API and SDK in favor of having Events support in the Logs API and SDK.
([#4319](https://github.com/open-telemetry/opentelemetry-specification/pull/4319))

### Baggage

### Resource
Expand Down
21 changes: 1 addition & 20 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Disclaimer: this list of features is still a work in progress, please refer to t
| LoggerProvider.Shutdown | | | + | | + | | | + | | + | - | |
| LoggerProvider.ForceFlush | | | + | | + | | | + | | + | - | |
| Logger.Emit(LogRecord) | | | + | | + | | | + | | + | - | |
| Logger.EmitEvent(LogRecord) | | | | | | | | | | | | |
| Logger.Enabled | X | + | | | | | | | + | + | | |
| SimpleLogRecordProcessor | | | + | | + | | | + | | + | | |
| BatchLogRecordProcessor | | | + | | + | | | + | | + | | |
Expand All @@ -203,26 +204,6 @@ Disclaimer: this list of features is still a work in progress, please refer to t
| Can plug custom LogRecordExporter | | | + | | + | | | + | | + | | |
| Trace Context Injection | | | + | | + | | | + | | + | + | |

## Events

Features for the [Events API](specification/logs/event-api.md) and the [Events SDK](specification/logs/event-sdk.md).
Disclaimer: Events are currently in Development status - work in progress.

| Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift |
|----------------------------------------------------------------------------|----------|----|------|----|--------|------|--------|-----|------|-----|------|-------|
| [EventLoggerProvider](specification/logs/event-api.md#eventloggerprovider) | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift |
| Get EventLogger | | | | | | | | | | | | |
| Get EventLogger accepts version | X | | | | | | | | | | | |
| Get EventLogger accepts schema_url | X | | | | | | | | | | | |
| Get EventLogger accepts attributes | X | | | | | | | | | | | |
| [EventLogger](specification/logs/event-api.md#eventlogger) | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift |
| Emit event accepts name | | | | | | | | | | | | |
| Emit event accepts AnyValue body | X | | | | | | | | | | | |
| Emit event accepts severity | X | | | | | | | | | | | |
| Emit event accepts timestamp | X | | | | | | | | | | | |
| Emit event accepts attributes | X | | | | | | | | | | | |
| Emit event accepts context | X | | | | | | | | | | | |

## Resource

| Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift |
Expand Down
1 change: 0 additions & 1 deletion specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ path_base_for_github_subdir:
- [Metrics](metrics/api.md)
- [Logs](logs/README.md)
- [API](logs/api.md)
- [Event API](logs/event-api.md)
- SDK Specification
- [Tracing](trace/sdk.md)
- [Metrics](metrics/sdk.md)
Expand Down
4 changes: 1 addition & 3 deletions specification/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ processor.
### Infrastructure Logs

These are logs generated by various infrastructure components, such as
Kubernetes events (if you are wondering why events are discussed in the context
of logs see [Event API Data model](./event-api.md#event-data-model)). Like system logs, the
Kubernetes events. Like system logs, the
infrastructure logs lack a trace context and can be enriched by the resource
context - information about the node, pod, container, etc.

Expand Down Expand Up @@ -447,7 +446,6 @@ standard output.
* [Logs API](./api.md)
* [Logs SDK](./sdk.md)
* [Logs Data Model](./data-model.md)
* [Event API](./event-api.md)
* [Trace Context in non-OTLP Log Formats](../compatibility/logging_trace_context.md)

## References
Expand Down
4 changes: 2 additions & 2 deletions specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ The API MUST accept the following parameters:
- [Severity Text](./data-model.md#field-severitytext) (optional)
- [Body](./data-model.md#field-body) (optional)
- [Attributes](./data-model.md#field-attributes) (optional)
- **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#event-name) (optional)

#### Enabled

Expand Down Expand Up @@ -173,8 +174,7 @@ formatted as an [event](./data-model.md#events).

**Parameters:**

* The [`Name`](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md)
of the Event.
* [Event Name](./data-model.md#event-name) (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.
Expand Down
14 changes: 13 additions & 1 deletion specification/logs/data-model.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Logs Data Model

**Status**: [Stable](../document-status.md)
**Status**: [Stable](../document-status.md), except where otherwise specified

<details>
<summary>Table of Contents</summary>
Expand Down Expand Up @@ -34,6 +34,7 @@
* [Field: `InstrumentationScope`](#field-instrumentationscope)
* [Field: `Attributes`](#field-attributes)
+ [Errors and Exceptions](#errors-and-exceptions)
* [Field: `EventName`](#field-eventname)
- [Example Log Records](#example-log-records)
- [Example Mappings](#example-mappings)
- [References](#references)
Expand Down Expand Up @@ -208,6 +209,7 @@ Body |The body of the log record.
Resource |Describes the source of the log.
InstrumentationScope|Describes the scope that emitted the log.
Attributes |Additional information about the event.
**Status**: [Development](../document-status.md) - EventName | Name that identifies the class / type of event.

Below is the detailed description of each field.

Expand Down Expand Up @@ -477,6 +479,16 @@ of the record.
If included, they MUST follow the OpenTelemetry
[semantic conventions for exception-related attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/exceptions/exceptions-logs.md).

### Field: `EventName`

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

Type: string.

Description: Name that identifies the class / type of the [Event](#events).
This name SHOULD uniquely identify the event structure (both attributes and body).
A log record with a non-empty event name is an [Event](#events).

## Example Log Records

For example log records see
Expand Down
13 changes: 2 additions & 11 deletions specification/logs/event-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Events API

**Status**: [Development](../document-status.md)
**Status**: [Deprecated](../document-status.md) (was never stabilized),
see [Emit Event](./api.md#emit-an-event) in the Logs API for replacement.

<details>
<summary>Table of Contents</summary>
Expand All @@ -9,7 +10,6 @@

<!-- toc -->

- [Logs API Development](#logs-api-development)
- [Event Data model](#event-data-model)
- [Event API use cases](#event-api-use-cases)
- [EventLoggerProvider](#eventloggerprovider)
Expand All @@ -31,15 +31,6 @@ The Event API consists of these main components:
provides access to `EventLogger`s.
* [EventLogger](#eventlogger) is the component responsible for emitting events.

## Logs API Development

> [!NOTE]
> We are currently in the process of defining a new [Logs API](./api.md).
The intent is that this Logs API will incorporate the current functionality of this existing Events API and once it is defined and implemented, the Events API usage will be migrated, deprecated, renamed and eventually removed.

No further work is scheduled for the current Events API definition at this time.

## Event Data model

Wikipedia’s [definition of log file](https://en.wikipedia.org/wiki/Log_file):
Expand Down
3 changes: 2 additions & 1 deletion specification/logs/event-sdk.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Events SDK

**Status**: [Development](../document-status.md)
**Status**: [Deprecated](../document-status.md) (was never stabilized),
see the [Logs SDK](./sdk.md) and [Emit Event](./api.md#emit-an-event) in the Logs API for replacement.

<details>
<summary>Table of Contents</summary>
Expand Down
24 changes: 2 additions & 22 deletions specification/logs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* [Built-in processors](#built-in-processors)
+ [Simple processor](#simple-processor)
+ [Batching processor](#batching-processor)
+ [Isolating processor](#isolating-processor)
- [LogRecordExporter](#logrecordexporter)
* [LogRecordExporter operations](#logrecordexporter-operations)
+ [Export](#export)
Expand Down Expand Up @@ -233,10 +232,10 @@ the following information added to the [LogRecord](data-model.md#log-and-event-r
* [`TraceId`](./data-model.md#field-traceid)
* [`SpanId`](./data-model.md#field-spanid)
* [`TraceFlags`](./data-model.md#field-traceflags)
* **Status**: [Development](../document-status.md) - [`EventName`](./data-model.md#event-name)

The SDK MAY provide an operation that makes a deep clone of a `ReadWriteLogRecord`.
The operation can be used to implement the [isolating processor](#isolating-processor)
or by asynchronous processors (e.g. [Batching processor](#batching-processor))
The operation can be used by asynchronous processors (e.g. [Batching processor](#batching-processor))
to avoid race conditions on the log record that is not required to be
concurrent safe.

Expand Down Expand Up @@ -383,10 +382,6 @@ make the flush timeout configurable.
The standard OpenTelemetry SDK MUST implement both simple and batch processors,
as described below.

**Status**: [Development](../document-status.md) -
The standard OpenTelemetry SDK SHOULD implement an isolating processor,
as described below.

Other common processing scenarios SHOULD be first considered
for implementation out-of-process
in [OpenTelemetry Collector](../overview.md#collector).
Expand Down Expand Up @@ -426,21 +421,6 @@ to make sure that they are not invoked concurrently.
* `maxExportBatchSize` - the maximum batch size of every export. It must be
smaller or equal to `maxQueueSize`. The default value is `512`.

#### Isolating processor

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

This is an implementation of `LogRecordProcessor` ensuring the log record
passed to `OnEmit` of the configured `processor` does not share mutable data
with subsequent registered processors.
For example, the `OnEmit` implementation of the isolating processor can be
a decorator that makes a deep copy of the log record before passing it to
the configured `processor`.

**Configurable parameters:**

* `processor` - processor to be isolated.

## LogRecordExporter

`LogRecordExporter` defines the interface that protocol-specific exporters must
Expand Down
4 changes: 1 addition & 3 deletions specification/versioning-and-stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ Semantic Conventions defines the set of fields in the OTLP data model:
- The attribute keys provided on the LogRecord
- The attribute values provided on the LogRecord that are defined in a list
of well-known values.
- For log records that are [Log Events](logs/event-api.md)
- The following data provided to [emit event](logs/event-api.md#emit-event):
- The event name (the value of the `event.name` attribute)
- The event name

Things not listed in the above are not expected to remain stable via semantic
convention and are allowed (or expected) to change. A few examples:
Expand Down

0 comments on commit 17cc1bf

Please sign in to comment.