candlelight primarily concerns itself with tracing. Therefore, putting trace in exported names is redundant. ConfigureTracerProvider and TraceMiddleware would be better as ConfigureProvider and Middleware respectively.
The motivation is how this code looks from a client perspective. Recall that in golang, one cannot elide the package name. A client sees candlelight.ConfigureTracerProvider and candlelight.TraceMiddleware. Both are overly verbose if the candlelight package doesn't create any other kinds of provider or middleware.
Additionally, if ConfigureProvider is playing the role of a constructor, then NewProvider would be a better name.
Excellent guidance on naming is in Effective Go:
https://golang.org/doc/effective_go#names
candlelightprimarily concerns itself with tracing. Therefore, puttingtracein exported names is redundant.ConfigureTracerProviderandTraceMiddlewarewould be better asConfigureProviderandMiddlewarerespectively.The motivation is how this code looks from a client perspective. Recall that in
golang, one cannot elide the package name. A client seescandlelight.ConfigureTracerProviderandcandlelight.TraceMiddleware. Both are overly verbose if thecandlelightpackage doesn't create any other kinds of provider or middleware.Additionally, if
ConfigureProvideris playing the role of a constructor, thenNewProviderwould be a better name.Excellent guidance on naming is in Effective Go:
https://golang.org/doc/effective_go#names