Abstract out OTLP http exporter logic#5160
Conversation
|
/easycla |
2a75552 to
4405d3e
Compare
There was a problem hiding this comment.
I would recommend reconsidering your approach here. I'm generally not a huge fan of having functions with a huge number of arguments. I'd generally be more in favor of creating a common OTLPHttpClient, as is done in this PR
I was thinking the same but looking around I thought that the implemented method was the one expected. I can convert with a common client class. Thanks for the review |
|
I moved these 3 public constants: from each exporter (Log, Metric, Trace) into the common one but this Q: What is the right process in this cases? |
| break | ||
| return LogRecordExportResult.FAILURE | ||
| return ( | ||
| LogRecordExportResult.SUCCESS |
There was a problem hiding this comment.
can this Enum be part of _SignalConfig and returned directly from OTLPHttpClient
There was a problem hiding this comment.
Could be but I don't like to much that the parent needs to know children. This because you need to specify a list of types but what about in the future I want to add a new type of exporter? I should edit also the parent class.
What do you think?
@herin049 @lorenzoronzani I want to make sure we're not duplicating effort. It looks like you closed #5051, was that in favor of this PR? |
@aabmass I actually closed out that PR to switch to #5194, given that this sounds like the direction that the SIG wants to go. It'd be better if this functionality is broken off into a separate package in order to support the work in #1003. I would suggest we close this PR or mark it as draft for now and see if we need to re-open it later. |
Assuming we're OK with the approach in #5194, then it will be a pre-requisite to implementing the final OTLP JSON exporter package, and can also be used to simultaneously close #2990. |
@herin049 @aabmass thank for the review. |
Description
This PR contains the refactoring required inside the
http_exporter_logiccomponent. The idea is to remove the duplicated code abstracting out inside a common sectionFixes #2990
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
uv run tox -e py312-test-opentelemetry-exporter-otlp-proto-httpDoes This PR Require a Contrib Repo Change?
Checklist: