Skip to content

Commit

Permalink
resource detection as jj22ee
Browse files Browse the repository at this point in the history
  • Loading branch information
jj22ee committed Oct 19, 2024
1 parent 9caa8ed commit 5f2b01c
Show file tree
Hide file tree
Showing 54 changed files with 169 additions and 169 deletions.
30 changes: 15 additions & 15 deletions processor/resourcedetectionprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ package resourcedetectionprocessor // import "github.com/open-telemetry/opentele
import (
"go.opentelemetry.io/collector/config/confighttp"

"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/consul"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/docker"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/consul"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/docker"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
)

// Config defines configuration for Resource processor.
Expand Down
14 changes: 7 additions & 7 deletions processor/resourcedetectionprocessor/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import (
"go.opentelemetry.io/collector/config/configtls"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/metadata"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
)

func TestLoadConfig(t *testing.T) {
Expand Down
34 changes: 17 additions & 17 deletions processor/resourcedetectionprocessor/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ import (
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/collector/processor/processorhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/consul"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/docker"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/env"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/metadata"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/consul"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/docker"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/env"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system"
)

var consumerCapabilities = consumer.Capabilities{MutatesData: true}
Expand Down
18 changes: 9 additions & 9 deletions processor/resourcedetectionprocessor/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor
module github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor

go 1.22.5

Expand All @@ -8,10 +8,10 @@ require (
github.com/aws/aws-sdk-go v1.53.11
github.com/google/go-cmp v0.6.0
github.com/hashicorp/consul/api v1.29.1
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.103.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.103.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.103.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.103.0
github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil v0.103.0
github.com/jj22ee/opentelemetry-collector-contrib/internal/common v0.103.0
github.com/jj22ee/opentelemetry-collector-contrib/internal/k8sconfig v0.103.0
github.com/jj22ee/opentelemetry-collector-contrib/internal/metadataproviders v0.103.0
github.com/shirou/gopsutil/v3 v3.24.5
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.103.0
Expand Down Expand Up @@ -149,19 +149,19 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common
replace github.com/jj22ee/opentelemetry-collector-contrib/internal/common => ../../internal/common

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil => ../../internal/aws/ecsutil
replace github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil => ../../internal/aws/ecsutil

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders
replace github.com/jj22ee/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders

retract (
v0.76.2
v0.76.1
v0.65.0
)

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig
replace github.com/jj22ee/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig

// openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD
replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ec2 // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
package ec2 // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
)

// Config defines user-specified configurations unique to the EC2 detector
Expand Down
8 changes: 4 additions & 4 deletions processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ec2 // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"
package ec2 // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2"

import (
"context"
Expand All @@ -18,9 +18,9 @@ import (
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
"go.uber.org/zap"

ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
ec2provider "github.com/jj22ee/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"go.opentelemetry.io/collector/processor/processortest"
"go.uber.org/zap"

ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
ec2provider "github.com/jj22ee/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/internal/metadata"
)

var errUnavailable = errors.New("ec2metadata unavailable")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ecs // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
package ecs // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
)

type Config struct {
Expand Down
10 changes: 5 additions & 5 deletions processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ecs // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"
package ecs // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs"

import (
"bytes"
Expand All @@ -14,10 +14,10 @@ import (
"go.opentelemetry.io/collector/processor"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/endpoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil"
"github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil/endpoints"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/processor/processortest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/endpoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil"
"github.com/jj22ee/opentelemetry-collector-contrib/internal/aws/ecsutil/endpoints"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/internal/metadata"
)

type mockMetaDataProvider struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package eks // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
package eks // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
)

type Config struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package eks // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"
package eks // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks"

import (
"context"
Expand All @@ -21,8 +21,8 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"

"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/internal/metadata"
)

const (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package elasticbeanstalk // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"
package elasticbeanstalk // import "github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk"

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/internal/metadata"
"github.com/jj22ee/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/internal/metadata"
)

type Config struct {
Expand Down
Loading

0 comments on commit 5f2b01c

Please sign in to comment.