This repository was archived by the owner on Jun 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import pRetry from 'p-retry'
33import * as Name from 'w3name'
44import { ethers } from 'ethers'
55import * as SparkImpactEvaluator from '@filecoin-station/spark-impact-evaluator'
6+ import { reportW3NameError } from './telemetry.js'
67
78const {
89 // https://github.com/filecoin-station/contract-addresses
@@ -65,6 +66,7 @@ async function getContractAddresses () {
6566 try {
6667 revision = await Name . resolve ( name )
6768 } catch ( err ) {
69+ reportW3NameError ( )
6870 // These errors aren't actionable
6971 err . reportToSentry = false
7072 throw err
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { CarReader } from '@ipld/car'
1212import { validateBlock } from '@web3-storage/car-block-validator'
1313import { recursive as exporter } from 'ipfs-unixfs-exporter'
1414import * as tar from 'tar'
15+ import { reportW3NameError } from './telemetry.js'
1516
1617/** @typedef {import('unzip-stream').UnzipStreamEntry } UnzipStreamEntry */
1718
@@ -110,6 +111,7 @@ async function getLatestCID (ipnsKey) {
110111 try {
111112 revision = await Name . resolve ( name )
112113 } catch ( err ) {
114+ reportW3NameError ( )
113115 // These errors aren't actionable
114116 err . reportToSentry = false
115117 throw err
Original file line number Diff line number Diff line change @@ -102,3 +102,10 @@ export const runMachinesLoop = async ({ STATION_ID }) => {
102102 await timers . setTimeout ( 24 * 3600 * 1000 ) // 1 day
103103 }
104104}
105+
106+ export const reportW3NameError = ( ) => {
107+ const point = new Point ( 'w3name-error' )
108+ point . stringField ( 'version' , pkg . version )
109+ writeClient . writePoint ( point )
110+ writeClient . flush ( ) . catch ( handleFlushError )
111+ }
You can’t perform that action at this time.
0 commit comments