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

Display name validation is misleading #56

Open
nilebox opened this issue Sep 8, 2020 · 1 comment
Open

Display name validation is misleading #56

nilebox opened this issue Sep 8, 2020 · 1 comment

Comments

@nilebox
Copy link

nilebox commented Sep 8, 2020

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.

@aabmass
Copy link

aabmass commented Oct 23, 2020

I noticed the same

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants