Skip to content

Commit

Permalink
feat: add otel instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseRFelix committed Aug 9, 2024
1 parent 32b4840 commit 8f8c680
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/web/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { registerOTel } from "@vercel/otel";

export function register() {
registerOTel({
serviceName: "osmosis-frontend",
});
}
3 changes: 3 additions & 0 deletions packages/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ const config = {

return config;
},
experimental: {
instrumentationHook: true,
},
};

const withBundleAnalyzer = require("@next/bundle-analyzer")({
Expand Down
2 changes: 2 additions & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@keplr-wallet/wc-client": "0.10.24-ibc.go.v7.hot.fix",
"@metamask/onboarding": "^1.0.1",
"@next/bundle-analyzer": "^12.1.6",
"@opentelemetry/api": "^1.9.0",
"@osmosis-labs/bridge": "^1.0.0",
"@osmosis-labs/keplr-hooks": "0.10.24-ibc.go.v7.hot.fix",
"@osmosis-labs/keplr-stores": "0.10.24-ibc.go.v7.hot.fix",
Expand Down Expand Up @@ -84,6 +85,7 @@
"@trpc/next": "^10.45.1",
"@trpc/react-query": "^10.45.1",
"@trpc/server": "^10.45.1",
"@vercel/otel": "^1.9.1",
"@visx/curve": "^2.17.0",
"@visx/gradient": "^3.3.0",
"@visx/responsive": "^2.17.0",
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5717,6 +5717,11 @@
resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca"
integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==

"@opentelemetry/api@^1.9.0":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe"
integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==

"@parcel/[email protected]":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84"
Expand Down Expand Up @@ -7766,6 +7771,11 @@
dependencies:
crypto-js "^4.2.0"

"@vercel/otel@^1.9.1":
version "1.9.1"
resolved "https://registry.yarnpkg.com/@vercel/otel/-/otel-1.9.1.tgz#5ec83247f307738c95a0c7ddd3993fe4a0aac719"
integrity sha512-ZSTqgvd+w/lcB1nxEW8EHSBBqd4ZdeJ1t5op1CFo/nKFdG/EshwMon0qKc2ZxVEZXOZJI/x+LKf8Y5/Y/VHqEA==

"@visx/[email protected]":
version "2.18.0"
resolved "https://registry.npmjs.org/@visx/annotation/-/annotation-2.18.0.tgz"
Expand Down

0 comments on commit 8f8c680

Please sign in to comment.