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 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 the Metrics API/SDK Stable Release milestone Feb 8, 2022
@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
@reyang reyang deleted the reyang/metrics-sdk-wildcard branch April 17, 2022 00:48
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…ry#2325)

* Clarify what does wildcard mean in the Metrics SDK View

* changelog

* Update specification/metrics/sdk.md

Co-authored-by: Diego Hurtado <[email protected]>

* feedback

* fix url

Co-authored-by: Diego Hurtado <[email protected]>
Co-authored-by: Joshua MacDonald <[email protected]>
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
None yet
Development

Successfully merging this pull request may close these issues.