diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 0309efef956..d98236516ed 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -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) | | + | + | - | + | + | - | | + | + | + | + | @@ -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 | | + | + | + | + | + | + | + | + | + | + | + | @@ -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 @@ -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 @@ -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 | - | + | | + | + | + | | - | - | | | @@ -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 | + | | + | + | + | - | | | - | - | - | @@ -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 | | + | + | | + | + | | | + | - | + | - | @@ -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 diff --git a/specification/library-layout.md b/specification/library-layout.md index 9e4af3d5a86..34664ce1038 100644 --- a/specification/library-layout.md +++ b/specification/library-layout.md @@ -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_) @@ -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_) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index b2df17d5864..5e90cbeccb6 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -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) @@ -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. @@ -687,7 +696,7 @@ We apply this mapping from HEC to the unified model: host string The host value to assign to the event data. This is typically the host name of the client that you are sending data from. - Resource["host.hostname"] + Resource["host.name"] source @@ -748,6 +757,24 @@ When mapping from the unified model to HEC, we apply this additional mapping: Short event identifier that does not contain varying parts. fields['otel.log.name'] + + TraceId + string + Request trace id. + fields['trace_id'] + + + SpanId + string + Request span id. + fields['span_id'] + + + TraceFlags + string + W3C trace flags. + fields['trace_flags'] + ### Log4j diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 3145bc52114..2862383297e 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -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. diff --git a/specification/sdk-environment-variables.md b/specification/sdk-environment-variables.md index edbf7f67839..2e360272810 100644 --- a/specification/sdk-environment-variables.md +++ b/specification/sdk-environment-variables.md @@ -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: