-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add debug exporter, move code from logging exporter into internal #8378
add debug exporter, move code from logging exporter into internal #8378
Conversation
@dmitryax @jpkrohling please have a look at this PR as an alternative to "aliasing" the logging exporter. Pros:
Cons:
|
Codecov ReportPatch coverage is 📢 Thoughts on this report? Let us know!. |
"go.opentelemetry.io/collector/pdata/ptrace" | ||
) | ||
|
||
type debugExporter struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we move this one to internal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, it just didn't seem to really fit, i guess i could create an exporter/internal/loggingcommonexporter
package or something like it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, something like that. I'm just thinking of how we can reduce the code duplication. Looks like it's technically possible. If so, I'd merge this PR and do that later rather than #8375
Is this to address this comment?
If so, wouldn't it be sufficient to move the code from logging to debugging, keeping logging as the wrapper to the new one? |
@jpkrohling the advantages are really not having to create a dependency between the two modules moving forward and avoiding having to add a public method. With the latest change, there's little code duplication. PTAL |
Is it a big problem? I mean, you are in the end creating the same dependency through a proxy, which is the common library, no? If you change the debug exporter, we need to either change the common library or fork the code, which is pretty much what we'd have to do if we had the logging exporter wrapping the debug exporter.
It was caused by the desire to share the createDefaultConfig implementation in the factory, right? It's such a small function. Wouldn't it be worth just having two implementations of it and of the factory? The logging exporter's factory could just use the debug exporter's factory. Wouldn't it work? |
916e9ba
to
ddf1c6c
Compare
Signed-off-by: Alex Boten <[email protected]>
3c1e873
to
bc5f5e0
Compare
Alternative to #8375
This moves most of the code from the logging exporter into two internal packages that will eventually end up in the
debugexporter
once theloggingexporter
has been removed.Fixes #7769