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

Merge metric SDK development branch "new_sdk/main" into "main" #3175

Merged
merged 81 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
9ced1b9
Remove Old SDK and dependent code on that SDK (#2802)
MrAlias Apr 20, 2022
7f0afe7
Remove the number and aggregator from the metric SDK (#2840)
MadVikingGod Apr 21, 2022
0dc2bbf
Add MeterProvider/meter structure to new SDK (#2822)
MrAlias May 2, 2022
ac0b13f
Add sdk/metric/view structure (#2838)
MrAlias May 2, 2022
a3253d0
Define the reader interface, and create a manual reader (#2885)
MadVikingGod May 13, 2022
8972d8a
Refactor reader testing into a harness (#2910)
MrAlias May 18, 2022
a7d8592
Merge branch 'main' into new_sdk/main
MrAlias May 18, 2022
77f9f08
Removed merge leftover
MrAlias May 19, 2022
e591cca
Use opentracing bridge from main
MrAlias May 19, 2022
2396e1c
go mod tidy
MrAlias May 19, 2022
84e52ec
crosslink
MrAlias May 19, 2022
c7f26ed
Remove Prometheus exporter from README for now
MrAlias May 19, 2022
8ac0588
Run make with new tool set
MrAlias May 19, 2022
499ef24
Merge pull request #2913 from MrAlias/merge-main-to-new_sdk-main
hanyuancheung May 20, 2022
3203a04
Replace testReaderHarness with testify suite (#2915)
MrAlias May 20, 2022
9e45f76
Add the periodic reader (#2909)
MrAlias May 21, 2022
dd886b0
Test duplicate Reader registration (#2914)
MrAlias May 21, 2022
39fe636
Add WithReader and WithResource Options (#2905)
MrAlias May 21, 2022
46bf817
Add bench test for reader collect methods (#2922)
MrAlias May 24, 2022
73e512c
Unify reader implementations (#2923)
MrAlias May 25, 2022
81c8424
Merge main into new sdk main (#2925)
MrAlias May 26, 2022
00caf29
Add view to metrics. (#2926)
MadVikingGod Jun 8, 2022
0c857a3
Implement MeterProvider's Meter method (#2945)
MrAlias Jun 8, 2022
2aee92c
Initialize MeterProvider readers field for new (#2948)
MrAlias Jun 9, 2022
6d9b57d
Introduce Temporality, WithTemporality Reader options and InstrumentK…
MadVikingGod Jun 10, 2022
c6526ec
Add aggregation package and reader/view options (#2958)
MrAlias Jun 21, 2022
93a1ca6
Update temporality selector option (#2967)
MrAlias Jun 23, 2022
e7f2894
Minor NewMeterProvider and producer docs fix (#2983)
MrAlias Jun 27, 2022
c250227
Add internal package structure for aggregation (#2954)
MrAlias Jul 6, 2022
2bd0e1a
Merge main into new_sdk/main (#2996)
MrAlias Jul 7, 2022
5e69b7f
Add structure to the export data. (#2961)
MadVikingGod Jul 11, 2022
425e9ce
Use export.Aggregation instead of internal.Aggregation (#3007)
MrAlias Jul 14, 2022
a1c5b6f
Use attribute Sets instead of KeyValues for export data (#3012)
MrAlias Jul 14, 2022
5f34247
Change Instrument Library to Instrument Scope (#3016)
MadVikingGod Jul 14, 2022
3c344c7
move temporality to export/temporality (#3017)
MadVikingGod Jul 14, 2022
98f88ca
Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
hanyuancheung Jul 14, 2022
1dbe1fc
Add metricdatatest package (#3025)
MrAlias Jul 21, 2022
751eaa9
Adds a pipeline for creating reader's output (#3026)
MadVikingGod Jul 22, 2022
91b1a44
Use generic Sum, Gauge, and DataPoint value removing Value, Int64, an…
MrAlias Jul 25, 2022
67da7d0
Add MatchInstrumentKind filter for Views. (#3037)
MadVikingGod Jul 25, 2022
dc4899c
Change View Attribute Filter to detect if not set. (#3039)
MadVikingGod Jul 26, 2022
590fff9
Add implementation of last-value aggregator (#3008)
MrAlias Jul 27, 2022
26506aa
View.New() miss InstrumentKind check (#3043)
Petrie Jul 28, 2022
0cc8a3b
Add delta/cumulative histogram implementation (#3045)
MrAlias Aug 2, 2022
dbdcfc9
use TemporalitySelector (#3050)
Petrie Aug 2, 2022
7a168f2
Add implementation of Sum aggregators (#3000)
MrAlias Aug 4, 2022
eefb277
Adds a filter Aggregator. (#3040)
MadVikingGod Aug 4, 2022
ea8af82
Add back the stdoutmetric exporter (#3057)
MrAlias Aug 4, 2022
96c7c59
Remove stale TODO from metricdata/data.go (#3064)
MrAlias Aug 5, 2022
2e8a431
Merge main into new_sdk/main (#3082)
MadVikingGod Aug 11, 2022
a8d1f4a
Adds the option to ignore timestamps in metric data tests. (#3076)
MadVikingGod Aug 11, 2022
258bb2d
Adds a pipelineRegistry to manage creating aggregators. (#3044)
MadVikingGod Aug 11, 2022
7e85a50
Remove stale TODO (#3083)
MrAlias Aug 11, 2022
1c08d20
Add back the otlpmetric transforms (#3065)
MrAlias Aug 12, 2022
a33d917
Changes instruments uniqueness in pipeline. (#3071)
MadVikingGod Aug 12, 2022
3013ed1
Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3…
MrAlias Aug 15, 2022
e791fce
add internal OpenCensus metric translation library (#3099)
dashpole Aug 19, 2022
d3f0d81
reintroduce opencensus trace bridge (#3098)
dashpole Aug 19, 2022
5c9ff25
Document the sdk/metric/view package (#3086)
MrAlias Aug 19, 2022
2eec66f
Adds async instruments and providers. (#3084)
MadVikingGod Aug 25, 2022
467a1c5
Merge branch 'main' into new_sdk/main (#3111)
MadVikingGod Aug 25, 2022
0067ea5
Add otlpmetric exporter (#3089)
MrAlias Aug 25, 2022
16a578c
Make pipelineRegistry non-generic (#3115)
MadVikingGod Aug 29, 2022
25d13cb
Add Synchronous instruments (#3124)
MadVikingGod Sep 1, 2022
f20ead1
Add back the otlpmetricgrpc exporter (#3094)
MrAlias Sep 2, 2022
df133f0
Add sdk/metric Go pkg docs and example (#3139)
MrAlias Sep 6, 2022
bdb917e
Merge main into new_sdk/main (#3141)
MrAlias Sep 6, 2022
29c9c40
Remove empty metrictest pkg (#3148)
MrAlias Sep 7, 2022
40319d9
Add exporters/otlp/otlpmetric/internal/otest (#3125)
MrAlias Sep 8, 2022
9550f7b
Add back the otlpmetrichttp exporter (#3097)
MrAlias Sep 8, 2022
c3c815d
Remove stale TODO in sdk/view (#3149)
MrAlias Sep 9, 2022
36204eb
Use unique metric testing data in reader_test (#3151)
MrAlias Sep 9, 2022
a087b9f
Add new metric SDK changes to changelog (#3150)
MrAlias Sep 9, 2022
dc0eb59
Add integration and config testing to otlpmetricgrpc (#3126)
MrAlias Sep 12, 2022
a8b1c85
Add integration and config testing to otlpmetrichttp (#3155)
MrAlias Sep 12, 2022
49907ab
Add Prometheus exporter code (#3135)
damemi Sep 13, 2022
88e49c4
Add Prometheus exporter example (#3168)
damemi Sep 15, 2022
03c2e0b
Merge branch 'main' into new_sdk/main
MrAlias Sep 15, 2022
398f087
Add back prom exporter to README.md
MrAlias Sep 15, 2022
e0e1db2
Fix removal changes from #3154 in API
MrAlias Sep 15, 2022
8e980ca
Update CHANGELOG with PR number
MrAlias Sep 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /bridge/opencensus/test
directory: /bridge/opencensus/opencensusmetric
labels:
- dependencies
- go
Expand All @@ -38,7 +38,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /bridge/opentracing
directory: /bridge/opencensus/test
labels:
- dependencies
- go
Expand All @@ -47,7 +47,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /example/fib
directory: /bridge/opentracing
labels:
- dependencies
- go
Expand All @@ -56,7 +56,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /example/jaeger
directory: /example/fib
labels:
- dependencies
- go
Expand All @@ -65,7 +65,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /example/namedtracer
directory: /example/jaeger
labels:
- dependencies
- go
Expand All @@ -74,7 +74,7 @@ updates:
interval: weekly
day: sunday
- package-ecosystem: gomod
directory: /example/opencensus
directory: /example/namedtracer
labels:
- dependencies
- go
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Changed

- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification.
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
Please see the package documentation for how the new SDK is initialized and configured. (#3175)

### Removed

- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed.
A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed.
A replacement package that supports the new metric SDK will be added back in a future release. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175)
- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175)
- The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175)
- The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175)
- The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175)
- The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175)
- The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175)

## [1.10.0] - 2022-09-09

### Added
Expand Down
47 changes: 0 additions & 47 deletions bridge/opencensus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,50 +79,3 @@ OpenCensus and OpenTelemetry APIs are not entirely compatible. If the bridge fi
* Custom OpenCensus Samplers specified during StartSpan are ignored.
* Links cannot be added to OpenCensus spans.
* OpenTelemetry Debug or Deferred trace flags are dropped after an OpenCensus span is created.

## Metrics

### The problem: mixing libraries without mixing pipelines

The problem for monitoring is simpler than the problem for tracing, since there
are no context propagation issues to deal with. However, it still is difficult
for users to migrate an entire applications' monitoring at once. It
should be possible to send metrics generated by OpenCensus libraries to an
OpenTelemetry pipeline so that migrating a metric does not require maintaining
separate export pipelines for OpenCensus and OpenTelemetry.

### The Exporter "wrapper" solution

The solution we use here is to allow wrapping an OpenTelemetry exporter such
that it implements the OpenCensus exporter interfaces. This allows a single
exporter to be used for metrics from *both* OpenCensus and OpenTelemetry.

### User Journey

Starting from an application using entirely OpenCensus APIs:

1. Instantiate OpenTelemetry SDK and Exporters.
2. Replace OpenCensus exporters with a wrapped OpenTelemetry exporter from step 1.
3. Migrate libraries individually from OpenCensus to OpenTelemetry
4. Remove OpenCensus Exporters and configuration.

For example, to swap out the OpenCensus logging exporter for the OpenTelemetry stdout exporter:

```go
import (
"go.opencensus.io/metric/metricexport"
"go.opentelemetry.io/otel/bridge/opencensus"
"go.opentelemetry.io/otel/exporters/stdout"
"go.opentelemetry.io/otel"
)
// With OpenCensus, you could have previously configured the logging exporter like this:
// import logexporter "go.opencensus.io/examples/exporter"
// exporter, _ := logexporter.NewLogExporter(logexporter.Options{})
// Instead, we can create an equivalent using the OpenTelemetry stdout exporter:
openTelemetryExporter, _ := stdout.New(stdout.WithPrettyPrint())
exporter := opencensus.NewMetricExporter(openTelemetryExporter)

// Use the wrapped OpenTelemetry exporter like you normally would with OpenCensus
intervalReader, _ := metricexport.NewIntervalReader(&metricexport.Reader{}, exporter)
intervalReader.Start()
```
157 changes: 0 additions & 157 deletions bridge/opencensus/aggregation.go

This file was deleted.

Loading