Skip to content
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

Organize API into Go modules based on stability and dependencies #1528

Merged
merged 6 commits into from
Feb 12, 2021

Conversation

punya
Copy link
Member

@punya punya commented Feb 11, 2021

Fixes #1467.

This PR

  1. Create modules at otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (lots of cyclic dependencies).
  2. Move GetMeterProvider, Meter and SetMeterProvider from otel to otel/metric/global.

Future work

  1. Mark otel, otel/trace, otel/sdk as v1.0.
  2. In future when we release Metrics as a stable signal, leave the meter-related functions in otel/metric - at most, add funcs in otel that forward to them.

Reviewers: I recommend looking at this commit-by-commit instead of as a combined diff.

@codecov
Copy link

codecov bot commented Feb 11, 2021

Codecov Report

Merging #1528 (3da34ae) into main (e50a1c8) will decrease coverage by 1.2%.
The diff coverage is 0.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #1528     +/-   ##
=======================================
- Coverage   79.0%   77.7%   -1.3%     
=======================================
  Files        127     127             
  Lines       6683    6683             
=======================================
- Hits        5280    5195     -85     
- Misses      1148    1244     +96     
+ Partials     255     244     -11     
Impacted Files Coverage Δ
exporters/metric/prometheus/prometheus.go 64.8% <0.0%> (ø)
exporters/stdout/exporter.go 17.2% <0.0%> (ø)
metric/global/metric.go 100.0% <ø> (ø)
internal/matchers/expecter.go 0.0% <0.0%> (-100.0%) ⬇️
internal/internaltest/errors.go 0.0% <0.0%> (-100.0%) ⬇️
sdk/export/metric/aggregation/aggregation.go 0.0% <0.0%> (-100.0%) ⬇️
sdk/export/metric/metric.go 36.8% <0.0%> (-60.6%) ⬇️
sdk/export/metric/exportkind_string.go 0.0% <0.0%> (-57.2%) ⬇️
trace/config.go 75.8% <0.0%> (-24.2%) ⬇️
internal/matchers/expectation.go 0.0% <0.0%> (-19.0%) ⬇️
... and 4 more

metric/go.mod Outdated Show resolved Hide resolved
@punya punya changed the title Move metric-related public API out of otel/ pkg Organize API into Go modules based on stability and dependencies Feb 11, 2021
* otel/metric
* otel/trace
* otel/oteltest
* otel/sdk/export/metric
* otel/sdk/metric

Relates to open-telemetry#1467
Move GetMeterProvider, Meter and SetMeterProvider to new package
otel/metric/global in the otel/metric module.

This will allow otel/ module to be released as v1.0.
@punya punya force-pushed the migrate-metric-funcs branch from 420e00a to de91005 Compare February 11, 2021 19:18
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias merged commit 9b242bc into open-telemetry:main Feb 12, 2021
@MrAlias MrAlias mentioned this pull request Feb 12, 2021
@punya punya deleted the migrate-metric-funcs branch February 12, 2021 19:44
ldelossa pushed a commit to ldelossa/opentelemetry-go that referenced this pull request Mar 5, 2021
…n-telemetry#1528)

* Add a tool to auto-generate replace directives

* Auto-generated changes from previous commit

* Create new modules required for trace release

* otel/metric
* otel/trace
* otel/oteltest
* otel/sdk/export/metric
* otel/sdk/metric

Relates to open-telemetry#1467

* Move metric-related public API out of otel/ pkg

Move GetMeterProvider, Meter and SetMeterProvider to new package
otel/metric/global in the otel/metric module.

This will allow otel/ module to be released as v1.0.

* Include PR references in CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Check for root dir

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organize API into Go modules based on stability and dependencies
5 participants