Skip to content

Commit

Permalink
azuremonitorexporter: migrate to newer semconv versions (open-telemet…
Browse files Browse the repository at this point in the history
…ry#35350)

Description: The version of semconv is upgraded from v1.6.1 to newer
versions

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.7.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.7.0)
- 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_:

<img width="798" alt="otel_comp"
src="https://github.com/user-attachments/assets/5e9befc7-80f9-4758-a357-0dec82373a11">

Link to tracking Issue:
open-telemetry#22095

Testing: Tests passed
  • Loading branch information
narcis96 authored and jriguera committed Oct 4, 2024
1 parent e76fcde commit aa95e21
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/contracts_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package azuremonitorexporter // import "github.com/open-telemetry/opentelemetry-
import (
"github.com/microsoft/ApplicationInsights-Go/appinsights/contracts"
"go.opentelemetry.io/collector/pdata/pcommon" // Applies resource attributes values to data properties
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/conventions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"

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

/*
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/conventions_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.7.0"
)

func TestHTTPAttributeMapping(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/logexporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/stretchr/testify/require"
"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"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/trace_to_envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/microsoft/ApplicationInsights-Go/appinsights/contracts"
"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"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/trace_to_envelope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/assert"
"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"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/traceexporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/mock"
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/pdata/ptrace"
conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
"go.uber.org/zap"
"golang.org/x/net/context"
)
Expand Down

0 comments on commit aa95e21

Please sign in to comment.