opentelemetry-specification icon indicating copy to clipboard operation
opentelemetry-specification copied to clipboard

Identify Links added after Span creation

Open carlosalberto opened this issue 2 years ago • 4 comments

A follow up to #3678 is how to identify Links that have been added after Span creation. One idea has been to achieve this by adding a new timestamp field to the Links proto definition, so:

  1. Links with timestamp = null are Links created at Span creation time (hence were available to the Sampling API)
  2. Links with timestamp != null are links created after Span creation time.

This has been also indirectly discussed as part of #2918 - any chance to have the sampling working group discuss this, in case the aforementioned approach doesn't quite suit their needs?

cc @jmacd

carlosalberto avatar Sep 20 '23 14:09 carlosalberto

@carlosalberto are you going to work on this or we need help?

tigrannajaryan avatar Nov 01 '23 14:11 tigrannajaryan

We need to also identify links created before span creation since some SDKs might already be adding them after creation, so the status of all links at present is "unknown whether before or after creation"

Oberon00 avatar Nov 02 '23 08:11 Oberon00

since some SDKs might already be adding them after creation

That sounds like off-spec behavior. I agree, however, that "unknown whether before or after creation" is acceptable for consumers. SDKs themselves are going to know the status of the link, since they created it, so in-SDK functionality is surely able to use this distinction whether it's recorded or not.

jmacd avatar Feb 14 '24 16:02 jmacd

@carlosalberto will you be the sponsor for this one?

svrnm avatar May 06 '24 09:05 svrnm