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

ResourceAttributes type does not comply with spec #2907

Closed
blumamir opened this issue Apr 19, 2022 · 1 comment · Fixed by #2924
Closed

ResourceAttributes type does not comply with spec #2907

blumamir opened this issue Apr 19, 2022 · 1 comment · Fixed by #2924
Assignees
Labels
bug Something isn't working

Comments

@blumamir
Copy link
Member

The type for ResourceAttributes is defended here as:

/** Interface for Resource attributes  */
export interface ResourceAttributes {
  [key: string]: number | string | boolean;
}

However, the spec says here that:

A Resource is an immutable representation of the entity producing telemetry as Attributes

And when following the "Attributes" link it says:

The attribute value is either:

  • A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
  • An array of primitive type values. The array MUST be homogeneous, i.e., it MUST NOT contain values of different types.

It seems to me that according to spec, the ResourceAttributes should be identical to SpanAttributes (or just Attributes for api > 1.1.0). e.g. - it should also allow arrays of homogeneous primitives.

Is it intentional?

@blumamir blumamir added the bug Something isn't working label Apr 19, 2022
@dyladan
Copy link
Member

dyladan commented Apr 19, 2022

No likely not intentional

@blumamir blumamir added the up-for-grabs Good for taking. Extra help will be provided by maintainers label Apr 19, 2022
@dyladan dyladan changed the title ResourceAttributes type does not compile with spec ResourceAttributes type does not comply with spec Apr 20, 2022
@dyladan dyladan added the good first issue Good for newcomers label Apr 20, 2022
@dyladan dyladan removed the up-for-grabs Good for taking. Extra help will be provided by maintainers label Apr 20, 2022
@blumamir blumamir removed the good first issue Good for newcomers label Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants