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

Allow resources as span attributes #274

Open
Oberon00 opened this issue Sep 30, 2019 · 10 comments
Open

Allow resources as span attributes #274

Oberon00 opened this issue Sep 30, 2019 · 10 comments
Labels
area:semantic-conventions Related to semantic conventions 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

@Oberon00
Copy link
Member

See #263 (comment).

For some types of spans (e.g. HTTP server) there is potentially a lot of information that can be different from span to span, but there is only a low number of combinations for each process. For example, it would make sense to have http.app_info attribute the value of which is a resource that contains information such as an application root, server name, application name, server port (see linked PR).

@bogdandrutu
Copy link
Member

Please clarify what an "Application" is. Is that a "http.route"?

@bogdandrutu bogdandrutu added this to the Alpha v0.3 milestone Sep 30, 2019
@Oberon00
Copy link
Member Author

See my new comments: #263 (comment)

@Oberon00
Copy link
Member Author

Some clarifications (from #263 (comment)):

Basically the problem with the app attributes is that in many scenarios (admittedly, probably most) they will have the same values every time they are set. However, I think there are scenarios in which there are multiple apps within the same process, and that's why I disagree with your statement that these attributes "clearly" belong to resources. In these cases we can't use the resources concept which is process-wide, because we have no way to indicate which app the span belongs too.

My goal with #274 would be to have just a single attribute "http.app_info" or similar the value of which is a (reference to a) process-wide app resource. Then you can use the process-wide resources to enumerate all the apps in the process and still know to which app the span belongs. Logically, I think that the app attributes would be perfectly fine as-is, but from a performance-perspective I can see that having them grouped together or transferred as a resource reference can have advantages.

Of course that attribute would not be inherited, just like a string attribute is not inherited.

@SergeyKanzhelev SergeyKanzhelev added the area:semantic-conventions Related to semantic conventions label Dec 3, 2019
@carlosalberto
Copy link
Contributor

Hey @Oberon00 what's the state of this? can we close it? If not, what remains to be done?

@Oberon00
Copy link
Member Author

Well, #421 and open-telemetry/oteps#66 could both be helpful when designing a solution, but nothing has been done explicitly to solve this issue and the initial description still applies.

I think of this primarily as a potential solution to #335, which I would still love to be solved.

@jmacd
Copy link
Contributor

jmacd commented Jan 28, 2020

Related proposal: open-telemetry/oteps#78

@carlosalberto
Copy link
Contributor

Moving this to the next milestone.

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

This sounds more like having complex values for attributes and not necessarily resources?

I like @jmacd's otep. For a simpler approach I was going to propose being able to attach a Resource to either the context or named tracer.

@Oberon00
Copy link
Member Author

@tsloughter Why complex values? This is only about not needing to send the data for each Span but only once per batch (or less).

@tsloughter
Copy link
Member

@Oberon00 ah, didn't consider batching since it would be on individual spans. Now I get it why it is more than just key/value pairs for the value of an attribute.

I'd like something like this, or jmacd's otep (or just tie the resource to a context so all spans in that context use it). My use is processes in Erlang nodes that are long lived and can represent their own "service". So would want to have spans created in that process have a resource with serivce.name specific to the process.

@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 the release:after-ga Not required before GA release, and not going to work on before GA label Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions 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