Skip to content

Commit

Permalink
adapt huaweireceiver after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
narcis.gemene committed Aug 12, 2024
1 parent ee96ad8 commit 215e09c
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 111 deletions.
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ receivers:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.106.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.106.1
Expand Down Expand Up @@ -255,6 +256,7 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver => ../../receiver/k8sobjectsreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver => ../../receiver/haproxyreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver => ../../receiver/httpcheckreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver => ../../receiver/huaweicloudcesreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver => ../../extension/observer/dockerobserver
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver => ../../extension/observer/k8sobserver
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter => ../../exporter/sentryexporter
Expand Down
7 changes: 5 additions & 2 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.106.1
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.106.1
Expand Down Expand Up @@ -542,6 +543,7 @@ require (
github.com/hashicorp/serf v0.10.1 // indirect
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 // indirect
github.com/hetznercloud/hcloud-go/v2 v2.9.0 // indirect
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.104 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down Expand Up @@ -736,6 +738,7 @@ require (
github.com/tidwall/tinylru v1.1.0 // indirect
github.com/tidwall/wal v1.1.7 // indirect
github.com/tinylib/msgp v1.2.0 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
Expand Down Expand Up @@ -872,10 +875,10 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hapro

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

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver => ../../extension/observer/dockerobserver

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

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver => ../../extension/observer/dockerobserver

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver => ../../extension/observer/k8sobserver

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter => ../../exporter/sentryexporter
Expand Down
4 changes: 4 additions & 0 deletions cmd/otelcontribcol/go.sum

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

6 changes: 2 additions & 4 deletions receiver/huaweicloudcesreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ converts to
"resource": {
"attributes": {
"cloud.provider": "huawei_cloud",
"service.name": "ces_service",
"service.version": "v1",
"project.id": "project_1",
"region": "eu-west-101"
}
Expand All @@ -174,7 +172,7 @@ converts to
},
"metadata": {
"publicip_id": "test-baae-4dd9-ad3f-1234",
"namespace" : "SYS.VPC"
"system.namespace" : "SYS.VPC"
}
}
]
Expand All @@ -193,7 +191,7 @@ converts to
},
"metadata": {
"publicip_id": "test-baae-4dd9-ad3f-1234",
"namespace":"SYS.VPC"
"system.namespace":"SYS.VPC"
}
}
]
Expand Down
8 changes: 2 additions & 6 deletions receiver/huaweicloudcesreceiver/factory.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//go:generate mdatagen metadata.yaml

// Package huaweicloudexporter provides a metrics exporter for the OpenTelemetry collector.
// This package is subject to change and may break configuration settings and behavior.
package huaweicloudcesreceiver
package huaweicloudcesreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver"

import (
"context"
Expand Down Expand Up @@ -34,7 +30,7 @@ func createDefaultConfig() component.Config {

func createMetricsReceiver(
_ context.Context,
params receiver.CreateSettings,
params receiver.Settings,
cfg component.Config,
next consumer.Metrics) (receiver.Metrics, error) {

Expand Down
70 changes: 38 additions & 32 deletions receiver/huaweicloudcesreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ go 1.21.0
require (
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.104
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.102.1
go.opentelemetry.io/collector/config/confighttp v0.102.1
go.opentelemetry.io/collector/confmap v0.102.1
go.opentelemetry.io/collector/consumer v0.102.1
go.opentelemetry.io/collector/pdata v1.9.0
go.opentelemetry.io/collector/receiver v0.102.1
go.opentelemetry.io/collector/component v0.106.1
go.opentelemetry.io/collector/config/confighttp v0.106.1
go.opentelemetry.io/collector/confmap v0.106.1
go.opentelemetry.io/collector/consumer v0.106.1
go.opentelemetry.io/collector/consumer/consumertest v0.106.1
go.opentelemetry.io/collector/pdata v1.12.0
go.opentelemetry.io/collector/receiver v0.106.1
go.uber.org/goleak v1.3.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
Expand All @@ -30,46 +31,51 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
github.com/knadh/koanf/v2 v2.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opentelemetry.io/collector v0.102.1 // indirect
go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect
go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect
go.opentelemetry.io/collector/config/configtls v0.102.1 // indirect
go.opentelemetry.io/collector/config/internal v0.102.1 // indirect
go.opentelemetry.io/collector/extension v0.102.1 // indirect
go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect
go.opentelemetry.io/collector/featuregate v1.9.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
go.opentelemetry.io/collector v0.106.1 // indirect
go.opentelemetry.io/collector/client v0.106.1 // indirect
go.opentelemetry.io/collector/config/configauth v0.106.1 // indirect
go.opentelemetry.io/collector/config/configcompression v1.12.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect
go.opentelemetry.io/collector/config/configtls v1.12.0 // indirect
go.opentelemetry.io/collector/config/internal v0.106.1 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect
go.opentelemetry.io/collector/extension v0.106.1 // indirect
go.opentelemetry.io/collector/extension/auth v0.106.1 // indirect
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 215e09c

Please sign in to comment.