Specificationv1.63.0
since v1.62.011 breaking43 notable41 editorial
From the upstream release notes
- Mark "Environment Variables as Context Propagation Carriers" as Stable.
- Add the traces data model.
- Allow an exception to the finite upper bound for exporter Export calls only
- Add Development span type: optional span creation parameter, ReadableSpan
- Clarify that Exemplars retain measurement attributes filtered out by the
- Clarify that the Attributes metric instrument advisory parameter acts as a recommended allow-list of attribute keys to be retained, and that an empty list retains no attributes.
- Add the OptIn advisory parameter and enabled View stream parameter.
- Allow an exception to the finite upper bound for exporter Export calls only
- Allow an exception to the finite upper bound for exporter Export calls only
- Extend the ETW example mapping with the optional etw.provider.name
Breaking11
Requirements added to, removed from, or restrengthened in a document marked Stable.
- Strengthrequirementlogs/sdk.md#exportMUST NOT relaxed to MUST: In all other cases, there MUST be a reasonable finite upper limit after which the call times out with an error result (
Failure). - Strengthrequirementtrace/sdk.md#exportbatchMUST NOT relaxed to MUST: In all other cases, there MUST be a reasonable finite upper limit after which the call times out with an error result (
Failure). - New rulerequirementlogs/sdk.md#exportMUST NOT added:
ExportMUST NOT block indefinitely, except when performing synchronous output through an API that does not support deadlines or cancellation of a blocked write. - New rulerequirementtrace/api.md#span-typeMUST NOT added: Span type is provided at span creation and MUST NOT be changed afterwards.
- New rulerequirementtrace/api.md#span-typeMUST added: The API MUST be documented in a way to communicate to users that the span type: is expected to uniquely identify the span structure
- New rulerequirementtrace/api.md#span-typeMUST added: MUST have low cardinality;
- New rulerequirementtrace/api.md#span-typeMUST added: MUST conform to the span type syntax.
- New rulerequirementtrace/sdk.md#additional-span-interfacesMUST added: Status: Development - A function receiving this as argument MUST be able to access the span type, if set.
- New rulerequirementtrace/sdk.md#exportbatchMUST NOT added:
ExportMUST NOT block indefinitely, except when performing synchronous output through an API that does not support deadlines or cancellation of a blocked write. - New rulerequirementtrace/sdk.md#sdk-span-creationMUST added: Status: Development - When a span is created with a non-empty span type, the SDK MUST validate that the span type conforms to the span type syntax before calling
ShouldSample. - New rulerequirementtrace/sdk.md#sdk-span-creationMUST added: If the span type does not conform to this syntax, the SDK SHOULD emit an error notifying the user about the invalid span type and MUST proceed with creating the span as if no span type was provided.
Notable43
- Rule droppedrequirementcompatibility/prometheus_and_openmetrics.md#resource-attributesMUST NOT removed: The following attributes SHOULD be associated with scraped metrics as resource attributes, and MUST NOT be added as metric attributes:
- Strengthrequirementmetrics/sdk.md#exportbatchMUST NOT relaxed to MUST: In all other cases, there MUST be a reasonable finite upper limit after which the call times out with an error result (
Failure). - Stabilitydocumentconfiguration/README.mdStatus changed from Unspecified to Development.
- Stabilitydocumentcontext/env-carriers.mdStatus changed from Release Candidate to Stable.
- Stabilitydocumentspecification/library-guidelines.mdStatus changed from Unspecified to Development.
- New rulerequirementcompatibility/prometheus_and_openmetrics.md#histograms-as-prometheus-histogramsMUST added: When the
Sumis not set and the output protocol requires the existence ofSum, then the data point MUST be dropped, otherwise theSumMUST be omitted. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#histograms-as-prometheus-nhcbMUST added:
Sum, if set, is converted to the Native HistogramSum; otherwise, the metric point MUST be dropped. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#metric-labelsMUST NOT added: Labels of metrics MUST be copied to data point attributes, except for the following labels, which MUST NOT be copied:
__name__;jobandinstance; labels with empty values; thelelabel of classic Prometheus hist... - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: When receiving metrics over Prometheus Remote Write, a missing
joborinstancelabel MUST be treated as the empty string. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: Metrics MUST be grouped into one resource per distinct
jobandinstancepair, including pairs where one or both values are the empty string. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: Resource attributes from a
targetinfo metric in the current request MUST take precedence over attributes from an earlier request. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: For each
jobandinstancepair, if thetargetinfo metric with thatjobandinstancehas aservice.namelabel, theservice.nameattribute of the resource created for that pair MUST be set to that label's v... - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: Otherwise, if
jobis not the empty string, it MUST be set to the value of thejoblabel. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: For each
jobandinstancepair, if thetargetinfo metric with thatjobandinstancehas aservice.instance.idlabel, theservice.instance.idattribute of the resource created for that pair MUST be set to ... - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMUST added: Otherwise, if
instanceis not the empty string, it MUST be set to the value of theinstancelabel. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#resource-attributesMUST added: Therefore a new resource MUST be created for each
jobandinstancepair encountered in the metrics labels, except for thetargetinfo metric which defines correlated resource labels. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: If the
joborinstancelabel of a metric is missing or empty, for example due tometric_relabel_configs, the missing label MUST be set to the corresponding label of the scrape target, after relabeling. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: If either label is still missing or empty, the scrape MUST fail.
- New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: For each
jobandinstancepair, if thetargetinfo metric with thatjobandinstancehas aservice.namelabel, theservice.nameattribute of the resource created for that pair MUST be set to that label's v... - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: Otherwise, it MUST be set to the value of the
joblabel. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: For each
jobandinstancepair, if thetargetinfo metric with thatjobandinstancehas aservice.instance.idlabel, theservice.instance.idattribute of the resource created for that pair MUST be set to ... - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST added: Otherwise, it MUST be set to the value of the
instancelabel. - New rulerequirementconfiguration/README.md#sdk-component-namesMUST added: If supported, the SDK MUST recommend in its documentation that users choose a name that uniquely identifies the component within its containing SDK instance.
- New rulerequirementconfiguration/README.md#sdk-component-namesMUST added: When a component with a configured name emits self-observability telemetry containing [
otel.component.name][otel-component-name], the attribute MUST use the configured name. - New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST added: Injectable distributions MUST document their activation mechanism and all prerequisites for safe activation and operation in an injection mechanism contract.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST added: The injection mechanism contract MUST identify which prerequisites require verification by the injector tool and which compatibility checks the distribution performs itself.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST added: The injection mechanism contract MUST be subject to semantic versioning.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST added: For stable distributions, backward-incompatible changes to the contract MUST require a major version increment (except security-related changes).
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST added: If multiple builds of an injectable distribution are published (e.g. per CPU architecture or C library flavor), the injection mechanism contract MUST document deterministic logic for selecting a compatible build.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST NOT added: When the prerequisites assigned to the injector tool by the injection mechanism contract are satisfied and a compatible build is selected, the injectable distribution MUST NOT prevent application startup or cause the ap...
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST NOT added: When a distribution performs compatibility checks, it MUST NOT prevent application startup or cause application failure if those checks fail.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMUST NOT added: Injector tools MUST NOT enable an injectable distribution by default unless they can verify the prerequisites assigned to them by the contract and select a compatible build.
- New rulerequirementmetrics/sdk.md#exportbatchMUST NOT added:
ExportMUST NOT block indefinitely, except when performing synchronous output through an API that does not support deadlines or cancellation of a blocked write. - New rulerequirementmetrics/sdk.md#instrument-advisory-parameter-attributesMUST added: If no View is configured, or if a matching view does not specify attribute keys, the advisory parameter MUST be used (an empty list
[]retains no attributes). - New rulerequirementmetrics/sdk.md#instrument-advisory-parameter-attributesMUST added: If neither is provided, all attributes MUST be retained.
- New rulerequirementmetrics/sdk.md#instrument-advisory-parameter-optinMUST added: When an instrument has
OptIn=true, the SDK MUST use the Drop Aggregation. - New rulerequirementmetrics/sdk.md#start-timestampsMUST added: If a cumulative series is reset or evicted and is subsequently observed again, it MUST be treated as a new series with a new start timestamp (see Supplementary Guidelines).
- New rulerequirementmetrics/sdk.md#stream-configurationMUST NOT added: Therefore, the stream configuration parameter needs to be structured to accept an
enabledvalue, but MUST NOT obligate a user to provide one. - New rulerequirementmetrics/sdk.md#stream-configurationMUST added: The parameter MUST distinguish an unset value from
false. - New rulerequirementmetrics/sdk.md#stream-configurationMUST added: If
enabledistrue, theMeterProviderMUST aggregate the stream as if the instrument'sOptInadvisory parameter werefalse. - New rulerequirementmetrics/sdk.md#stream-configurationMUST added: If
enabledisfalse, theMeterProviderMUST use the Drop Aggregation, regardless of theaggregationprovided. - New rulerequirementtrace/api.md#span-typeSHOULD NOT added: The API SHOULD NOT validate the span type; that is left to implementations of the API, like the SDK.
- New rulerequirementtrace/data-model.md#field-resourceSHOULD added: The resource SHOULD follow OpenTelemetry semantic conventions for Resources.
Editorial41
- Rule droppedrequirementmetrics/sdk.md#measurement-processingSHOULD removed: If the Instrument could not match with any of the registered
View(s), the SDK SHOULD enable the instrument using the default aggregation and temporality. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushMAY added: Receivers MAY therefore also apply the resource attributes from a
targetinfo metric received in an earlier request to metrics with the samejobandinstancein later requests, for example by caching them. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#resource-attributesMAY added: Such resource attributes MAY be added to metrics from future requests that share the same
jobandinstanceas thetargetinfo metric. - New rulerequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMAY added: Further attributes (such as from K8s service discovery metadata labels) MAY be added to the resource attributes.
- New rulerequirementconfiguration/README.md#sdk-component-namesMAY added: SDK components MAY allow users to configure an optional name.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionOPTIONAL added: Providing an injectable distribution is OPTIONAL.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionMAY added: It MAY disable some or all instrumentation.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionSHOULD added: When an injector tool declines to activate a distribution, or a distribution disables instrumentation because of incompatibility, it SHOULD emit actionable diagnostics explaining why.
- New rulerequirementspecification/library-guidelines.md#automatic-injectionSHOULD added: Injectable distributions SHOULD support declarative configuration.
- Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#exponential-histogramsMUST reworded: An OpenTelemetry Exponential Histogram with a cumulative aggregation temporality MUST be converted to a Prometheus Native Histogram with standard (exponential) schema as follows:
TimeUnixNanois co... - Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#histograms-as-prometheus-histogramsMUST reworded: When converting to a Prometheus Histogram, an OpenTelemetry Histogram MUST be converted following the rules below:
Countis converted to the HistogramCount; The bucket boundaries in `ExplicitBou... - Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#histograms-as-prometheus-nhcbMUST reworded: When converting to a Prometheus NHCB, only a single NHCB metric MUST be created:
TimeUnixNanois converted to the PrometheusTimestampafter converting nanoseconds to milliseconds;Minand `Max... - Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#resource-attributesMUST reworded: If present, the
targetinfo metric MUST be dropped from the batch of metrics, and all labels exceptjob,instanceand__name__from thetargetinfo metric MUST be samejobandinstance... - Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#resource-attributesMUST NOT reworded: By default, label keys and values of the
targetinfo metric MUST NOT be altered (such as replacing_with.characters in keys). - Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#resource-attributes-1MUST reworded: All resource attributes SHOULD be converted to a target info metric, or MUST be dropped.
- Rewordedrequirementcompatibility/prometheus_and_openmetrics.md#resource-attributes-1MUST NOT reworded: The
targetmetric is an info-typed metric whose labels MUST include the resource attributes, and MUST NOT include any other labels exceptjobandinstance. - Rewordedrequirementmetrics/sdk.md#exemplarreservoirMUST reworded:
Exemplars MUST retain any attributes available in the measurement that are not preserved by aggregation, view configuration, or theAttributesadvisory parameter for the associated timeseries. - Rewordedrequirementmetrics/sdk.md#instrument-enabledMUST reworded: The synchronous instrument
EnabledMUST returnfalsewhen either: Status: Development - The MeterConfig of theMeterused to create the instrument has parameterenabled=false; All resulting s... - Rewordedrequirementmetrics/sdk.md#measurement-processingSHOULD reworded: The SDK SHOULD use the following logic to determine how to process Measurements made with an Instrument: Determine the
MeterProviderwhich "owns" the Instrument; If theMeterProviderhas no `View... - Rewordedrequirementmetrics/sdk.md#start-timestampsMUST reworded: Cumulative timeseries MUST use a consistent start timestamp for all collection intervals while the series is persisted by the SDK.
- Rewordedrequirementmetrics/sdk.md#start-timestampsSHOULD reworded: For asynchronous instruments, the start timestamp SHOULD be: The creation time of the instrument, if the first series measurement occurred in the first collection interval; Otherwise, the timestamp o...
- Rewordedrequirementmetrics/sdk.md#stream-configurationSHOULD reworded: SDK documentation SHOULD inform users that attributes excluded from a metric stream by View configuration or the
Attributesadvisory parameter may still be exported on Exemplars as filtered attribu... - Rewordedrequirementspecification/versioning-and-stability.md#security-related-changesMAY reworded: Stable SDK and Contrib components MAY make backward-incompatible behavioral changes, change configuration defaults, restrict supported configuration values, or tighten supported runtime or dependency...
- Rewordedrequirementspecification/versioning-and-stability.md#security-related-changesMAY reworded: Such changes MAY be released as security fixes in a minor or patch release, subject to the support requirements in this document.
- Rewordedrequirementspecification/versioning-and-stability.md#security-related-changesMUST reworded: Release notes MUST identify the affected behavior, configuration settings, and runtime or dependency version requirements, describe the previous and new behavior and requirements (including any newly...
- Movedrequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST moved here from "resource-attributes": When scraping a Prometheus endpoint, resource attributes MUST be added to the scraped metrics to distinguish them from metrics from other Prometheus endpoints.
- Movedrequirementcompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullMUST NOT moved here from "resource-attributes": The following attributes SHOULD be associated with scraped metrics as resource attributes, and MUST NOT be added as metric attributes:
- Addedsectioncompatibility/prometheus_and_openmetrics.md#metric-labelsNew section "Metric Labels".
- Addedsectioncompatibility/prometheus_and_openmetrics.md#remote-write-metrics-pushNew section "Remote Write metrics (push)".
- Addedsectioncompatibility/prometheus_and_openmetrics.md#scraping-metrics-pullNew section "Scraping metrics (pull)".
- Addedsectionconfiguration/README.md#sdk-component-namesNew section "SDK component names".
- Addedsectionspecification/library-guidelines.md#automatic-injectionNew section "Automatic Injection".
- Addedsectionspecification/library-guidelines.md#guidance-for-injection-mechanism-contractsNew section "Guidance for injection mechanism contracts".
- Addedsectionmetrics/api.md#instrument-advisory-parameter-optinNew section "Instrument advisory parameter:
OptIn". - Addedsectionmetrics/sdk.md#instrument-advisory-parameter-optinNew section "Instrument advisory parameter:
OptIn". - Addedsectiontrace/api.md#span-typeNew section "Span type".
- Addedsectiontrace/api.md#span-type-syntaxNew section "Span type syntax".
- Addeddocumenttrace/data-model.mdNew document: Traces Data Model (Release Candidate).
- Addedsectiontrace/README.md#specificationsNew section "Specifications".
- Rewrittensectionconfiguration/sdk-environment-variables.md#periodic-exporting-metricreader"Periodic exporting MetricReader" substantially rewritten (739 to 1557 characters).
- Rewrittensectiontrace/sdk.md#sdk-span-creation"SDK Span creation" substantially rewritten (1116 to 1606 characters).