Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: rename "Resources" to "StaticContext" #239

Closed
toumorokoshi opened this issue Sep 1, 2019 · 7 comments
Closed

Proposal: rename "Resources" to "StaticContext" #239

toumorokoshi opened this issue Sep 1, 2019 · 7 comments
Labels
area:api Cross language API specification issue release:after-ga Not required before GA release, and not going to work on before GA spec:resource Related to the specification/resource directory
Milestone

Comments

@toumorokoshi
Copy link
Member

I was running through the propagators, and I think it would be worth considering renaming "Resources" to "StaticContext".

Motivation:

  1. Resources effectively are a set of labels that are static for the lifetime of the application. As there is currently no way to represent other values that are static for the lifetime of the application, people will add Resources that have nothing to do with the underlying 'resource' (e.g, environment or version).

  2. When one is constructing a set of labels to attach to some piece of telemetry (logs, traces, etc), they will be extracted from the various "Context" objects. by calling this StaticContext, it immediately signals to consumers of labels that this is another pool of values they can retrieve context from. i.e. you could switch from:

  • you can pull telemetry tags from SpanContext, DistributedContext, and Resources
    to:

  • you can pull telemetry tags from any of the contexts: SpanContext, DistributedContext, and StaticContext.

@jmacd
Copy link
Contributor

jmacd commented Dec 4, 2019

There is a working group on this topic: https://gitter.im/open-telemetry/resources-wg

@jmacd
Copy link
Contributor

jmacd commented Dec 4, 2019

See also #61

@carlosalberto
Copy link
Contributor

Any update on this?

@carlosalberto carlosalberto modified the milestones: Alpha v0.3, Alpha v0.4 Jan 28, 2020
@bogdandrutu
Copy link
Member

This is not the main idea of the Resource as defined initially. Probably we can have 2 things "Resource" + "StaticContext", resource is important to be focus on identifying the source of the telemetry to allow resource correlation between signals (even when not collected from the app, like reading logs from a file).

@toumorokoshi
Copy link
Member Author

I'm curious what the distinction there serves, from a behavioral perspective. The reason I was arguing for this change was because of the behavior and situations by which resources are used: as a way to include additional metadata to all forms of telemetry emitted by a system.

I'm curious if "Resources" is more of a semantic convention, while "StaticContext" is the behavior / system by which it is built off of. But again this is an exploration.

I'm curious about thoughts of where other tags that exist for the lifetime of an application may live, such as "version" or "environment". Would you not add that into something like Resources, to ensure that data propagates to systems like metrics?

@jmacd
Copy link
Contributor

jmacd commented May 27, 2020

I support the conclusion that resources as they are currently specified are equal to static context. I disagree with the notion that attributes or labels placed into the resources are semantically different than other attributes and labels associated with a spans and metrics.

Suppose I tag an RPC span with "transport:grpc"? It's a resource. Suppose I have another code path that uses "transport:thrift"? It's a resource.

Now suppose I split my binary into two, with one for each transport. Now I'm going to change my telemetry so that all spans from the first process have "transport:grpc" and all spans from the second process have "transport:thrift". There are no semantic differences before and after this change.

I want to remind us of my proposal to support multiple resources: open-telemetry/oteps#78. There, I chose the term "resource scope" as opposed to "static context", but I also like the term "static context" as it is opposed to "dynamic context". In programming languages, a similar concept is "lexical scope", which is how I arrived at the term "resource scope".

@carlosalberto carlosalberto modified the milestones: v0.5, v0.6 Jun 9, 2020
@bogdandrutu bogdandrutu added the spec:resource Related to the specification/resource directory label Jun 12, 2020
@reyang reyang added area:api Cross language API specification issue release:after-ga Not required before GA release, and not going to work on before GA labels Jul 10, 2020
@tigrannajaryan
Copy link
Member

I am going to close this since the Resource is far too entrenched in Otel to just rename it. Any change in this area will need an OTEP.

@Oberon00 Oberon00 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue release:after-ga Not required before GA release, and not going to work on before GA spec:resource Related to the specification/resource directory
Projects
None yet
Development

No branches or pull requests

7 participants