Skip to content

Commit

Permalink
Merge branch 'main' into stabilize_log_tracecontext
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Feb 27, 2024
2 parents e2edbe9 + 8a78903 commit 90e22de
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 37 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ release.

## Unreleased

- Fix: remove `name` from LogRecord example in the File Exporter example [#3886](https://github.com/open-telemetry/opentelemetry-specification/pull/3886)

### Context

### Traces

### Metrics

- Remove implementation specific specification from metric API.
([#3890](https://github.com/open-telemetry/opentelemetry-specification/pull/3890))

### Logs

- Clarify that logs attributes are a superset of standard attributes.
([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852))

### Resource

### OpenTelemetry Protocol
Expand All @@ -28,6 +36,9 @@ release.

### Common

- Tighten stability requirements for well-known attribute values.
([#3879](https://github.com/open-telemetry/opentelemetry-specification/pull/3879))

### Supplementary Guidelines

## v1.30.0 (2024-02-15)
Expand Down
26 changes: 13 additions & 13 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,19 @@ formats is required. Implementing more than one format is optional.
| The metrics Exporter `ForceFlush` can inform the caller whether it succeeded, failed or timed out. | | | + | + | - | | + | + | | + | + | |
| The metrics Exporter provides a `shutdown` function. | | + | + | + | - | | + | + | + | + | + | |
| The metrics Exporter `shutdown` function do not block indefinitely. | | + | + | + | - | | + | | | + | + | |
| The metrics SDK samples `Exemplar`s from measurements. | | | + | | - | | - | | | | - | |
| Exemplar sampling can be disabled. | | | - | | - | | - | | | | - | |
| The metrics SDK supports SDK-wide exemplar filter configuration | | | + | | - | | - | | | | - | |
| The metrics SDK supports `TraceBased` exemplar filter | | | + | | - | | - | | | | - | |
| The metrics SDK supports `AlwaysOn` exemplar filter | | | + | | - | | - | | | | - | |
| The metrics SDK supports `AlwaysOff` exemplar filter | | | + | | - | | - | | | | - | |
| Exemplars retain any attributes available in the measurement that are not preserved by aggregation or view configuration. | | | + | | - | | - | | | | - | |
| Exemplars contain the associated trace id and span id of the active span in the Context when the measurement was taken. | | | + | | - | | - | | | | - | |
| Exemplars contain the timestamp when the measurement was taken. | | | + | | - | | - | | | | - | |
| The metrics SDK provides an `ExemplarReservoir` interface or extension point. | X | | - | | - | | - | + | | | - | |
| An `ExemplarReservoir` has an `offer` method with access to the measurement value, attributes, `Context` and timestamp. | X | | - | | - | | - | + | | | - | |
| The metrics SDK provides a `SimpleFixedSizeExemplarReservoir` that is used by default for all aggregations except `ExplicitBucketHistogram`. | | | + | | - | | - | + | | | - | |
| The metrics SDK provides an `AlignedHistogramBucketExemplarReservoir` that is used by default for `ExplicitBucketHistogram` aggregation. | | | + | | - | | - | | | | - | |
| The metrics SDK samples `Exemplar`s from measurements. | | | + | | - | | + | | | | - | |
| Exemplar sampling can be disabled. | | | - | | - | | + | | | | - | |
| The metrics SDK supports SDK-wide exemplar filter configuration | | | + | | - | | + | | | | - | |
| The metrics SDK supports `TraceBased` exemplar filter | | | + | | - | | + | | | | - | |
| The metrics SDK supports `AlwaysOn` exemplar filter | | | + | | - | | + | | | | - | |
| The metrics SDK supports `AlwaysOff` exemplar filter | | | + | | - | | + | | | | - | |
| Exemplars retain any attributes available in the measurement that are not preserved by aggregation or view configuration. | | | + | | - | | + | | | | - | |
| Exemplars contain the associated trace id and span id of the active span in the Context when the measurement was taken. | | | + | | - | | + | | | | - | |
| Exemplars contain the timestamp when the measurement was taken. | | | + | | - | | + | | | | - | |
| The metrics SDK provides an `ExemplarReservoir` interface or extension point. | X | | - | | - | | + | + | | | - | |
| An `ExemplarReservoir` has an `offer` method with access to the measurement value, attributes, `Context` and timestamp. | X | | - | | - | | + | + | | | - | |
| The metrics SDK provides a `SimpleFixedSizeExemplarReservoir` that is used by default for all aggregations except `ExplicitBucketHistogram`. | | | + | | - | | + | + | | | - | |
| The metrics SDK provides an `AlignedHistogramBucketExemplarReservoir` that is used by default for `ExplicitBucketHistogram` aggregation. | | | + | | - | | + | | | | - | |
| A metric Producer accepts an optional metric Filter | | | | | | | - | | | | | |
| The metric Reader implementation supports registering metric Filter and passing them its registered metric Producers | | | | | | | - | | | | | |
| The metric SDK's metric Producer implementations uses the metric Filter | | | | | | | - | | | | | |
Expand Down
8 changes: 5 additions & 3 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,15 @@ is optional.

### Field: `Attributes`

Type: `map<string, any>`.
Type: [`map<string, any>`](#type-mapstring-any).

Description: Additional information about the specific event occurrence. Unlike
the `Resource` field, which is fixed for a particular source, `Attributes` can
vary for each occurrence of the event coming from the same source. Can contain
information about the request context (other than TraceId/SpanId). SHOULD follow
OpenTelemetry [semantic conventions for attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md).
information about the request context (other than [Trace Context Fields](#trace-context-fields)).
The log attribute model MUST support [`any` type](#type-any),
a superset of [standard Attribute](../common/README.md#attribute),
to preserve the semantics of structured attributes emitted by the applications.
This field is optional.

#### Errors and Exceptions
Expand Down
23 changes: 10 additions & 13 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ the metrics API:

`Meter`s can be accessed with a `MeterProvider`.

In implementations of the API, the `MeterProvider` is expected to be the
stateful object that holds any configuration.

Normally, the `MeterProvider` is expected to be accessed from a central place.
Thus, the API SHOULD provide a way to set/register and access a global default
`MeterProvider`.
Expand Down Expand Up @@ -599,9 +596,9 @@ language idiomatic name(s), for example `CreateUInt64ObservableCounter`,
`CreateDoubleObservableCounter`, `CreateObservableCounter<UInt64>`,
`CreateObservableCounter<double>`.

It is highly recommended that implementations use the name `ObservableCounter`
(or any language idiomatic variation, e.g. `observable_counter`) unless there is
a strong reason not to do so. Please note that the name has nothing to do with
It is highly recommended that the name `ObservableCounter` (or any language
idiomatic variation, e.g. `observable_counter`) be used unless there is a
strong reason not to do so. Please note that the name has nothing to do with
[asynchronous
pattern](https://en.wikipedia.org/wiki/Asynchronous_method_invocation) and
[observer pattern](https://en.wikipedia.org/wiki/Observer_pattern).
Expand Down Expand Up @@ -922,9 +919,9 @@ idiomatic name(s), for example `CreateUInt64ObservableGauge`,
`CreateDoubleObservableGauge`, `CreateObservableGauge<UInt64>`,
`CreateObservableGauge<double>`.

It is highly recommended that implementations use the name `ObservableGauge`
(or any language idiomatic variation, e.g. `observable_gauge`) unless there is
a strong reason not to do so. Please note that the name has nothing to do with
It is highly recommended that the name `ObservableGauge` (or any language
idiomatic variation, e.g. `observable_gauge`) be used unless there is a strong
reason not to do so. Please note that the name has nothing to do with
[asynchronous
pattern](https://en.wikipedia.org/wiki/Asynchronous_method_invocation) and
[observer pattern](https://en.wikipedia.org/wiki/Observer_pattern).
Expand Down Expand Up @@ -1165,10 +1162,10 @@ decide the language idiomatic name(s), for example
`CreateObservableUpDownCounter<UInt64>`,
`CreateObservableUpDownCounter<double>`.

It is highly recommended that implementations use the name
`ObservableUpDownCounter` (or any language idiomatic variation, e.g.
`observable_up_down_counter`) unless there is a strong reason not to do so. Please
note that the name has nothing to do with [asynchronous
It is highly recommended that the name `ObservableUpDownCounter` (or any
language idiomatic variation, e.g. `observable_up_down_counter`) be used unless
there is a strong reason not to do so. Please note that the name has nothing to
do with [asynchronous
pattern](https://en.wikipedia.org/wiki/Asynchronous_method_invocation) and
[observer pattern](https://en.wikipedia.org/wiki/Observer_pattern).

Expand Down
8 changes: 4 additions & 4 deletions specification/protocol/file-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ This is an example showing metrics:
This is an example showing logs:

```json lines
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","name":"logA","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","name":"logB","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000001233","severityNumber":9,"severityText":"Info","name":"logA","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","name":"logB","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000005443","severityNumber":9,"severityText":"Info","name":"logA","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","name":"logB","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000009875","severityNumber":9,"severityText":"Info","name":"logA","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","name":"logB","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info""body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000001233","severityNumber":9,"severityText":"Info""body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000005443","severityNumber":9,"severityText":"Info","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
{"resourceLogs":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1581452773000009875","severityNumber":9,"severityText":"Info","body":{"stringValue":"This is a log message"},"attributes":[{"key":"app","value":{"stringValue":"server"}},{"key":"instance_num","value":{"intValue":"1"}}],"droppedAttributesCount":1,"traceId":"08040201000000000000000000000000","spanId":"0102040800000000"},{"timeUnixNano":"1581452773000000789","severityNumber":9,"severityText":"Info","body":{"stringValue":"something happened"},"attributes":[{"key":"customer","value":{"stringValue":"acme"}},{"key":"env","value":{"stringValue":"dev"}}],"droppedAttributesCount":1,"traceId":"","spanId":""}]}]}]}
```
Loading

0 comments on commit 90e22de

Please sign in to comment.