Description
Description
Many of our types make use of private fields/methods, or implement methods that are public, but actually only intended for "package private" use. It frequently happens that end-users access these regardless since they're not marked as "conventionally private" (starting with an underscore _
). We should ensure that any properties that fit the above criteria are marked as "conventionally private" too.
We should do this even in places where the actual type is not exported from the package, since the object itself may still be accessible to the end-users (an example for this would be ProxyLoggerProvider
if made internal by #5733)
This issue is considered done when
- all instances of this have been addressed in the
@opentelemetry/api-logs
package
Addtional context
Examples (non-exhaustive list):
ProxyLoggerProvider#getDelegate()
is implicitlypublic
but is actually intended to be package-privateProxyLoggerProvider#setDelegate()
is implicitlypublic
but is actually intended to be package-privateProxyLoggerProvider#getDelegateLogger()
is implicitlypublic
but is actually intended to be package-private- These properties seem to be intended to be package-private:
opentelemetry-js/experimental/packages/api-logs/src/ProxyLogger.ts
Lines 28 to 30 in 22bc5ba