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

MeterProvider support for adding multiple Meter sources with wildcard support. #2377

Closed
cijothomas opened this issue Sep 17, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Good for taking. Extra help will be provided by maintainers metrics Metrics signal related

Comments

@cijothomas
Copy link
Member

Similar to Traces
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/Trace/TracerProviderSdk.cs#L161

@cijothomas cijothomas added enhancement New feature or request help wanted Good for taking. Extra help will be provided by maintainers metrics Metrics signal related labels Sep 17, 2021
@Yun-Ting
Copy link
Contributor

I will be working on this issue.

@mic-max
Copy link
Contributor

mic-max commented Sep 22, 2021

Looks like the Trace wildcard mode has a bug

// Validation of source name is already done in builder.

wildcardMode is only set based on the last name in the sources containing a "*" rather than any of them containing that character.
What are the projects thoughts on using Linq? I have heard that the performance is not as good but in cases like this writing something like this would be more understandable to me:

var wildcardMode = sources.Any(name => name.Contains("*"));

@cijothomas
Copy link
Member Author

Could you describe why you believe there is a bug? wildCardMode is set to true, if any source has *, not just the last one... (Though I think we can break out, if wildCardMode is once set to true..)

@mic-max
Copy link
Contributor

mic-max commented Sep 23, 2021

My bad, yes you're right. Yes breaking out here would give us the same result 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Good for taking. Extra help will be provided by maintainers metrics Metrics signal related
Projects
None yet
Development

No branches or pull requests

3 participants