Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Display name validation is misleading #56

@nilebox

Description

@nilebox

There are a few issues with the display name validation:

  1. Display name must be prefixed with opentelemetry/ according to the regex

    displayNameRegex = regexp.MustCompile(`opentelemetry/.*`)
    Why do we check for this? This is not documented in go/ot-gcp-requirements

  2. When display name doesn't match the regex mentioned above, mock server returns the error "displayName has max length of 128 bytes" (see

    statusInvalidDisplayName = status.Error(codes.InvalidArgument,
    fmt.Sprintf("displayName has max length of %v bytes", maxDisplayNameBytes))
    ), which is super misleading: we don't even check for the string length, and should have specified in the error that we expected it to be prefixed with opentelemetry/ or something more user friendly.

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