Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ STEEM_RPC_URL=https://api.steemit.com
NEXT_PUBLIC_SIGNUP_URL=https://signup.steemit.com
# Test:
# NEXT_PUBLIC_SIGNUP_URL=https://signup.steemitdev.com

# OpenTelemetry tracing (server-side only). Disabled unless an OTLP endpoint
# is set — do not default-on against localhost or logs will flood when no
# collector is running. Matches jussi/conveyor: OTLP HTTP + optional custom
# path/headers for OpenObserve.
# WALLET_TELEMETRY_ENABLED=true
# WALLET_TELEMETRY_SERVICE_NAME=wallet
# WALLET_TELEMETRY_OTLP_ENDPOINT=http://10.188.1.50:5080
# WALLET_TELEMETRY_OTLP_PATH=/api/default/v1/traces
# WALLET_TELEMETRY_OTLP_HEADERS=Authorization=Basic ...
# WALLET_TELEMETRY_RESOURCE_ATTRIBUTES=deployment.environment=dev
# OTEL_SDK_DISABLED=true # emergency kill switch (standard OTel env)
8 changes: 8 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ services:
- LOG_LEVEL=${LOG_LEVEL:-info}
- LOG_REQUESTS=${LOG_REQUESTS:-false}

# OpenTelemetry (optional; off unless WALLET_TELEMETRY_OTLP_ENDPOINT is set)
- WALLET_TELEMETRY_ENABLED=${WALLET_TELEMETRY_ENABLED:-}
- WALLET_TELEMETRY_SERVICE_NAME=${WALLET_TELEMETRY_SERVICE_NAME:-wallet}
- WALLET_TELEMETRY_OTLP_ENDPOINT=${WALLET_TELEMETRY_OTLP_ENDPOINT:-}
- WALLET_TELEMETRY_OTLP_PATH=${WALLET_TELEMETRY_OTLP_PATH:-}
- WALLET_TELEMETRY_OTLP_HEADERS=${WALLET_TELEMETRY_OTLP_HEADERS:-}
- WALLET_TELEMETRY_RESOURCE_ATTRIBUTES=${WALLET_TELEMETRY_RESOURCE_ATTRIBUTES:-}

# Health check
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/health"]
Expand Down
17 changes: 15 additions & 2 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,21 @@ const nextConfig: NextConfig = {
// Compress responses
compress: true,

// Exclude mysql2 from client-side bundling (server-only native module)
serverExternalPackages: ['mysql2'],
// Exclude native / Node-only packages from the client bundle. OpenTelemetry
// must stay on the server so the SDK can patch http/undici for W3C propagation.
serverExternalPackages: [
'mysql2',
'@opentelemetry/api',
'@opentelemetry/context-async-hooks',
'@opentelemetry/core',
'@opentelemetry/exporter-trace-otlp-http',
'@opentelemetry/instrumentation',
'@opentelemetry/instrumentation-http',
'@opentelemetry/instrumentation-undici',
'@opentelemetry/resources',
'@opentelemetry/sdk-trace-node',
'@opentelemetry/semantic-conventions',
],

// Subresource Integrity: generate SHA-256 hashes for all JS bundles at
// build time. Browsers verify file integrity via the `integrity` attribute,
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@
"e2e:ui": "playwright test --ui"
},
"dependencies": {
"@opentelemetry/api": "^1.9.1",
"@opentelemetry/context-async-hooks": "^2.10.0",
"@opentelemetry/core": "^2.10.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
"@opentelemetry/instrumentation": "^0.221.0",
"@opentelemetry/instrumentation-http": "^0.221.0",
"@opentelemetry/instrumentation-undici": "^0.31.0",
"@opentelemetry/resources": "^2.10.0",
"@opentelemetry/sdk-trace-node": "^2.10.0",
"@opentelemetry/semantic-conventions": "^1.43.0",
"@reduxjs/toolkit": "^2.11.2",
"@steemit/steem-js": "^1.2.0",
"class-variance-authority": "^0.7.1",
Expand Down
Loading
Loading