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

Clarification required for Resource attribute values. #1184

Closed
cijothomas opened this issue Nov 2, 2020 · 3 comments
Closed

Clarification required for Resource attribute values. #1184

cijothomas opened this issue Nov 2, 2020 · 3 comments
Labels
area:sdk Related to the SDK bug Something isn't working priority:p2 Medium priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs spec:resource Related to the specification/resource directory

Comments

@cijothomas
Copy link
Member

The ResourceCreation section says the Attributes for Resource follows the common attributes rules, which means value can be string,bool,double,float, array of these.

When Merge faces a collision, it says if the primary has "empty string", override it.
Question: What if primary is not even string? for eg: what if primary is array?

RetrieveAttribute section says the attributes names and values are just strings.
"The attributes should consist of the name and values, both of which should be strings."

Specify Resource from ENV variable says all attrubute values Must be considered strings.
"All attribute values MUST be considered strings."

Is the attribute value for Resource expected to contain just strings only?
Or should it support the common Attribute?
If common, then how should Merge handle collisions?
if common, then how to configure it using ENV variables?

@Oberon00
Copy link
Member

Oberon00 commented Nov 3, 2020

When Merge faces a collision, it says if the primary has "empty string", override it.

I think we should remove this wording. It makes less sense now that resources support different attribute types.

if common, then how to configure it using ENV variables?

I guess we only support strings with the current format. We might want to extend the syntax to support more (e.g. an envvar set to a JSON object string?), but that would be after GA.

@Oberon00 Oberon00 added area:sdk Related to the SDK bug Something isn't working labels Nov 3, 2020
@arminru arminru changed the title Clarifyication required for Resource attribute values. Clarification required for Resource attribute values. Nov 3, 2020
@andrewhsu andrewhsu added priority:p2 Medium priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs labels Nov 3, 2020
@Oberon00
Copy link
Member

Oberon00 commented Jan 15, 2021

#1345 "Make Resource.Merge consistent with Span.SetAttribute" partially resolves this.

@cijothomas
Copy link
Member Author

The current wording in the spec addresses the question in this issue. We can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk Related to the SDK bug Something isn't working priority:p2 Medium priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs spec:resource Related to the specification/resource directory
Projects
None yet
Development

No branches or pull requests

4 participants