From e48fd21635c8bfa81e0620655647d3c7934cd2ec Mon Sep 17 00:00:00 2001 From: Nikita Salnikov-Tarnovski Date: Fri, 31 Jul 2020 17:12:49 +0300 Subject: [PATCH 1/3] Remove warnings about Span.UpdateName --- specification/trace/api.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index fbefc8dcd9c..ba05c5b208e 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -415,6 +415,11 @@ clearing the previous value and dropping the attribute key from the set of attri Note that the OpenTelemetry project documents certain ["standard attributes"](semantic_conventions/README.md) that have prescribed semantic meanings. +Note that [samplers](sdk.md#sampler) can only consider information already +present during span creation. Any changes done later, including new or changed +attributes, cannot be considered for sampling. + + #### Add Events A `Span` MUST have the ability to add events. Events have a time associated @@ -464,15 +469,9 @@ The Span interface MUST provide: Updates the `Span` name. Upon this update, any sampling behavior based on `Span` name will depend on the implementation. -It is highly discouraged to update the name of a `Span` after its creation. -`Span` name is often used to group, filter and identify the logical groups of -spans. And often, filtering logic will be implemented before the `Span` creation -for performance reasons. Thus the name update may interfere with this logic. - -The function name is called `UpdateName` to differentiate this function from the -regular property setter. It emphasizes that this operation signifies a major -change for a `Span` and may lead to re-calculation of sampling or filtering -decisions made previously depending on the implementation. +Note that [samplers](sdk.md#sampler) can only consider information already +present during span creation. Any changes done later, including updated span +name, cannot be considered for sampling. Alternatives for the name update may be late `Span` creation, when Span is started with the explicit timestamp from the past at the moment where the final From fd86afaa6e930073cda88e29aa16e7cfa86d0ebc Mon Sep 17 00:00:00 2001 From: Nikita Salnikov-Tarnovski Date: Fri, 31 Jul 2020 22:04:35 +0300 Subject: [PATCH 2/3] Better wording about samplers decisions --- specification/trace/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index ba05c5b208e..a8d59af3e77 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -417,7 +417,7 @@ attributes"](semantic_conventions/README.md) that have prescribed semantic meani Note that [samplers](sdk.md#sampler) can only consider information already present during span creation. Any changes done later, including new or changed -attributes, cannot be considered for sampling. +attributes, cannot change their decisions. #### Add Events @@ -471,7 +471,7 @@ name will depend on the implementation. Note that [samplers](sdk.md#sampler) can only consider information already present during span creation. Any changes done later, including updated span -name, cannot be considered for sampling. +name, cannot change their decisions. Alternatives for the name update may be late `Span` creation, when Span is started with the explicit timestamp from the past at the moment where the final From 9de272156c290fcb3c60d4d2ff729acf834119ba Mon Sep 17 00:00:00 2001 From: Nikita Salnikov-Tarnovski Date: Fri, 31 Jul 2020 22:27:48 +0300 Subject: [PATCH 3/3] Better wording about samplers decisions --- specification/trace/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index a8d59af3e77..49eea2b1d7e 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -415,7 +415,7 @@ clearing the previous value and dropping the attribute key from the set of attri Note that the OpenTelemetry project documents certain ["standard attributes"](semantic_conventions/README.md) that have prescribed semantic meanings. -Note that [samplers](sdk.md#sampler) can only consider information already +Note that [Samplers](sdk.md#sampler) can only consider information already present during span creation. Any changes done later, including new or changed attributes, cannot change their decisions. @@ -469,7 +469,7 @@ The Span interface MUST provide: Updates the `Span` name. Upon this update, any sampling behavior based on `Span` name will depend on the implementation. -Note that [samplers](sdk.md#sampler) can only consider information already +Note that [Samplers](sdk.md#sampler) can only consider information already present during span creation. Any changes done later, including updated span name, cannot change their decisions.