Skip to content

Commit

Permalink
Merge branch 'main' into feature/elasticsearch_otel_model
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksmaus committed Jul 13, 2024
2 parents 59e272d + 6a5b9e6 commit 39b9cb4
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 107 deletions.
1 change: 1 addition & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ assigneeGroups:
- bryan-aguilar
- crobert-1
- dashpole
- mwear
- songy23
- fatsheep9146
# Maintainers
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ to be included in the distributed otelcol-contrib binaries and docker images.

The following GitHub users are the currently available sponsors, either by being an approver or a maintainer of the contrib repository. The list is ordered based on a random sort of the list of sponsors done live at the Collector SIG meeting on 27-Apr-2022 and serves as the seed for the round-robin selection of sponsors, as described in the section above.

* [@mwear](https://github.com/mwear)
* [@djaglowski](https://github.com/djaglowski)
* [@codeboten](https://github.com/codeboten)
* [@mx-psi](https://github.com/mx-psi)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ Triagers ([@open-telemetry/collector-contrib-triagers](https://github.com/orgs/o

- [Benedikt Bongartz](https://github.com/frzifus), Red Hat
- [Jared Tan](https://github.com/JaredTan95), DaoCloud
- [Matt Wear](https://github.com/mwear), Lightstep
- [Murphy Chen](https://github.com/Frapschen), DaoCloud
- Actively seeking contributors to triage issues

Expand All @@ -89,6 +88,7 @@ Approvers ([@open-telemetry/collector-contrib-approvers](https://github.com/orgs
- [Bryan Aguilar](https://github.com/bryan-aguilar), AWS
- [Curtis Robert](https://github.com/crobert-1), Splunk
- [David Ashpole](https://github.com/dashpole), Google
- [Matt Wear](https://github.com/mwear), Lightstep
- [Yang Song](https://github.com/songy23), DataDog
- [Ziqi Zhao](https://github.com/fatsheep9146), Alibaba

Expand Down
5 changes: 2 additions & 3 deletions exporter/datadogexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"regexp"
"strings"

"github.com/DataDog/datadog-agent/pkg/util/hostname/validate"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/confignet"
Expand All @@ -18,8 +19,6 @@ import (
"go.opentelemetry.io/collector/confmap"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/valid"
)

var (
Expand Down Expand Up @@ -469,7 +468,7 @@ func (c *Config) Validate() error {
return errNoMetadata
}

if err := valid.Hostname(c.Hostname); c.Hostname != "" && err != nil {
if err := validate.ValidHostname(c.Hostname); c.Hostname != "" && err != nil {
return fmt.Errorf("hostname field is invalid: %w", err)
}

Expand Down
2 changes: 1 addition & 1 deletion exporter/datadogexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestValidate(t *testing.T) {
API: APIConfig{Key: "notnull"},
TagsConfig: TagsConfig{Hostname: "invalid_host"},
},
err: "hostname field is invalid: 'invalid_host' is not RFC1123 compliant",
err: "hostname field is invalid: invalid_host is not RFC1123 compliant",
},
{
name: "no metadata",
Expand Down
5 changes: 2 additions & 3 deletions exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.0-rc.1
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.56.0-rc.1
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.0-rc.1
github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.56.0-rc.1
github.com/DataDog/datadog-agent/pkg/config/model v0.56.0-rc.1
github.com/DataDog/datadog-agent/pkg/config/setup v0.56.0-rc.1
github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.0-rc.1 // indirect
Expand All @@ -23,6 +24,7 @@ require (
github.com/DataDog/datadog-agent/pkg/proto v0.56.0-rc.1
github.com/DataDog/datadog-agent/pkg/status/health v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.56.0-rc.1.0.20240711082232-dc70454ece9f
github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.56.0-rc.1
github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-api-client-go/v2 v2.27.0
github.com/DataDog/datadog-go/v5 v5.5.0
Expand Down Expand Up @@ -86,8 +88,6 @@ require (
k8s.io/client-go v0.29.3
)

require github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.56.0-rc.1

require (
cloud.google.com/go/auth v0.5.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
Expand Down Expand Up @@ -123,7 +123,6 @@ require (
github.com/DataDog/datadog-agent/pkg/util/executable v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/filesystem v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/optional v0.56.0-rc.1 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (
"os"
"sync"

"github.com/DataDog/datadog-agent/pkg/util/hostname/validate"
"github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/valid"
)

type HostInfo struct {
Expand Down Expand Up @@ -44,7 +43,7 @@ func (hi *HostInfo) GetHostname(logger *zap.Logger) string {
if hi.FQDN == "" {
// Don't report failure since FQDN was just not available
return hi.OS
} else if err := valid.Hostname(hi.FQDN); err != nil {
} else if err := validate.ValidHostname(hi.FQDN); err != nil {
logger.Info("FQDN is not valid", zap.Error(err))
return hi.OS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ import (
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
// We have to ignore seelog because of upstream issue
// https://github.com/cihub/seelog/issues/182
goleak.VerifyTestMain(m,
goleak.IgnoreAnyFunction("github.com/cihub/seelog.(*asyncLoopLogger).processQueue"),
)
}

This file was deleted.

53 changes: 0 additions & 53 deletions exporter/datadogexporter/internal/hostmetadata/valid/valid.go

This file was deleted.

28 changes: 0 additions & 28 deletions exporter/datadogexporter/internal/hostmetadata/valid/valid_test.go

This file was deleted.

0 comments on commit 39b9cb4

Please sign in to comment.