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

Clarify what does wildcard mean in the Metrics SDK View #2325

Merged
merged 6 commits into from
Feb 11, 2022

Conversation

reyang
Copy link
Member

@reyang reyang commented Feb 8, 2022

Discussed in the 2/28/2022 Specification SIG Meeting.

  • Clarified what does wildcard mean.

@reyang reyang requested review from a team as code owners February 8, 2022 17:33
@reyang reyang added area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory labels Feb 8, 2022
@reyang reyang added this to In progress in Spec - Metrics API/SDK Stable Release via automation Feb 8, 2022
@reyang reyang added this to the Metrics API/SDK Stable Release milestone Feb 8, 2022
reyang and others added 2 commits February 8, 2022 10:50
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
@ocelotl
Copy link
Contributor

ocelotl commented Feb 9, 2022

Hey, don't we need also an escape character to be defined here? What if a name includes * or ??

@reyang
Copy link
Member Author

reyang commented Feb 9, 2022

Hey, don't we need also an escape character to be defined here? What if a name includes * or ??

Instrument names have restrictions, * and ? are both illegal characters.

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good this is how JS was already implemented

@jmacd
Copy link
Contributor

jmacd commented Feb 10, 2022

If a language provides a shell Glob() function that is readily available, and implements the two characters specified here (? and *) but also provides more matching behavior, is an implementation permitted to use the existing matcher function instead of implementing exactly what is specified here?

Otherwise, we should give an algorithm for implementing this matcher. 😁

@Aneurysm9
Copy link
Member

Otherwise, we should give an algorithm for implementing this matcher. 😁

Is this sufficient?

$input = "foo*bar?"
$input =~ s/\?/./g
$input =~ s/\*/.*/g
matchRe = /^$input$/ # /^foo.*bar.$/

@jmacd jmacd merged commit a1aa19c into open-telemetry:main Feb 11, 2022
Spec - Metrics API/SDK Stable Release automation moved this from In progress to Done Feb 11, 2022
@reyang reyang deleted the reyang/metrics-sdk-wildcard branch April 17, 2022 00:48
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 spec:metrics Related to the specification/metrics directory
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet