Skip to content

Commit

Permalink
Release v0.14.0 (open-telemetry#461)
Browse files Browse the repository at this point in the history
* Bump version to v0.14.0

* Update code to use otel v0.14.0

* Go mod tidy

* Update changelog
  • Loading branch information
MrAlias authored Nov 21, 2020
1 parent b83f931 commit f284e28
Show file tree
Hide file tree
Showing 176 changed files with 984 additions and 1,005 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

## [0.14.0] - 2020-11-20

### Added

- `otelhttp.{Get,Head,Post,PostForm}` convenience wrappers for their `http` counterparts. (#390)
- The AWS detector now adds the cloud zone, host image ID, host type, and host name to the returned `Resource`. (#410)

### Changed

Expand All @@ -22,6 +25,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## Fixed

- `/detectors/aws` no longer fails if instance metadata is not available (e.g. not running in AWS) (#401)
- The AWS detector now returns a partial resource and an appropriate error if it encounters an error part way through determining a `Resource` identity. (#410)
- The `host` instrumentation unit test has been updated to not depend on the system it runs on. (#426)

## [0.13.0] - 2020-10-09

Expand Down Expand Up @@ -224,7 +229,8 @@ First official tagged release of `contrib` repository.
- Prefix support for dogstatsd (#34)
- Update Go Runtime package to use batch observer (#44)

[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v0.13.0...HEAD
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v0.14.0...HEAD
[0.14.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.14.0
[0.13.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.13.0
[0.12.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.12.0
[0.11.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.11.0
Expand Down
2 changes: 1 addition & 1 deletion contrib.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package contrib // import "go.opentelemetry.io/contrib"

// Version is the current release version of OpenTelemetry Contrib in use.
func Version() string {
return "0.13.0"
return "0.14.0"
// This string is updated by the pre_release.sh script during release
}

Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (aws *AWS) Detect(ctx context.Context) (*resource.Resource, error) {
err = fmt.Errorf("%w: %s", resource.ErrPartialResource, m.errs)
}

return resource.New(labels...), err
return resource.NewWithAttributes(labels...), err
}

func (aws *AWS) client() (client, error) {
Expand Down
8 changes: 4 additions & 4 deletions detectors/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestAWS_Detect(t *testing.T) {
Fields: fields{
Client: &clientMock{available: true, idDoc: usWestInst, metadata: map[string]meta{}},
},
Want: want{Resource: resource.New(usWestIDLabels...)},
Want: want{Resource: resource.NewWithAttributes(usWestIDLabels...)},
},
"Hostname Response Error": {
Fields: fields{
Expand All @@ -105,7 +105,7 @@ func TestAWS_Detect(t *testing.T) {
Want: want{
Error: `partial resource: ["hostname": 500 EC2MetadataError]`,
Partial: true,
Resource: resource.New(usWestIDLabels...),
Resource: resource.NewWithAttributes(usWestIDLabels...),
},
},
"Hostname General Error": {
Expand All @@ -121,7 +121,7 @@ func TestAWS_Detect(t *testing.T) {
Want: want{
Error: `partial resource: ["hostname": unknown error]`,
Partial: true,
Resource: resource.New(usWestIDLabels...),
Resource: resource.NewWithAttributes(usWestIDLabels...),
},
},
"All Available": {
Expand All @@ -134,7 +134,7 @@ func TestAWS_Detect(t *testing.T) {
},
},
},
Want: want{Resource: resource.New(
Want: want{Resource: resource.NewWithAttributes(
semconv.CloudProviderAWS,
semconv.CloudRegionKey.String("us-west-2"),
semconv.CloudZoneKey.String("us-west-2b"),
Expand Down
4 changes: 2 additions & 2 deletions detectors/aws/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.14
require (
github.com/aws/aws-sdk-go v1.35.28
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/otel v0.13.0
go.opentelemetry.io/otel/sdk v0.13.0
go.opentelemetry.io/otel v0.14.0
go.opentelemetry.io/otel/sdk v0.14.0
)
12 changes: 6 additions & 6 deletions detectors/aws/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
Expand All @@ -18,10 +18,10 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (gce *GCE) Detect(ctx context.Context) (*resource.Resource, error) {
aggregatedErr = fmt.Errorf("detecting GCE resources: %s", errInfo)
}

return resource.New(labels...), aggregatedErr
return resource.NewWithAttributes(labels...), aggregatedErr
}

// hasProblem checks if the err is not nil or for missing resources
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (gke *GKE) Detect(ctx context.Context) (*resource.Resource, error) {
labels = append(labels, semconv.K8SClusterNameKey.String(clusterName))
}

k8sLabelRes := resource.New(labels...)
k8sLabelRes := resource.NewWithAttributes(labels...)
var aggregatedErr error
if len(errInfo) > 0 {
aggregatedErr = fmt.Errorf("detecting GKE resources: %s", errInfo)
Expand Down
4 changes: 2 additions & 2 deletions detectors/gcp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.14

require (
cloud.google.com/go v0.72.0
go.opentelemetry.io/otel v0.13.0
go.opentelemetry.io/otel/sdk v0.13.0
go.opentelemetry.io/otel v0.14.0
go.opentelemetry.io/otel/sdk v0.14.0
)
10 changes: 6 additions & 4 deletions detectors/gcp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -141,10 +143,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down
21 changes: 11 additions & 10 deletions exporters/metric/cortex/cortex.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import (
"github.com/golang/snappy"
"github.com/prometheus/prometheus/prompb"

"go.opentelemetry.io/otel/api/global"
apimetric "go.opentelemetry.io/otel/api/metric"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/label"
apimetric "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/sdk/export/metric"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
Expand All @@ -45,7 +46,7 @@ type Exporter struct {

// ExportKindFor returns CumulativeExporter so the Processor correctly aggregates data
func (e *Exporter) ExportKindFor(*apimetric.Descriptor, aggregation.Kind) metric.ExportKind {
return metric.CumulativeExporter
return metric.CumulativeExportKind
}

// Export forwards metrics to Cortex from the SDK
Expand Down Expand Up @@ -111,7 +112,7 @@ func InstallNewPipeline(config Config, options ...push.Option) (*push.Controller
if err != nil {
return nil, err
}
global.SetMeterProvider(pusher.MeterProvider())
otel.SetMeterProvider(pusher.MeterProvider())
return pusher, nil
}

Expand Down Expand Up @@ -183,7 +184,7 @@ func (e *Exporter) ConvertToTimeSeries(checkpointSet export.CheckpointSet) ([]*p
}

// createTimeSeries is a helper function to create a timeseries from a value and labels
func createTimeSeries(record metric.Record, value apimetric.Number, valueNumberKind apimetric.NumberKind, extraLabels ...label.KeyValue) *prompb.TimeSeries {
func createTimeSeries(record metric.Record, value number.Number, valueNumberKind number.Kind, extraLabels ...label.KeyValue) *prompb.TimeSeries {
sample := prompb.Sample{
Value: value.CoerceToFloat64(valueNumberKind),
Timestamp: int64(time.Nanosecond) * record.EndTime().UnixNano() / int64(time.Millisecond),
Expand Down Expand Up @@ -256,7 +257,7 @@ func convertFromMinMaxSumCount(record metric.Record, minMaxSumCount aggregation.
return nil, err
}
name = sanitize(record.Descriptor().Name() + "_count")
countTimeSeries := createTimeSeries(record, apimetric.NewInt64Number(count), apimetric.Int64NumberKind, label.String("__name__", name))
countTimeSeries := createTimeSeries(record, number.NewInt64Number(count), number.Int64Kind, label.String("__name__", name))

// Return all timeSeries
tSeries := []*prompb.TimeSeries{
Expand Down Expand Up @@ -305,7 +306,7 @@ func convertFromDistribution(record metric.Record, distribution aggregation.Dist
return nil, err
}
name = sanitize(record.Descriptor().Name() + "_count")
countTimeSeries := createTimeSeries(record, apimetric.NewInt64Number(count), apimetric.Int64NumberKind, label.String("__name__", name))
countTimeSeries := createTimeSeries(record, number.NewInt64Number(count), number.Int64Kind, label.String("__name__", name))
timeSeries = append(timeSeries, countTimeSeries)

// For each configured quantile, get the value and create a timeseries
Expand Down Expand Up @@ -359,7 +360,7 @@ func convertFromHistogram(record metric.Record, histogram aggregation.Histogram)
boundaryStr := strconv.FormatFloat(boundary, 'f', -1, 64)

// Create timeSeries and append
boundaryTimeSeries := createTimeSeries(record, apimetric.NewFloat64Number(totalCount), apimetric.Float64NumberKind, label.String("__name__", metricName), label.String("le", boundaryStr))
boundaryTimeSeries := createTimeSeries(record, number.NewFloat64Number(totalCount), number.Float64Kind, label.String("__name__", metricName), label.String("le", boundaryStr))
timeSeries = append(timeSeries, boundaryTimeSeries)
}

Expand All @@ -369,9 +370,9 @@ func convertFromHistogram(record metric.Record, histogram aggregation.Histogram)
// Create a timeSeries for the +inf bucket and total count
// These are the same and are both required by Prometheus-based backends

upperBoundTimeSeries := createTimeSeries(record, apimetric.NewFloat64Number(totalCount), apimetric.Float64NumberKind, label.String("__name__", metricName), label.String("le", "+inf"))
upperBoundTimeSeries := createTimeSeries(record, number.NewFloat64Number(totalCount), number.Float64Kind, label.String("__name__", metricName), label.String("le", "+inf"))

countTimeSeries := createTimeSeries(record, apimetric.NewFloat64Number(totalCount), apimetric.Float64NumberKind, label.String("__name__", metricName+"_count"))
countTimeSeries := createTimeSeries(record, number.NewFloat64Number(totalCount), number.Float64Kind, label.String("__name__", metricName+"_count"))

timeSeries = append(timeSeries, upperBoundTimeSeries)
timeSeries = append(timeSeries, countTimeSeries)
Expand Down
8 changes: 4 additions & 4 deletions exporters/metric/cortex/cortex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/sdk/export/metric"
export "go.opentelemetry.io/otel/sdk/export/metric"
Expand Down Expand Up @@ -66,13 +66,13 @@ var validConfig = Config{
Quantiles: []float64{0, 0.25, 0.5, 0.75, 1},
}

var testResource = resource.New(label.String("R", "V"))
var testResource = resource.NewWithAttributes(label.String("R", "V"))
var mockTime int64 = int64(time.Nanosecond) * time.Time{}.UnixNano() / int64(time.Millisecond)

func TestExportKindFor(t *testing.T) {
exporter := Exporter{}
got := exporter.ExportKindFor(nil, aggregation.Kind(rune(0)))
want := metric.CumulativeExporter
want := metric.CumulativeExportKind

if got != want {
t.Errorf("ExportKindFor() = %q, want %q", got, want)
Expand Down Expand Up @@ -195,7 +195,7 @@ func TestInstallNewPipeline(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create install pipeline with error %v", err)
}
if global.MeterProvider() != pusher.MeterProvider() {
if otel.GetMeterProvider() != pusher.MeterProvider() {
t.Fatalf("Failed to register push Controller provider globally")
}
}
Expand Down
8 changes: 4 additions & 4 deletions exporters/metric/cortex/example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ replace (
)

require (
go.opentelemetry.io/contrib/exporters/metric/cortex v0.13.0
go.opentelemetry.io/contrib/exporters/metric/cortex/utils v0.13.0
go.opentelemetry.io/otel v0.13.0
go.opentelemetry.io/otel/sdk v0.13.0
go.opentelemetry.io/contrib/exporters/metric/cortex v0.14.0
go.opentelemetry.io/contrib/exporters/metric/cortex/utils v0.14.0
go.opentelemetry.io/otel v0.14.0
go.opentelemetry.io/otel/sdk v0.14.0
gopkg.in/yaml.v2 v2.2.5 // indirect
)
10 changes: 4 additions & 6 deletions exporters/metric/cortex/example/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
Expand Down Expand Up @@ -211,10 +209,10 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
Expand Down
4 changes: 2 additions & 2 deletions exporters/metric/cortex/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"time"

"go.opentelemetry.io/contrib/exporters/metric/cortex"
"go.opentelemetry.io/otel/api/metric"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk/metric/controller/push"
"go.opentelemetry.io/otel/sdk/resource"

Expand All @@ -39,7 +39,7 @@ func main() {

// Create and install the exporter. Additionally, set the push interval to 5 seconds
// and add a resource to the controller.
pusher, err := cortex.InstallNewPipeline(*config, push.WithPeriod(5*time.Second), push.WithResource(resource.New(label.String("R", "V"))))
pusher, err := cortex.InstallNewPipeline(*config, push.WithPeriod(5*time.Second), push.WithResource(resource.NewWithAttributes(label.String("R", "V"))))
if err != nil {
fmt.Printf("Error: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions exporters/metric/cortex/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.14.6 // indirect
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/otel v0.13.0
go.opentelemetry.io/otel/sdk v0.13.0
go.opentelemetry.io/otel v0.14.0
go.opentelemetry.io/otel/sdk v0.14.0
)
Loading

0 comments on commit f284e28

Please sign in to comment.