Missing exporter packages in 0.21.0 appear to break Go 1.11 modules?
bgould opened this issue · 3 comments
I apologize in advance if my terminology is not precise, but the crux of the issue is that my build is broken by the v0.21.0 because it appears some exporters/* packages were removed. I don't have a need to upgrade per se, but it seems like the Go tool when using modules has decided that it should be able to update to 0.21.0 safely; if I have this in my go.mod:
require (
...
go.opencensus.io v0.20.2
...
)
and then I run:
go get -u
on my project, I am not getting errors about the missing exporter packages in my build:
go: finding go.opencensus.io/exporter/zipkin latest
go: finding go.opencensus.io/exporter/prometheus latest
go: finding go.opencensus.io/exporter latest
build command-line-arguments: cannot load go.opencensus.io/exporter/prometheus: cannot find module providing package go.opencensus.io/exporter/prometheus
I am under the impression that bumping a version from 0.20.x to 0.21.x should be non-breaking in the situation described above. I'm willing to accept that my impression or my workflow is incorrect, but in any case it is not clear to me what the proper workflow or upgrade procedure should be, or even what to replace these missing packages with in my code.
I really like your project BTW :)
Hi @bgould
I am under the impression that bumping a version from 0.20.x to 0.21.x should be non-breaking in the situation described above.
Unfortunately this will be a breaking change if you're upgrading to v0.21.0. We removed all exporters from core and moved them to their own repos. The vanity urls of exporters have also been updated. For example if you imported go.opencensus.io/exporter/prometheus
before, after v0.21.0 this should be updated to contrib.go.opencensus.io/exporter/prometheus
(also in the go.mod file you may want to include them). See the release notes from https://github.com/census-instrumentation/opencensus-go/releases/tag/v0.21.0:
Prometheus, zipkin and jaeger exporters are removed from go.opencensus.io and are moved contrib.go.opencensus.io. This is another breaking change ONLY if the version is not locked using either go.sum or Gopkg.lock
We apologize for the extra work that it has brought when upgrading to v0.21.0, but moving forward we think it's the right way to go to keep core independent of vendor dependencies. Like @rakyll mentioned:
(Exporters in this repo) is a huge burden in terms of dependencies. And making the core free from any vendor dependencies would fit the goals of vendor-agnosticness much better.
#wontfix : As @songy23 explained above, this is expected breaking change to make core lib independent of vendor dependent exporters.
Awesome, thank you for the explanation. I guess I should have checked the release notes, I suppose I just didn't think to look there because I wasn't actively trying to upgrade this particular library. Will update my code to point to contrib.
Thanks again!