Skip to content

Commit

Permalink
internal/ + pkg/ : migrate to latest semconv version (open-telemetry#…
Browse files Browse the repository at this point in the history
…35241)

Description: The version of semconv is upgraded to v1.27.0

The semconv attributes' value have been compared using
[go-otel-semconv-comparator](https://github.com/narcis96/go-otel-semconv-comparator)
resulting in 0 diffs:
- 1.12.0 version has been used if the no newer version contains all
attributes used by the file (all attributes of 1.6.1 exists and have the
same value inside 1.12.0)
- 1.27.0 version has been used if only if the file does not contain
AttributeMessagingMessageID and AttributeMessagingKafkaMessageKey:

Link to tracking Issue:
open-telemetry#22095

Testing: Tests passed
  • Loading branch information
narcis96 authored and AkhigbeEromo committed Oct 9, 2024
1 parent a171a3e commit 93f0b35
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion internal/coreinternal/goldendataset/resource_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package goldendataset // import "github.com/open-telemetry/opentelemetry-collect

import (
"go.opentelemetry.io/collector/pdata/pcommon"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.18.0"
)

// GenerateResource generates a PData Resource object with representative attributes for the
Expand Down
2 changes: 1 addition & 1 deletion internal/coreinternal/goldendataset/span_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.12.0"
)

var statusCodeMap = map[PICTInputStatus]ptrace.StatusCode{
Expand Down
2 changes: 1 addition & 1 deletion internal/coreinternal/parseutils/uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

semconv "go.opentelemetry.io/collector/semconv/v1.25.0"
semconv "go.opentelemetry.io/collector/semconv/v1.27.0"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/coreinternal/parseutils/uri_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
semconv "go.opentelemetry.io/collector/semconv/v1.25.0"
semconv "go.opentelemetry.io/collector/semconv/v1.27.0"
)

// Test all usecases: absolute uri, relative uri, query string
Expand Down
2 changes: 1 addition & 1 deletion internal/exp/metrics/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
conventions "go.opentelemetry.io/collector/semconv/v1.9.0"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden"
Expand Down
2 changes: 1 addition & 1 deletion internal/filter/filterlog/filterlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterconfig"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl"
Expand Down
2 changes: 1 addition & 1 deletion internal/filter/filtermatcher/filtermatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/pdata/pcommon"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterconfig"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset"
Expand Down
2 changes: 1 addition & 1 deletion internal/filter/filterspan/filterspan.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/pdata/pcommon"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr"
Expand Down
2 changes: 1 addition & 1 deletion internal/filter/filterspan/filterspan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"
Expand Down
2 changes: 1 addition & 1 deletion internal/metadataproviders/internal/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
conventions "go.opentelemetry.io/collector/semconv/v1.18.0"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
)

func TestGOOSToOsType(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/metadataproviders/system/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/Showmax/go-fqdn"
"github.com/shirou/gopsutil/v4/cpu"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"

Expand Down
2 changes: 1 addition & 1 deletion internal/splunk/hostid.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"go.opentelemetry.io/collector/pdata/pcommon"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
)

// HostIDKey represents a host identifier.
Expand Down
2 changes: 1 addition & 1 deletion internal/splunk/hostid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/pcommon"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/translator/opencensus/oc_to_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opencensus.io/trace"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.12.0"
"google.golang.org/protobuf/types/known/wrapperspb"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/occonventions"
Expand Down
2 changes: 1 addition & 1 deletion pkg/translator/opencensus/traces_to_oc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"go.opencensus.io/trace"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.12.0"
"google.golang.org/protobuf/types/known/wrapperspb"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/occonventions"
Expand Down

0 comments on commit 93f0b35

Please sign in to comment.