wavefrontHQ / wavefront-sdk-go

Wavefront Core Go SDK
Apache License 2.0
4 stars 21 forks source link

feat: allow users to opt out of internal SDK metrics #143

Closed LukeWinikates closed 1 year ago

LukeWinikates commented 1 year ago

See #35

suprajanarasimhan commented 1 year ago

If this PR is too big, I can try to spend time to separate the code changes into more chunks. Since it would take some effort to do this, I was thinking of waiting for a reviewer to determine whether they would prefer chunks.

suprajanarasimhan commented 1 year ago

@suprajanarasimhan what do you think about moving a few of these files into a sub-package to make the organization more obvious:

registry, real_metric_registry, and noop_registry could all move from internal to internal/sdkmetrics or something like that.

~I like it because this would really highlight the bigger picture purpose of these files. Do you mind if I try that move? I've never dealt with sub-packages before and I think it would be a good learning experience. (I don't have time to do it today, but I could revisit this tomorrow morning).~

Update: I did this. I also moved one more file from package internal to package sdkmetrics: metrics.go.

suprajanarasimhan commented 1 year ago

Thanks a lot for the first round of comments, @LukeWinikates! I think it exposed me to some helpful practices and patterns.