Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Oct 30, 2024
1 parent f4cd2e0 commit 5dbefcf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ResourceLogs(records []log.Record) []*lpb.ResourceLogs {
var emptyScope instrumentation.Scope
if scope != emptyScope {
sl.Scope = &cpb.InstrumentationScope{
Name: scope.Name,
Name: scope.Name,
Version: scope.Version,
Attributes: AttrIter(scope.Attributes.Iter()),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
lpb "go.opentelemetry.io/proto/otlp/logs/v1"
rpb "go.opentelemetry.io/proto/otlp/resource/v1"

"go.opentelemetry.io/otel/attribute"
api "go.opentelemetry.io/otel/log"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/log"
Expand Down Expand Up @@ -70,9 +71,10 @@ var (
flagsD = byte(0)

scope = instrumentation.Scope{
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
}
scope2 = instrumentation.Scope{
Name: "otel/test/code/path2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ResourceLogs(records []log.Record) []*lpb.ResourceLogs {
var emptyScope instrumentation.Scope
if scope != emptyScope {
sl.Scope = &cpb.InstrumentationScope{
Name: scope.Name,
Name: scope.Name,
Version: scope.Version,
Attributes: AttrIter(scope.Attributes.Iter()),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
lpb "go.opentelemetry.io/proto/otlp/logs/v1"
rpb "go.opentelemetry.io/proto/otlp/resource/v1"

"go.opentelemetry.io/otel/attribute"
api "go.opentelemetry.io/otel/log"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/log"
Expand Down Expand Up @@ -70,9 +71,10 @@ var (
flagsD = byte(0)

scope = instrumentation.Scope{
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
}
scope2 = instrumentation.Scope{
Name: "otel/test/code/path2",
Expand Down
8 changes: 5 additions & 3 deletions internal/shared/otlp/otlplog/transform/log_test.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
lpb "go.opentelemetry.io/proto/otlp/logs/v1"
rpb "go.opentelemetry.io/proto/otlp/resource/v1"

"go.opentelemetry.io/otel/attribute"
api "go.opentelemetry.io/otel/log"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/log"
Expand Down Expand Up @@ -70,9 +71,10 @@ var (
flagsD = byte(0)

scope = instrumentation.Scope{
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Name: "otel/test/code/path1",
Version: "v0.1.1",
SchemaURL: semconv.SchemaURL,
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
}
scope2 = instrumentation.Scope{
Name: "otel/test/code/path2",
Expand Down

0 comments on commit 5dbefcf

Please sign in to comment.