Skip to content

Commit 6f46fc2

Browse files
authored
Merge branch 'main' into main
2 parents 3aa2e47 + b639d3d commit 6f46fc2

File tree

14 files changed

+360
-101
lines changed

14 files changed

+360
-101
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: farotranslator
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Adds support for user actions in the Faro translator.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39141]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

exporter/faroexporter/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ require (
8585
golang.org/x/net v0.38.0 // indirect
8686
golang.org/x/sys v0.31.0 // indirect
8787
golang.org/x/text v0.23.0 // indirect
88-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 // indirect
88+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
8989
google.golang.org/protobuf v1.36.6 // indirect
9090
gopkg.in/yaml.v3 v3.0.1 // indirect
9191
)

exporter/faroexporter/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/translator/faro/faro_to_logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TranslateToLogs(ctx context.Context, payload faroTypes.Payload) (plog.Logs,
6666
return logs, nil
6767
}
6868

69-
meta := MetaToKeyVal(payload.Meta)
69+
meta := metaToKeyVal(payload.Meta)
7070
rls := logs.ResourceLogs().AppendEmpty()
7171
rls.Resource().Attributes().PutStr(string(semconv.ServiceNameKey), payload.Meta.App.Name)
7272
rls.Resource().Attributes().PutStr(string(semconv.ServiceVersionKey), payload.Meta.App.Version)

pkg/translator/faro/faro_to_logs_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ func TestTranslateToLogs(t *testing.T) {
4949
expectedLogsFile: filepath.Join("testdata", "browser-brand-string-payload", "plogs.yaml"),
5050
wantErr: assert.NoError,
5151
},
52+
{
53+
name: "Payload with actions",
54+
faroPayload: PayloadFromFile(t, "actions-payload/payload.json"),
55+
expectedLogsFile: filepath.Join("testdata", "actions-payload", "plogs.yaml"),
56+
wantErr: assert.NoError,
57+
},
5258
}
5359

5460
for _, tt := range testcases {

pkg/translator/faro/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.3
44

55
require (
66
github.com/go-logfmt/logfmt v0.6.0
7-
github.com/grafana/faro/pkg/go v0.0.0-20250303131049-4a4f3d5b57fc
7+
github.com/grafana/faro/pkg/go v0.0.0-20250314155512-06a06da3b8bc
88
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.123.0
99
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.123.0
1010
github.com/stretchr/testify v1.10.0
@@ -37,10 +37,10 @@ require (
3737
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
3838
go.opentelemetry.io/otel/metric v1.35.0 // indirect
3939
go.opentelemetry.io/otel/trace v1.35.0 // indirect
40-
golang.org/x/net v0.37.0 // indirect
40+
golang.org/x/net v0.38.0 // indirect
4141
golang.org/x/sys v0.31.0 // indirect
4242
golang.org/x/text v0.23.0 // indirect
43-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 // indirect
43+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
4444
google.golang.org/grpc v1.71.1 // indirect
4545
google.golang.org/protobuf v1.36.6 // indirect
4646
gopkg.in/yaml.v3 v3.0.1 // indirect

pkg/translator/faro/go.sum

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)