You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can one test a complex SDK setup (e.g. check that a trace provider uses given exporter)?
We could enhance the OTel Go SDK by adding exported getters and also by exporting some types. This would allow inspecting in the tests if the created SDK components are build as expected.
We do not want to add access to all components used or created by the SDK as then the user could try to use them outside of the context of the SDK. This may cause invalid behaviors (e.g. race conditions). Moreover, it may be not compliant with the SDK specification.
We propose to use reflect package for structural inspection. We suggest to extract all reflection code to some helpers to minimize the impact when the internals of the SDK change.
How can one test a complex SDK setup (e.g. check that a trace provider uses given exporter)?
We could enhance the OTel Go SDK by adding exported getters and also by exporting some types. This would allow inspecting in the tests if the created SDK components are build as expected.
Reference: https://blog.ploeh.dk/2013/04/04/structural-inspection/
Originally posted by @pellared in open-telemetry/opentelemetry-go-contrib#4414 (comment)
The text was updated successfully, but these errors were encountered: