Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alibabacloudlogserviceexporter: migrate to latest semconv version #35342

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/collector/exporter/exportertest"
"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"
)

func createSimpleLogData(numberOfLogs int) plog.Logs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/gogo/protobuf/proto"
"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/coreinternal/traceutil"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"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"
)

func fillComplexAttributeValueMap(m pcommon.Map) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.27.0"
)

type logKeyValuePair struct {
Expand Down Expand Up @@ -89,7 +89,7 @@ func fillResource(resource pcommon.Resource) {
attrs.PutStr(conventions.AttributeHostName, "xxx.et15")
attrs.PutStr(conventions.AttributeContainerName, "signup_aggregator")
attrs.PutStr(conventions.AttributeContainerImageName, "otel/signupaggregator")
attrs.PutStr(conventions.AttributeContainerImageTag, "v1")
attrs.PutStr(conventions.AttributeContainerImageTags, "v1")
attrs.PutStr(conventions.AttributeCloudProvider, conventions.AttributeCloudProviderAWS)
attrs.PutStr(conventions.AttributeCloudAccountID, "999999998")
attrs.PutStr(conventions.AttributeCloudRegion, "us-west-2")
Expand All @@ -98,9 +98,9 @@ func fillResource(resource pcommon.Resource) {

func fillHTTPClientSpan(span ptrace.Span) {
attributes := make(map[string]any)
attributes[conventions.AttributeHTTPMethod] = "GET"
attributes[conventions.AttributeHTTPURL] = "https://api.example.com/users/junit"
attributes[conventions.AttributeHTTPStatusCode] = 200
attributes[conventions.AttributeHTTPRequestMethod] = "GET"
attributes[conventions.AttributeURLFull] = "https://api.example.com/users/junit"
attributes[conventions.AttributeHTTPResponseStatusCode] = 200
endTime := time.Unix(12300, 123456789)
startTime := endTime.Add(-90 * time.Second)
constructSpanAttributes(attributes).CopyTo(span.Attributes())
Expand Down Expand Up @@ -130,10 +130,10 @@ func fillHTTPClientSpan(span ptrace.Span) {

func fillHTTPServerSpan(span ptrace.Span) {
attributes := make(map[string]any)
attributes[conventions.AttributeHTTPMethod] = "GET"
attributes[conventions.AttributeHTTPURL] = "https://api.example.com/users/junit"
attributes[conventions.AttributeHTTPClientIP] = "192.168.15.32"
attributes[conventions.AttributeHTTPStatusCode] = 200
attributes[conventions.AttributeHTTPRequestMethod] = "GET"
attributes[conventions.AttributeURLFull] = "https://api.example.com/users/junit"
attributes[conventions.AttributeClientAddress] = "192.168.15.32"
attributes[conventions.AttributeHTTPResponseStatusCode] = 200
endTime := time.Unix(12300, 123456789)
startTime := endTime.Add(-90 * time.Second)
constructSpanAttributes(attributes).CopyTo(span.Attributes())
Expand Down
Loading