bla bli blub
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
faro.receiver "integrations_app_agent_receiver" {
|
||||
extra_log_labels = {
|
||||
app = "Frontend Observability",
|
||||
kind = "",
|
||||
}
|
||||
|
||||
server {
|
||||
listen_address = "0.0.0.0"
|
||||
listen_port = "8027"
|
||||
cors_allowed_origins = ["*"]
|
||||
max_allowed_payload_size = "10MiB"
|
||||
|
||||
rate_limiting {
|
||||
rate = 50
|
||||
}
|
||||
}
|
||||
|
||||
sourcemaps { }
|
||||
|
||||
output {
|
||||
logs = [loki.process.logs_process_client.receiver]
|
||||
traces = []
|
||||
}
|
||||
}
|
||||
|
||||
loki.process "logs_process_client" {
|
||||
forward_to = [loki.write.logs_write_client.receiver]
|
||||
|
||||
stage.json {
|
||||
expressions = {
|
||||
app = "",
|
||||
service_name = "",
|
||||
kind = "",
|
||||
message = "",
|
||||
level = ""
|
||||
}
|
||||
}
|
||||
|
||||
stage.labels {
|
||||
values = {
|
||||
kind = "kind",
|
||||
service_name = "service_name",
|
||||
app = "app",
|
||||
level = "level",
|
||||
}
|
||||
}
|
||||
|
||||
stage.static_labels {
|
||||
set = {
|
||||
source = "faro",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loki.write "logs_write_client" {
|
||||
endpoint {
|
||||
url = "http://loki:3100/loki/api/v1/push"
|
||||
}
|
||||
external_labels = {
|
||||
}
|
||||
}
|
||||
|
||||
logging {
|
||||
level = "info"
|
||||
}
|
||||
+25
-27
@@ -1,39 +1,37 @@
|
||||
import "@/App.css";
|
||||
|
||||
import {
|
||||
getWebInstrumentations,
|
||||
initializeFaro,
|
||||
ReactIntegration,
|
||||
ConsoleInstrumentation,
|
||||
WebVitalsInstrumentation,
|
||||
LogLevel,
|
||||
getWebInstrumentations,
|
||||
initializeFaro,
|
||||
ReactIntegration,
|
||||
ConsoleInstrumentation,
|
||||
WebVitalsInstrumentation,
|
||||
} from "@grafana/faro-react";
|
||||
import Dashboard from "@/components/Dashboard/Dashboard";
|
||||
|
||||
function App() {
|
||||
const isProduction = import.meta.env.PROD;
|
||||
const isProduction = import.meta.env.PROD;
|
||||
|
||||
if (isProduction && window.location.hostname === "localhost") {
|
||||
console.debug("Initializing Faro environment...");
|
||||
if (window.location.hostname === "localhost" && isProduction) {
|
||||
initializeFaro({
|
||||
url: "http://alloy:8027/collect",
|
||||
app: {
|
||||
name: "monitor-im-flur",
|
||||
version: "0.0.1",
|
||||
environment: "production",
|
||||
},
|
||||
instrumentations: [
|
||||
...getWebInstrumentations({
|
||||
captureConsole: true,
|
||||
}),
|
||||
new ConsoleInstrumentation(),
|
||||
new WebVitalsInstrumentation(),
|
||||
new ReactIntegration(),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
initializeFaro({
|
||||
url: "http://localhost:12347/collect",
|
||||
app: {
|
||||
name: "monitor-im-flur",
|
||||
version: import.meta.env.VITE_APP_VERSION || "0.0.1",
|
||||
environment: "production",
|
||||
},
|
||||
instrumentations: [
|
||||
...getWebInstrumentations({
|
||||
captureConsole: true,
|
||||
}),
|
||||
new ConsoleInstrumentation(),
|
||||
new WebVitalsInstrumentation(),
|
||||
new ReactIntegration(),
|
||||
],
|
||||
});
|
||||
}
|
||||
return <Dashboard />;
|
||||
return <Dashboard />;
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user