Skip to content

Commit

Permalink
Merge branch 'main' into define-http-sampling-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova authored Sep 28, 2021
2 parents 233f2a0 + 613bf2c commit 6377e9f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 24 deletions.
20 changes: 11 additions & 9 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ formats is required. Implementing more than one format is optional.
| [TracerProvider](specification/trace/api.md#tracerprovider-operations) | | | | | | | | | | | | |
| Create TracerProvider | | + | + | + | + | + | + | + | + | + | + | + |
| Get a Tracer | | + | + | + | + | + | + | + | + | + | + | + |
| Get a Tracer with schema_url | | + | | | | | | | | | | |
| Get a Tracer with schema_url | | + | | | | | | | | + | | |
| Safe for concurrent calls | | + | + | + | + | + | + | + | + | + | + | + |
| Shutdown (SDK only required) | | + | + | + | + | + | - | | + | + | + | + |
| ForceFlush (SDK only required) | | + | + | - | + | + | - | | + | + | + | + |
Expand All @@ -39,7 +39,7 @@ formats is required. Implementing more than one format is optional.
| Create root span | | + | + | + | + | + | + | + | + | + | + | + |
| Create with default parent (active span) | | N/A| + | + | + | + | + | + | + | + | + | + |
| Create with parent from Context | | + | + | + | + | + | + | + | + | + | + | + |
| No explicit parent Span/SpanContext allowed | | + | + | + | + | + | + | | + | - | - | + |
| No explicit parent Span/SpanContext allowed | | + | + | + | + | + | + | | + | + | - | + |
| SpanProcessor.OnStart receives parent Context | | + | + | + | + | + | + | | + | - | - | + |
| UpdateName | | + | + | + | + | + | + | + | + | + | + | + |
| User-defined start timestamp | | + | + | + | + | + | + | + | + | + | + | + |
Expand Down Expand Up @@ -103,6 +103,7 @@ formats is required. Implementing more than one format is optional.
| [Merge (v2)](specification/resource/sdk.md#merge) | | + | + | | + | + | + | | + | + | + | |
| Retrieve attributes | | + | + | + | + | + | + | | + | + | + | + |
| [Default value](specification/resource/semantic_conventions/README.md#semantic-attributes-with-sdk-provided-default-value) for service.name | | + | + | | + | + | + | | | + | + | |
| [Resource detector](specification/resource/sdk.md#detecting-resource-information-from-the-environment) interface/mechanism | | + | + | + | + | + | + | [-][php225] | + | + | + | + |

## Context Propagation

Expand All @@ -120,10 +121,10 @@ formats is required. Implementing more than one format is optional.
| B3 Propagator | | + | + | + | + | + | + | | + | + | + | + |
| Jaeger Propagator | | + | + | + | + | + | + | | + | + | - | - |
| [TextMapPropagator](specification/context/api-propagators.md#textmap-propagator) | | + | | | | | | | | | | |
| Fields | | + | + | + | + | + | + | | + | - | + | + |
| Fields | | + | + | + | + | + | + | | + | + | + | + |
| Setter argument | X | N/A| + | + | + | + | + | | N/A | + | + | + |
| Getter argument | X | N/A| + | + | + | + | + | | N/A | + | + | + |
| Getter argument returning Keys | X | N/A| + | + | + | + | + | | N/A | - | - | + |
| Getter argument returning Keys | X | N/A| + | + | + | + | + | | N/A | + | - | + |

## Environment Variables

Expand All @@ -136,7 +137,7 @@ Note: Support for environment variables is optional.
|OTEL_LOG_LEVEL | - | - | + | [-][py1059] | + | + | - | | - | - | - |
|OTEL_PROPAGATORS | - | + | | + | + | + | - | - | - | - | - |
|OTEL_BSP_* | - | + | | + | + | + | - | + | - | - | - |
|OTEL_EXPORTER_OTLP_* | + | + | | + | + | - | - | + | - | - | - |
|OTEL_EXPORTER_OTLP_* | + | + | | + | + | - | - | + | + | - | - |
|OTEL_EXPORTER_JAEGER_* | + | | | | | - | - | | - | + | - |
|OTEL_EXPORTER_ZIPKIN_* | - | | | | | - | - | - | - | - | - |
|OTEL_TRACES_EXPORTER | - | + | | + | + | + | | - | - | | |
Expand All @@ -156,14 +157,14 @@ Note: Support for environment variables is optional.

| Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift |
|--------------------------------------------------------------------------------|----------|----|------|----|----------|------|--------|-----|------|-----|------|-------|
| [Exporter interface](specification/trace/sdk.md#span-exporter) | | | + | | + | | | | + | | + | |
| [Exporter interface](specification/trace/sdk.md#span-exporter) | | | + | | + | | | | + | + | + | |
| [Exporter interface has `ForceFlush`](specification/trace/sdk.md#forceflush-2) | | | + | | [-][py1779] | + | | | - | | | |
| Standard output (logging) | | + | + | + | + | + | + | - | + | + | + | + |
| In-memory (mock exporter) | | + | + | + | + | + | + | - | - | + | + | + |
| [OTLP](specification/protocol/otlp.md) | | | | | | | | | | | | |
| OTLP/gRPC Exporter | * | + | + | + | + | | + | | + | + | + | + |
| OTLP/HTTP binary Protobuf Exporter | * | + | + | + | + | + | + | | | - | - | - |
| OTLP/HTTP JSON Protobuf Exporter | | + | - | + | [-][py1003] | | - | | | - | - | - |
| OTLP/HTTP binary Protobuf Exporter | * | + | + | + | + | + | + | | | + | - | - |
| OTLP/HTTP JSON Protobuf Exporter | | + | - | + | [-][py1003] | | - | | | + | - | - |
| OTLP/HTTP gzip Content-Encoding support | X | + | + | + | + | + | - | | | - | - | - |
| Concurrent sending | | - | + | + | [-][py1108] | | - | | + | - | - | - |
| Honors retryable responses with backoff | X | + | | + | + | + | - | | | - | - | - |
Expand All @@ -187,7 +188,7 @@ Note: Support for environment variables is optional.
| [Jaeger](specification/trace/sdk_exporters/jaeger.md) | | | | | | | | | | | | |
| Jaeger Thrift over UDP | * | + | | | + | + | | | + | + | + | + |
| Jaeger Protobuf via gRPC | * | - | + | | [-][py1437] | - | | | | - | - | - |
| Jaeger Thrift over HTTP | * | + | + | | + | + | | | + | - | - | - |
| Jaeger Thrift over HTTP | * | + | + | | + | + | | | + | + | - | - |
| Service name mapping | | + | + | | + | + | | | | + | + | + |
| Resource to Process mapping | | + | + | | + | + | | | + | - | + | - |
| InstrumentationLibrary mapping | | + | + | | + | + | | | + | - | + | - |
Expand All @@ -206,3 +207,4 @@ Note: Support for environment variables is optional.
[py1174]: https://github.com/open-telemetry/opentelemetry-python/issues/1174
[py1437]: https://github.com/open-telemetry/opentelemetry-python/issues/1437
[py1779]: https://github.com/open-telemetry/opentelemetry-python/issues/1779
[php225]: https://github.com/open-telemetry/opentelemetry-php/issues/225
4 changes: 2 additions & 2 deletions specification/library-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This API consist of a few main classes:
### `/internal` (_Optional_)

Library components and implementations that shouldn't be exposed to the users.
If a language has an idiomatic layout for internal compoents, please follow
If a language has an idiomatic layout for internal components, please follow
the language idiomatic style.

### `/logs` (_In the future_)
Expand Down Expand Up @@ -99,7 +99,7 @@ This directory describes the SDK implementation for api/trace.
### `/sdk/internal` (_Optional_)

Library components and implementations that shouldn't be exposed to the users.
If a language has an idiomatic layout for internal compoents, please follow
If a language has an idiomatic layout for internal components, please follow
the language idiomatic style.

### `/sdk/logs` (_In the future_)
Expand Down
29 changes: 28 additions & 1 deletion specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [Field: `Body`](#field-body)
- [Field: `Resource`](#field-resource)
- [Field: `Attributes`](#field-attributes)
- [Errors and Exceptions](#errors-and-exceptions)
- [Example Log Records](#example-log-records)
- [Appendix A. Example Mappings](#appendix-a-example-mappings)
- [RFC5424 Syslog](#rfc5424-syslog)
Expand Down Expand Up @@ -427,6 +428,14 @@ OpenTelemetry
[semantic conventions for Attributes](../trace/semantic_conventions/README.md).
This field is optional.

#### Errors and Exceptions

Additional information about errors and/or exceptions that are associated with
a log record MAY be included in the structured data in the `Attributes` section
of the record.
If included, they MUST follow the OpenTelemetry
[semantic conventions for exception-related attributes](../trace/semantic_conventions/exceptions.md#attributes).

## Example Log Records

Below are examples that show one possible representation of log records in JSON.
Expand Down Expand Up @@ -687,7 +696,7 @@ We apply this mapping from HEC to the unified model:
<td>host</td>
<td>string</td>
<td>The host value to assign to the event data. This is typically the host name of the client that you are sending data from.</td>
<td>Resource["host.hostname"]</td>
<td>Resource["host.name"]</td>
</tr>
<tr>
<td>source</td>
Expand Down Expand Up @@ -748,6 +757,24 @@ When mapping from the unified model to HEC, we apply this additional mapping:
<td>Short event identifier that does not contain varying parts.</td>
<td>fields['otel.log.name']</td>
</tr>
<tr>
<td>TraceId</td>
<td>string</td>
<td>Request trace id.</td>
<td>fields['trace_id']</td>
</tr>
<tr>
<td>SpanId</td>
<td>string</td>
<td>Request span id.</td>
<td>fields['span_id']</td>
</tr>
<tr>
<td>TraceFlags</td>
<td>string</td>
<td>W3C trace flags.</td>
<td>fields['trace_flags']</td>
</tr>
</table>

### Log4j
Expand Down
13 changes: 1 addition & 12 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,4 @@ modeled to interact with other components in the SDK:

## Defaults and Configuration

The SDK MUST provide the following configuration parameters for Exemplar
sampling:

| Name | Description | Default | Notes |
|-----------------|---------|-------------|---------|
| `OTEL_METRICS_EXEMPLAR_FILTER` | Filter for which measurements can become Exemplars. | `"WITH_SAMPLED_TRACE"` | |

Known values for `OTEL_METRICS_EXEMPLAR_FILTER` are:

- `"NONE"`: No measurements are eligble for exemplar sampling.
- `"ALL"`: All measurements are eligible for exemplar sampling.
- `"WITH_SAMPLED_TRACE"`: Only allow measurements with a sampled parent span in context.
The SDK MUST provide configuration according to the [SDK environment variables](../sdk-environment-variables.md) specification.
14 changes: 14 additions & 0 deletions specification/sdk-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ Known values for OTEL_METRICS_EXPORTER are:
- `"prometheus"`: [Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md)
- `"none"`: No automatically configured exporter for metrics.

## Metrics SDK Configuration

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

| Name | Description | Default | Notes |
|-----------------|---------|-------------|---------|
| `OTEL_METRICS_EXEMPLAR_FILTER` | Filter for which measurements can become Exemplars. | `"with_sampled_trace"` | |

Known values for `OTEL_METRICS_EXEMPLAR_FILTER` are:

- `"none"`: No measurements are eligble for exemplar sampling.
- `"all"`: All measurements are eligible for exemplar sampling.
- `"with_sampled_trace"`: Only allow measurements with a sampled parent span in context.

## Language Specific Environment Variables

To ensure consistent naming across projects, this specification recommends that language specific environment variables are formed using the following convention:
Expand Down

0 comments on commit 6377e9f

Please sign in to comment.