-
Notifications
You must be signed in to change notification settings - Fork 495
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
Instrumentation scope - move to builder pattern? #1527
Comments
Have reached out to @izquierdo to look into this. Thanks in advance! |
In general we should try to have builder pattern for object creation since variatic arguments aren't available. |
I would like some design input regarding the builders. Since the builder requires a
Any opinions on which approach is best? Or maybe another approach I haven't considered? I'm leaning towards the Once a path has been decided I will clean up that PR by:
|
It think the first option is better, especially considering the "self-contained" concern you raised. #[derive(Debug)]
pub struct TracerBuilder1<'a, T: TracerProvider> {
provider: &'a T,
library_builder: InstrumentationLibraryBuilder,
} Also, we should maybe only expose |
Reopening as we still need to do the same for Metrics too. Logs/Traces are completed via #1567 |
@stormshield-fabs has agreed to implement this for Metrics. This is a breaking change to the API, so would prefer to do as much of them before beta! |
Proposed changes in 5/21 community calls
|
Not sure why The following is the current API for tracer...
I'll watch the recording from the last part of the call I missed and get back. |
@stormshield-fabs 's concern was we will repeat the In generally I think we need some kind of "namespace" in builder patterns. If one builder takes all information for the field of their field then I worry the builder functions number will be too large to quickly find the configuration needed. Where do we draw the line in terms of which info should stay as a separate struct with their own builder/constructor is the question |
5/28 SIG meeting: |
Added this issue in Logs beta release milestone, as it involves deprecating/removing below method from Logs Bridge API surface:
|
#1021 added supported for Attributes to instrumentation scope, which already had version, schema_url.
This started with just name and evolved to add more and more (because spec added them). #1021 (comment) called out the need for potentially making this to a builder pattern, so as to protect us from breaking change in the future, if there are more stuff added to scope.
Opening an issue to explore if moving to builder pattern makes sense here (all 3 signals), and if yes, implement the actual change.
Also, there could be other places where such changes are required to make things cleaner/more idiomatic and also protect from future breaking changes.
The text was updated successfully, but these errors were encountered: