Separate protobuf encoding into a separate package#3169
Conversation
...orter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
jack-burridge-cfh
left a comment
There was a problem hiding this comment.
I've also noticed that all log packaged are protected, as in start with _log should this also happen in the common package?
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Show resolved
Hide resolved
5547c24 to
c70248c
Compare
c70248c to
beb7cc2
Compare
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Show resolved
Hide resolved
...porter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py
Show resolved
Hide resolved
...ter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/trace_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...ter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/trace_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...telemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/version.py
Outdated
Show resolved
Hide resolved
exporter/opentelemetry-exporter-otlp-proto-common/tests/test_log_encoder.py
Show resolved
Hide resolved
...orter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/log_encoder/__init__.py
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Show resolved
Hide resolved
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
...orter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...elemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/__init__.py
Outdated
Show resolved
Hide resolved
...orter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/log_encoder/__init__.py
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Show resolved
Hide resolved
...r-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
|
@lzchen @srikanthccv I'm not entirely sure on the namings, at the moment I've added the encoders as:
But I am now thinking:
|
beb7cc2 to
fcfbd68
Compare
e91877c to
e4aa80f
Compare
|
@jack-burridge-cfh you can resolve the outdated conversation if you believe the comment is addressed. I will take a look at the PR again. |
Done |
|
@srikanthccv The issues with the checks seem to be git-based ones which I can't reproduce locally, so I don't know how to fix those |
|
@jack-burridge-cfh |
ce2d186 to
7a746ae
Compare
|
I ran |
|
Overall LGTM. I am thinking about the import paths. It seems like one would end up using aliases if they want to use encoders. |
The decision here was a conscious one, basically most uses will not involve multiple types of encoders, and encourages you to keep them separate. I honestly cannot think of a reason you would, it's more likely an edge case. Like they are used here the encoders are likely to be used to write different types of exporters (Kafka etc) and these exporters are likely to be in different files. |
|
We have been explicit and verbose in the project. You can see it in many places in the project, including the exporters ( |
7a746ae to
96fe119
Compare
Fair point. Done 😄 |
|
LGTM from my side, I will let other approvers take a look once and then merge if they don't have any objections. Thank you for your continuous effort to for addressing the comments and get this merged. |
e827f58 to
0322c32
Compare
...try-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
Outdated
Show resolved
Hide resolved
0322c32 to
76a87f1
Compare
76a87f1 to
179a697
Compare
179a697 to
82a1075
Compare
srikanthccv
left a comment
There was a problem hiding this comment.
Solid refactoring! Thank you.
It's why I use PyCharm 😄 It may be cumbersome but the refactoring is fantastic |
|
@srikanthccv Any reason this cant be merged? or are we waiting for more people to look at it because of the scope of the change? |
Description
This separates Protobuf encoding into a separate package
opentelemetry-exporter-otlp-proto-commonwhich is then used by:opentelemetry-exporter-otlp-proto-grpcopentelemetry-exporter-otlp-proto-httpFixes #3160
Type of change
How Has This Been Tested?
Tests have been moved from
opentelemetry-exporter-otlp-proto-grpcandopentelemetry-exporter-otlp-proto-httpto the new packageChecklist: