-
Notifications
You must be signed in to change notification settings - Fork 31
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
Split the otlp module into multiple submodules #183
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
46241e4
add crosslink
dmathieu 9584eea
add go-mod-tidy
dmathieu 150890b
create a new submodule for each proto package
dmathieu 933e404
check crosslink and go mod tidy in CI
dmathieu 6a4669f
run module-check on 1.21
dmathieu e852357
regenerate the go.mod too
dmathieu 37b8b45
drop replace for current module
dmathieu 0c4c1fb
root go module files now need to run crosslink and go-mod-tidy
dmathieu 3b95824
remove toolchain directive
dmathieu cf4fbd1
run ci on 1.21
dmathieu 031dbfa
remove trailing slash in mod init
dmathieu c333a10
no need for root go.mod and go.sum
dmathieu a88fd79
run crosslink on otlp folder only
dmathieu af857aa
drop trailing slach on dropreplace
dmathieu 04ed317
regenerate everything
dmathieu 4d89774
sort the expected otlp modules
dmathieu 8cdf167
run go-mod-tidy before crosslink
dmathieu 819e36b
regenerate dependabot
dmathieu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module go.opentelemetry.io/proto/otlp/collector | ||
|
||
go 1.21.12 | ||
|
||
replace go.opentelemetry.io/proto/otlp/common => ../common | ||
|
||
replace go.opentelemetry.io/proto/otlp/logs => ../logs | ||
|
||
replace go.opentelemetry.io/proto/otlp/metrics => ../metrics | ||
|
||
replace go.opentelemetry.io/proto/otlp/profiles => ../profiles | ||
|
||
replace go.opentelemetry.io/proto/otlp/resource => ../resource | ||
|
||
replace go.opentelemetry.io/proto/otlp/trace => ../trace | ||
|
||
require ( | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 | ||
go.opentelemetry.io/proto/otlp/logs v0.0.0-00010101000000-000000000000 | ||
go.opentelemetry.io/proto/otlp/metrics v0.0.0-00010101000000-000000000000 | ||
go.opentelemetry.io/proto/otlp/profiles v0.0.0-00010101000000-000000000000 | ||
go.opentelemetry.io/proto/otlp/trace v0.0.0-00010101000000-000000000000 | ||
google.golang.org/grpc v1.65.0 | ||
google.golang.org/protobuf v1.34.2 | ||
) | ||
|
||
require ( | ||
go.opentelemetry.io/proto/otlp/common v0.0.0-00010101000000-000000000000 // indirect | ||
go.opentelemetry.io/proto/otlp/resource v0.0.0-00010101000000-000000000000 // indirect | ||
golang.org/x/net v0.25.0 // indirect | ||
golang.org/x/sys v0.20.0 // indirect | ||
golang.org/x/text v0.15.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= | ||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= | ||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= | ||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= | ||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= | ||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= | ||
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= | ||
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= | ||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= | ||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module go.opentelemetry.io/proto/otlp/common | ||
|
||
go 1.21.12 | ||
|
||
require google.golang.org/protobuf v1.34.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= | ||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= | ||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
module go.opentelemetry.io/proto/otlp | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 | ||
google.golang.org/grpc v1.65.0 | ||
google.golang.org/protobuf v1.34.2 | ||
) | ||
|
||
require ( | ||
golang.org/x/net v0.25.0 // indirect | ||
golang.org/x/sys v0.20.0 // indirect | ||
golang.org/x/text v0.15.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect | ||
) | ||
go 1.21.12 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The OTLP HTTP exporters are depending on
go.opentelemetry.io/proto/otlp/collector
.E.g. from
otlptracehttp
: https://github.com/open-telemetry/opentelemetry-go/blob/d4b5396f848504859ba50946e4724b84b71b36a5/exporters/otlp/otlptrace/otlptracehttp/client.go#L128Therefore all actual OTLP exporters will still depend on
google.golang.org/grpc
and it will not help with solving open-telemetry/opentelemetry-go#2579.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.
I think the possible solutions are:
google.golang.org/protobuf
(so thatslim
would work without issues) (mentioned also here)go.opentelemetry.io/proto/otlp/collector
split protobuf messages and gRPC services code from into separate packages and modules (this would be a path more aligned with current proposal)Personally, I would be in favor of trying the option 1 first.
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.
PS. This was my first idea when I was trying to fix open-telemetry/opentelemetry-go#2579. And I created
slim
because of #183 (comment). At that point of time I was totally not aware of https://protobuf.dev/reference/go/faq/#namespace-conflict.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.
You're right about the need for the collector even in HTTP, sorry.
I'll need to investigate more, but this PR, alongside a new
collectorslim
module which only includes the collector slim, and reuses the other data types may solve our registration issue?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.
It could solve the issue. Probably this would require more post-processing after protoc code generation.
However, I would be more in favor of checking if it is possible to solve somehow https://protobuf.dev/reference/go/faq/#namespace-conflict. Then we could simply use the
slim
modules in OTLP HTTP exporters. Moreover, it can also help others dealing with the namespace conflict.