Skip to content

Commit

Permalink
Pin otel-log-collection to main
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski committed Feb 23, 2022
1 parent d99b921 commit a2e77c2
Show file tree
Hide file tree
Showing 22 changed files with 311 additions and 78 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
### 💡 Enhancements 💡


- `internal/stanza` : Export metrics from Stanza receivers (#8025)
- `internal/stanza`: Export metrics from Stanza receivers (#8025)
- `hostreceiver/pagingscraper`: Migrate the scraper to the mdatagen metrics builder (#7139)
- Do not drop zero trace/span id spans in the jaeger conversion (#7946)
- Upgrade to use semantic conventions 1.6.1 (#7926)
- `dynatraceexporter`: Validate QueueSettings and perform config validation in Validate() instead (#8020)
- `sapmexporter`: Add validation for `sending_queue` setting (#8023)
- `signalfxexporter`: Add validation for `sending_queue` setting (#8026)
- `internal/stanza`: Add support for arbitrary attribute types (#8081)

### 🛑 Breaking changes 🛑

- Remove deprecated functions from jaeger translator (#8032)
- `internal/stanza`: Remove `write_to` setting from input operators (#8081)

### 🚩 Deprecations 🚩

Expand Down
15 changes: 9 additions & 6 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/googleapis/gnostic v0.5.6 // indirect
github.com/gophercloud/gophercloud v0.24.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect
Expand Down Expand Up @@ -348,7 +348,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-log-collection v0.25.0 // indirect
github.com/open-telemetry/opentelemetry-log-collection v0.25.1-0.20220223175442-26aeee9f1372 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.0.3 // indirect
Expand Down Expand Up @@ -392,7 +392,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.10.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
Expand Down Expand Up @@ -463,12 +463,12 @@ require (
k8s.io/client-go v0.23.4 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.40.1 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/kubelet v0.23.3 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 // indirect
)

Expand Down Expand Up @@ -767,5 +767,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipki

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver => ../../receiver/zookeeperreceiver

// see https://github.com/google/gnostic/issues/262
replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5

// see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/4433
exclude github.com/StackExchange/wmi v1.2.0
16 changes: 10 additions & 6 deletions cmd/configschema/go.sum

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

15 changes: 9 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ require (
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/googleapis/gnostic v0.5.6 // indirect
github.com/gophercloud/gophercloud v0.24.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect
Expand Down Expand Up @@ -347,7 +347,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.45.1 // indirect
github.com/open-telemetry/opentelemetry-log-collection v0.25.0 // indirect
github.com/open-telemetry/opentelemetry-log-collection v0.25.1-0.20220223175442-26aeee9f1372 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.0.3 // indirect
Expand Down Expand Up @@ -392,7 +392,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.10.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
Expand Down Expand Up @@ -468,12 +468,12 @@ require (
k8s.io/client-go v0.23.4 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.40.1 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/kubelet v0.23.3 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 // indirect
)

Expand Down Expand Up @@ -770,6 +770,9 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipki

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver => ./receiver/zookeeperreceiver

// see https://github.com/google/gnostic/issues/262
replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5

// see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/4433
exclude github.com/StackExchange/wmi v1.2.0

Expand Down
16 changes: 10 additions & 6 deletions go.sum

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

9 changes: 6 additions & 3 deletions internal/stanza/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *Converter) workerLoop() {

for _, e := range entries {
lr := convert(e)
resourceID := getResourceID(e.Resource)
resourceID := HashResource(e.Resource)
workerItems = append(workerItems, workerItem{
Resource: e.Resource,
ResourceID: resourceID,
Expand Down Expand Up @@ -523,11 +523,12 @@ var sevTextMap = map[entry.Severity]string{
// making it very unlikely to be present in the resource maps keys or values
var pairSep = []byte{0xfe}

// emptyResourceID is the ID returned by getResourceID when it is passed an empty resource.
// emptyResourceID is the ID returned by HashResource when it is passed an empty resource.
// This specific number is chosen as it is the starting offset of fnv64.
const emptyResourceID uint64 = 14695981039346656037

func getResourceID(resource map[string]interface{}) uint64 {
// HashResource will hash an entry.Entry.Resource
func HashResource(resource map[string]interface{}) uint64 {
if len(resource) == 0 {
return emptyResourceID
}
Expand Down Expand Up @@ -555,6 +556,8 @@ func getResourceID(resource map[string]interface{}) uint64 {
fnvHash.Write([]byte(t))
case []byte:
fnvHash.Write(t)
case int, int64:
binary.Write(fnvHash, binary.BigEndian, t)
default:
b, _ := json.Marshal(t)
fnvHash.Write(b)
Expand Down
Loading

0 comments on commit a2e77c2

Please sign in to comment.