Skip to content

Commit

Permalink
[receivers/promtail] added changes to CHANGELOG.md, added license to …
Browse files Browse the repository at this point in the history
…promtail receiver go files, removed one replace directive from go mod
  • Loading branch information
mar4uk committed Oct 11, 2022
1 parent a65e37d commit 53e9639
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
### 🚀 New components 🚀

- `s3mapprovider`: A new implementation of ConfigMapProvider for Amazon S3 (s3mapprovider) allows OTEL Collector the ability to load configuration for itself by fetching and reading config files stored in Amazon S3. (#12939)
- `promtailreceiver`: Add a new receiver that scrapes logs using Promtail client` (#14632)

### 💡 Enhancements 💡

Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ require (
github.com/grafana/dskit v0.0.0-20220928083349-b1b307db4f30 // indirect
github.com/grafana/go-gelf/v2 v2.0.1 // indirect
github.com/grafana/groupcache_exporter v0.0.0-20220629095919-59a8c6428a43 // indirect
github.com/grafana/loki v1.6.2-0.20221004074821-dcd2d06823e2 // indirect
github.com/grafana/loki v1.6.2-0.20221004103251-a8d1839b2245 // indirect
github.com/grafana/regexp v0.0.0-20220304100321-149c8afcd6cb // indirect
github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
Expand Down Expand Up @@ -1052,6 +1052,3 @@ replace github.com/cloudflare/cloudflare-go => github.com/cyriltovena/cloudflare

// using fork for custom dialer support - see https://github.com/bradfitz/gomemcache/pull/86
replace github.com/bradfitz/gomemcache => github.com/grafana/gomemcache v0.0.0-20220812141859-1e3ae89e91a7

// Fork containing a line-buffered logger which should improve logging performance.
replace github.com/go-kit/log => github.com/dannykopping/go-kit-log v0.2.2-0.20221002180827-5591c1641b6b
10 changes: 6 additions & 4 deletions go.sum

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

16 changes: 15 additions & 1 deletion receiver/promtailreceiver/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package promtailreceiver
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package promtailreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/promtailreceiver"

import (
"fmt"
Expand Down
14 changes: 14 additions & 0 deletions receiver/promtailreceiver/config_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package promtailreceiver

import (
Expand Down
14 changes: 14 additions & 0 deletions receiver/promtailreceiver/factory.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package promtailreceiver

import (
Expand Down
5 changes: 1 addition & 4 deletions receiver/promtailreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => ../../pkg/stanza

require (
github.com/grafana/loki v1.6.2-0.20221004074821-dcd2d06823e2
github.com/grafana/loki v1.6.2-0.20221004103251-a8d1839b2245
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.60.0
github.com/stretchr/testify v1.8.0
go.opentelemetry.io/collector v0.61.1-0.20221004012633-7cb544d3be36
Expand Down Expand Up @@ -244,6 +244,3 @@ replace github.com/cloudflare/cloudflare-go => github.com/cyriltovena/cloudflare

// using fork for custom dialer support - see https://github.com/bradfitz/gomemcache/pull/86
replace github.com/bradfitz/gomemcache => github.com/grafana/gomemcache v0.0.0-20220812141859-1e3ae89e91a7

// Fork containing a line-buffered logger which should improve logging performance.
replace github.com/go-kit/log => github.com/dannykopping/go-kit-log v0.2.2-0.20221002180827-5591c1641b6b
10 changes: 6 additions & 4 deletions receiver/promtailreceiver/go.sum

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

14 changes: 14 additions & 0 deletions receiver/promtailreceiver/internal/logger.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package internal

import (
Expand Down
28 changes: 14 additions & 14 deletions receiver/promtailreceiver/internal/logger_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package internal

import (
Expand All @@ -14,20 +28,6 @@ import (
"go.uber.org/zap/zaptest/observer"
)

// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

func TestLog(t *testing.T) {
tcs := []struct {
name string
Expand Down
2 changes: 1 addition & 1 deletion receiver/promtailreceiver/promtail.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 OpenTelemetry Authors
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
14 changes: 14 additions & 0 deletions receiver/promtailreceiver/promtail_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package promtailreceiver

import (
Expand Down

0 comments on commit 53e9639

Please sign in to comment.