From 2b02d69bf55baf73eb7e2b9f3c3ab01bd676b57f Mon Sep 17 00:00:00 2001 From: Corey Ginnivan Date: Tue, 20 Aug 2024 22:24:23 +0800 Subject: [PATCH] Added favicon --- website/app/components/hero/hero-panel.tsx | 210 +++++++++++---------- website/app/lib/setupOpenTelemetry.tsx | 170 ++++++++--------- website/public/favicon.svg | 10 + 3 files changed, 198 insertions(+), 192 deletions(-) create mode 100644 website/public/favicon.svg diff --git a/website/app/components/hero/hero-panel.tsx b/website/app/components/hero/hero-panel.tsx index 813dcba..d6fe745 100644 --- a/website/app/components/hero/hero-panel.tsx +++ b/website/app/components/hero/hero-panel.tsx @@ -5,110 +5,114 @@ import DPurple from '~/images/hero/d-purple.svg?react' import { Box, Flex, styled } from '../../../styled-system/jsx' export const HomepageHeroPanel = () => { - const { scrollY } = useScroll() + const { scrollY } = useScroll() - const y2 = useTransform(scrollY, [0, 400], [0, 100], { ease: easeOut }) - const y3 = useTransform(scrollY, [0, 400], [0, 200], { ease: easeOut }) + const y2 = useTransform(scrollY, [0, 400], [0, 100], { ease: easeOut }) + const y3 = useTransform(scrollY, [0, 400], [0, 200], { ease: easeOut }) - return ( - + + - - - - Sat 16th November, 2024 - - - {' '} - •{' '} - - - Optus Stadium, Perth - - - - A one day, fully inclusive, approachable and affordable tech conference for everyone. - - - - - - - - - - - - - - - - ) + Sat 16th November, 2024 + + {' '} + •{' '} + + + Optus Stadium, Perth + + + + A one day, fully inclusive, approachable and affordable tech conference for everyone. + + + + + + + + + + + + + + + + ) } diff --git a/website/app/lib/setupOpenTelemetry.tsx b/website/app/lib/setupOpenTelemetry.tsx index 1d89a3e..2f8d3bc 100644 --- a/website/app/lib/setupOpenTelemetry.tsx +++ b/website/app/lib/setupOpenTelemetry.tsx @@ -1,10 +1,10 @@ import { - AzureMonitorLogExporter, - AzureMonitorMetricExporter, - AzureMonitorTraceExporter, + AzureMonitorLogExporter, + AzureMonitorMetricExporter, + AzureMonitorTraceExporter, } from '@azure/monitor-opentelemetry-exporter' import { createAzureSdkInstrumentation } from '@azure/opentelemetry-instrumentation-azure-sdk' -import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api' +import { DiagConsoleLogger, DiagLogLevel, diag } from '@opentelemetry/api' import { logs } from '@opentelemetry/api-logs' import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http' import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http' @@ -20,101 +20,93 @@ import { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_SERVICE_VERSION } from '@opentele import fs, { existsSync } from 'node:fs' import { RemixInstrumentation } from 'opentelemetry-instrumentation-remix' import { - APPLICATIONINSIGHTS_CONNECTION_STRING, - OTEL_EXPORTER_OTLP_ENDPOINT, - OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, + APPLICATIONINSIGHTS_CONNECTION_STRING, + OTEL_EXPORTER_OTLP_ENDPOINT, + OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, + OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, } from '../lib/config.server' export function configureOpenTelemetry() { - const enableTracingConsoleFallback = false + const enableTracingConsoleFallback = false - const traceExporter = APPLICATIONINSIGHTS_CONNECTION_STRING - ? new AzureMonitorTraceExporter({ - connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, - }) - : (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT) - ? new OTLPTraceExporter() - : enableTracingConsoleFallback - ? new ConsoleSpanExporter() - : undefined - - const metricExporter = APPLICATIONINSIGHTS_CONNECTION_STRING - ? new AzureMonitorMetricExporter({ - connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, - }) - : (OTEL_EXPORTER_OTLP_METRICS_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT) - ? new OTLPMetricExporter() - : undefined + const traceExporter = APPLICATIONINSIGHTS_CONNECTION_STRING + ? new AzureMonitorTraceExporter({ + connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, + }) + : OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT + ? new OTLPTraceExporter() + : enableTracingConsoleFallback + ? new ConsoleSpanExporter() + : undefined - const logsExporter = APPLICATIONINSIGHTS_CONNECTION_STRING - ? new AzureMonitorLogExporter({ - connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, - }) - : (OTEL_EXPORTER_OTLP_LOGS_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT) - ? new OTLPLogExporter() - : enableTracingConsoleFallback - ? new ConsoleLogRecordExporter() - : undefined + const metricExporter = APPLICATIONINSIGHTS_CONNECTION_STRING + ? new AzureMonitorMetricExporter({ + connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, + }) + : OTEL_EXPORTER_OTLP_METRICS_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT + ? new OTLPMetricExporter() + : undefined - const metricReader = metricExporter - ? new PeriodicExportingMetricReader({ - exporter: metricExporter, - }) + const logsExporter = APPLICATIONINSIGHTS_CONNECTION_STRING + ? new AzureMonitorLogExporter({ + connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING, + }) + : OTEL_EXPORTER_OTLP_LOGS_ENDPOINT ?? OTEL_EXPORTER_OTLP_ENDPOINT + ? new OTLPLogExporter() + : enableTracingConsoleFallback + ? new ConsoleLogRecordExporter() : undefined - const loggerProvider = new LoggerProvider() - const logRecordProcessor = logsExporter ? new BatchLogRecordProcessor(logsExporter) : undefined - if (logRecordProcessor) { - loggerProvider.addLogRecordProcessor(logRecordProcessor) - } + const metricReader = metricExporter + ? new PeriodicExportingMetricReader({ + exporter: metricExporter, + }) + : undefined + + const loggerProvider = new LoggerProvider() + const logRecordProcessor = logsExporter ? new BatchLogRecordProcessor(logsExporter) : undefined + if (logRecordProcessor) { + loggerProvider.addLogRecordProcessor(logRecordProcessor) + } - if (traceExporter || metricReader || logRecordProcessor) { - console.log('Configuring open telemetry') + if (traceExporter || metricReader || logRecordProcessor) { + console.log('Configuring open telemetry') - logs.setGlobalLoggerProvider(loggerProvider) - diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR) - const sdk = new NodeSDK({ - traceExporter: traceExporter, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - metricReader: metricReader as any, - logRecordProcessor, - instrumentations: [ - // Express instrumentation expects HTTP layer to be instrumented - new HttpInstrumentation({ - // Ignore specific endpoints - ignoreIncomingRequestHook: (request) => { - const ignorePaths = [ - '/healthcheck', - '/favicon.ico', - '/static', - '/@fs', - '/@id', - '/@vite', - '/app/', - ] - const shouldIgnore = ignorePaths.some((path) => request.url?.startsWith(path)) + logs.setGlobalLoggerProvider(loggerProvider) + diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR) + const sdk = new NodeSDK({ + traceExporter: traceExporter, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + metricReader: metricReader as any, + logRecordProcessor, + instrumentations: [ + // Express instrumentation expects HTTP layer to be instrumented + new HttpInstrumentation({ + // Ignore specific endpoints + ignoreIncomingRequestHook: (request) => { + const ignorePaths = ['/healthcheck', '/favicon.svg', '/static', '/@fs', '/@id', '/@vite', '/app/'] + const shouldIgnore = ignorePaths.some((path) => request.url?.startsWith(path)) - return shouldIgnore - }, - }), - new ExpressInstrumentation({}), - new RemixInstrumentation(), - createAzureSdkInstrumentation(), - ], - resource: new Resource({ - [SEMRESATTRS_SERVICE_NAME]: 'DDD-Website', - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - [SEMRESATTRS_SERVICE_VERSION]: JSON.parse( - existsSync('./server/package.json') - ? fs.readFileSync('./server/package.json', 'utf-8') - : fs.readFileSync('./package.json', 'utf-8'), - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - ), - }), - }) + return shouldIgnore + }, + }), + new ExpressInstrumentation({}), + new RemixInstrumentation(), + createAzureSdkInstrumentation(), + ], + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: 'DDD-Website', + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + [SEMRESATTRS_SERVICE_VERSION]: JSON.parse( + existsSync('./server/package.json') + ? fs.readFileSync('./server/package.json', 'utf-8') + : fs.readFileSync('./package.json', 'utf-8'), + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + ), + }), + }) - sdk.start() - } + sdk.start() + } } diff --git a/website/public/favicon.svg b/website/public/favicon.svg new file mode 100644 index 0000000..ce3215d --- /dev/null +++ b/website/public/favicon.svg @@ -0,0 +1,10 @@ + + + + + + + + + +