Skip to content

Commit

Permalink
Merge branch 'main' into codeboten/rm-deprecated-type
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored Mar 2, 2022
2 parents 10149d0 + 0c99b50 commit d14108c
Show file tree
Hide file tree
Showing 28 changed files with 288 additions and 248 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### 🛑 Breaking changes 🛑

- Remove `Type` funcs in pdata (#4933)

## v0.46.0 Beta

### 🛑 Breaking changes 🛑

- Deprecated funcs `config.DefaultConfig`, `confighttp.DefaultHTTPSettings`, `exporterhelper.DefaultTimeoutSettings`,
`exporthelper.DefaultQueueSettings`, `exporterhelper.DefaultRetrySettings`, `testcomponents.DefaultFactories`, and
`scraperhelper.DefaultScraperControllerSettings` in favour for their `NewDefault` method to adhere to contribution guidelines (#4865)
Expand All @@ -30,9 +36,11 @@
- Deprecated `receiverhelper.WithMetrics` in favour of `component.WithMetricsReceiver`
- Deprecated `receiverhelper.WithLogs` in favour of `component.WithLogsReceiver`
- Deprecated `receiverhelper.NewFactory` in favour of `component.NewReceiverFactory`
- Change otel collector to enable open telemetry metrics through feature gate instead of a constant
- Remove support for legacy otlp/http port. (#4916)
- Remove deprecated funcs in pdata (#4809)
- Remove `Type` funcs in pdata (#4933)
- Remove deprecated Retrieve funcs/calls (#4922)
- Remove deprecated NewConfigProvider funcs (#4937)

### 💡 Enhancements 💡

Expand All @@ -46,6 +54,7 @@
that calls shutdown to terminate it; this is done per memory limiter instance.
Added memory limiter factory to cache initiated object and be reused by similar config. This guarantees a single
running `checkMemLimits` per config (#4886)
- Resolved race condition in collector when calling `Shutdown` (#4878)

## v0.45.0 Beta

Expand Down
17 changes: 9 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,6 @@ that each of the following steps is done in a separate version:
1. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if
needed.
#### Exceptions
While the above is what we strive to follow, we acknowledge that some changes might be unfeasible to achieve in a
non-breaking manner. Exceptions to the outlined rules are acceptable if consensus can be obtained from approvers in the
pull request they are proposed. A reason for requesting the exception MUST be given in the pull request. Until unanimity
is obtained, approvers and maintainers are encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be
obtained, the maintainers are then tasked in getting a decision using its regular means (voting, TC help, ...).
## Updating Changelog
An entry into the [Changelog](./CHANGELOG.md) is required for the following reasons:
Expand Down Expand Up @@ -502,3 +494,12 @@ go: github.com/golangci/golangci-lint@v1.31.0 requires
`go env GOPROXY` should return `https://proxy.golang.org,direct`. If it does not, set it as an environment variable:

`export GOPROXY=https://proxy.golang.org,direct`

## Exceptions

While the rules in this and other documents in this repository is what we strive to follow, we acknowledge that rules may be
unfeasible to be applied in some situations. Exceptions to the rules
on this and other documents are acceptable if consensus can be obtained from approvers in the pull request they are proposed.
A reason for requesting the exception MUST be given in the pull request. Until unanimity is obtained, approvers and maintainers are
encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be obtained, the maintainers are then tasked in getting a
decision using its regular means (voting, TC help, ...).
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,37 @@ Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-tele
- [Punya Biswal](https://github.com/punya), Google
- [Steve Flanders](https://github.com/flands), Splunk

Emeritus Triagers:

- [Andrew Hsu](https://github.com/andrewhsu), Lightstep

Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)):

- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk
- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs
- [Pablo Baeyens](https://github.com/mx-psi), DataDog

Emeritus Approvers:

- [James Bebbington](https://github.com/james-bebbington), Google
- [Jay Camp](https://github.com/jrcamp), Splunk
- [Nail Islamov](https://github.com/nilebox), Google
- [Owais Lone](https://github.com/owais), Splunk
- [Rahul Patel](https://github.com/rghetia), Google
- [Steven Karis](https://github.com/sjkaris), Splunk
- [Yang Song](https://github.com/songy23), Google

Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)):

- [Alex Boten](https://github.com/codeboten), Lightstep
- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk
- [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk

Emeritus Maintainers:

- [Paulo Janotti](https://github.com/pjanotti), Splunk

Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md).

Thanks to all the people who already contributed!
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/internal/builder/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"go.uber.org/zap"
)

const defaultOtelColVersion = "0.45.0"
const defaultOtelColVersion = "0.46.0"

// ErrInvalidGoMod indicates an invalid gomod
var ErrInvalidGoMod = errors.New("invalid gomod specification for module")
Expand Down
20 changes: 10 additions & 10 deletions cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ dist:
module: go.opentelemetry.io/collector/cmd/otelcorecol
name: otelcorecol
description: Local OpenTelemetry Collector binary, testing only.
version: 0.45.1-dev
otelcol_version: 0.45.0
version: 0.46.1-dev
otelcol_version: 0.46.0

receivers:
- import: go.opentelemetry.io/collector/receiver/otlpreceiver
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
exporters:
- import: go.opentelemetry.io/collector/exporter/loggingexporter
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
- import: go.opentelemetry.io/collector/exporter/otlpexporter
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
- import: go.opentelemetry.io/collector/exporter/otlphttpexporter
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
extensions:
- import: go.opentelemetry.io/collector/extension/ballastextension
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
- import: go.opentelemetry.io/collector/extension/zpagesextension
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
processors:
- import: go.opentelemetry.io/collector/processor/batchprocessor
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0
- import: go.opentelemetry.io/collector/processor/memorylimiterprocessor
gomod: go.opentelemetry.io/collector v0.45.0
gomod: go.opentelemetry.io/collector v0.46.0

replaces:
- go.opentelemetry.io/collector => ../../
Expand Down
6 changes: 3 additions & 3 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go 1.17

require (
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.45.0
go.opentelemetry.io/collector v0.46.0
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
)

Expand All @@ -32,7 +32,7 @@ require (
github.com/klauspost/compress v1.14.4 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
Expand All @@ -54,7 +54,7 @@ require (
github.com/tklauser/numcpus v0.3.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/collector/model v0.45.0 // indirect
go.opentelemetry.io/collector/model v0.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect
go.opentelemetry.io/contrib/zpages v0.29.0 // indirect
Expand Down
3 changes: 2 additions & 1 deletion cmd/otelcorecol/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/lyft/protoc-gen-star v0.5.3 h1:zSGLzsUew8RT+ZKPHc3jnf8XLaVyHzTcAFBzHtCNR20=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcorecol/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions config/configmapprovider/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,11 @@ func TestEnv(t *testing.T) {
env := NewEnv()
ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil)
require.NoError(t, err)
cfg, err := ret.Get(context.Background())
assert.NoError(t, err)
expectedMap := config.NewMapFromStringMap(map[string]interface{}{
"processors::batch": nil,
"exporters::otlp::endpoint": "localhost:4317",
})
assert.Equal(t, expectedMap.ToStringMap(), cfg.ToStringMap())
assert.NoError(t, ret.Close(context.Background()))
assert.Equal(t, expectedMap.ToStringMap(), ret.Map.ToStringMap())

assert.NoError(t, env.Shutdown(context.Background()))
}
3 changes: 1 addition & 2 deletions config/configmapprovider/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,5 @@ func loadConfigMap(fileName string) (*config.Map, error) {
if err != nil {
return nil, err
}

return ret.Get(context.Background())
return ret.Map, nil
}
10 changes: 2 additions & 8 deletions config/configmapprovider/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,23 @@ func TestFile_RelativePath(t *testing.T) {
fp := NewFile()
ret, err := fp.Retrieve(context.Background(), fileSchemePrefix+filepath.Join("testdata", "default-config.yaml"), nil)
require.NoError(t, err)
cfg, err := ret.Get(context.Background())
assert.NoError(t, err)
expectedMap := config.NewMapFromStringMap(map[string]interface{}{
"processors::batch": nil,
"exporters::otlp::endpoint": "localhost:4317",
})
assert.Equal(t, expectedMap, cfg)
assert.NoError(t, ret.Close(context.Background()))
assert.Equal(t, expectedMap, ret.Map)
assert.NoError(t, fp.Shutdown(context.Background()))
}

func TestFile_AbsolutePath(t *testing.T) {
fp := NewFile()
ret, err := fp.Retrieve(context.Background(), fileSchemePrefix+absolutePath(t, filepath.Join("testdata", "default-config.yaml")), nil)
require.NoError(t, err)
cfg, err := ret.Get(context.Background())
assert.NoError(t, err)
expectedMap := config.NewMapFromStringMap(map[string]interface{}{
"processors::batch": nil,
"exporters::otlp::endpoint": "localhost:4317",
})
assert.Equal(t, expectedMap, cfg)
assert.NoError(t, ret.Close(context.Background()))
assert.Equal(t, expectedMap, ret.Map)
assert.NoError(t, fp.Shutdown(context.Background()))
}

Expand Down
9 changes: 0 additions & 9 deletions config/configmapprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,3 @@ type Retrieved struct {
//
// Should never be called concurrently with itself.
type CloseFunc func(context.Context) error

// Close calls the func only if not nil.
// Deprecated: [v0.45.0] Not needed, will be removed soon. You have access to the func.
func (f CloseFunc) Close(ctx context.Context) error {
if f == nil {
return nil
}
return f(ctx)
}
72 changes: 0 additions & 72 deletions config/configmapprovider/retrieved.go

This file was deleted.

60 changes: 0 additions & 60 deletions config/configmapprovider/retrieved_test.go

This file was deleted.

Loading

0 comments on commit d14108c

Please sign in to comment.