Skip to content

MAX_DIMENSIONS should be 9, not 10 #19

Closed
@dlenski

Description

@dlenski

Per the upstream docs:

A DimensionSet MUST NOT contain more than 9 dimension keys.

Currently, you're setting MAX_DIMENSIONS to 10:

… and then using that to truncate the dimension set to 10 entries when serializing, e.g.:

def serialize(context: MetricsContext) -> str:
dimension_keys = []
dimensions_properties: Dict[str, str] = {}
for dimension_set in context.get_dimensions():
keys = list(dimension_set.keys())
dimension_keys.append(keys[0:MAX_DIMENSIONS])
dimensions_properties = {**dimensions_properties, **dimension_set}

I'm not sure that “silently truncating the dimension set” to an acceptable size is the best solution, but in any case the MAX_DIMENSIONS should be reduced to 9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions