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

chore: add grafana faro sdk (CE) #38301

Merged
merged 29 commits into from
Dec 26, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ee46926
chore: add grafana faro sdk
dvj1988 Dec 23, 2024
c4ca320
Merge remote-tracking branch 'origin' into chore/add-faro-integration
dvj1988 Dec 23, 2024
02a8e73
fix type issues
dvj1988 Dec 23, 2024
c8c07e5
remove new relic envs and revert caddy changes
dvj1988 Dec 23, 2024
a5b2046
remove unused new relic variables
dvj1988 Dec 23, 2024
f6d216e
type error fixes
dvj1988 Dec 23, 2024
d466781
add a new line
dvj1988 Dec 23, 2024
789ca05
remove tracing instrumentation
dvj1988 Dec 23, 2024
e9270ed
fix jest test cases
dvj1988 Dec 23, 2024
7a79f71
fix path change for generateTraces
dvj1988 Dec 23, 2024
78f2ead
Merge remote-tracking branch 'origin' into chore/add-faro-integration
dvj1988 Dec 23, 2024
ab35c43
revert envvariables.java
dvj1988 Dec 23, 2024
63d4868
move convertWebworkerSpansToRegularSpans from generateWebWorkerTraces…
dvj1988 Dec 24, 2024
7095223
disable faro errors in console
dvj1988 Dec 24, 2024
de9249e
configure log levels for faro sdk
dvj1988 Dec 24, 2024
c845ab4
Merge remote-tracking branch 'origin' into chore/add-faro-integration
dvj1988 Dec 24, 2024
149ab89
move span and attributes type to instrumentation/types
dvj1988 Dec 24, 2024
4a40d66
move span and attributes type to instrumentation/types
dvj1988 Dec 24, 2024
265ac2e
rever unintended changes
dvj1988 Dec 24, 2024
33ca23b
Merge remote-tracking branch 'origin' into chore/add-faro-integration
dvj1988 Dec 25, 2024
5d2881c
revert yarn.lock
dvj1988 Dec 25, 2024
3160036
remove @sentry/webpack-plugin
dvj1988 Dec 25, 2024
3842f6c
add faro packages
dvj1988 Dec 25, 2024
459a9c0
prune dependencies
dvj1988 Dec 25, 2024
91fe8aa
remove default values of observability variables from index.html
dvj1988 Dec 25, 2024
382098a
resolve pr comments
dvj1988 Dec 25, 2024
6db7362
remove widget profiler
dvj1988 Dec 25, 2024
46a6c29
update opentelemetry packages
dvj1988 Dec 25, 2024
c9d4264
Merge remote-tracking branch 'origin' into chore/add-faro-integration
dvj1988 Dec 25, 2024
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
Prev Previous commit
Next Next commit
configure log levels for faro sdk
dvj1988 committed Dec 24, 2024

Verified

This commit was signed with the committer’s verified signature.
dvj1988 Diljit
commit de9249eabc70bbc368b340e14300d6eefb3305ba
15 changes: 10 additions & 5 deletions app/client/src/instrumentation/index.ts
Original file line number Diff line number Diff line change
@@ -14,22 +14,27 @@ import {
ReactIntegration,
getWebInstrumentations,
type Faro,
InternalLoggerLevel,
} from "@grafana/faro-react";
import {
FaroTraceExporter,
FaroSessionSpanProcessor,
} from "@grafana/faro-web-tracing";
import log from "loglevel";

const { observability } = getAppsmithConfigs();
const { deploymentName, serviceInstanceId, serviceName, tracingUrl } =
observability;
// This base domain is used to filter out the Smartlook requests from the browser agent
// There are some requests made to subdomains of smartlook.cloud which will also be filtered out
const smartlookBaseDomain = "smartlook.cloud";

let faro: Faro | null = null;

if (tracingUrl) {
const ignoreUrls = ["smartlook.cloud"];
const internalLoggerLevel =
log.getLevel() === log.levels.DEBUG
? InternalLoggerLevel.ERROR
: InternalLoggerLevel.OFF;

faro = initializeFaro({
url: tracingUrl,
app: {
@@ -38,13 +43,13 @@ if (tracingUrl) {
environment: deploymentName,
},
instrumentations: [new ReactIntegration(), ...getWebInstrumentations()],
ignoreUrls: [smartlookBaseDomain],
ignoreUrls,
consoleInstrumentation: {
consoleErrorAsLog: true,
},
trackResources: true,
trackWebVitalsAttribution: true,
internalLoggerLevel: 0,
internalLoggerLevel,
});

const tracerProvider = new WebTracerProvider({