Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove network name param and unnecessary prometheus labels #423

Merged
merged 2 commits into from
Jan 29, 2025
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
1 change: 0 additions & 1 deletion src/cli/config/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export const logArgsSchema = z.object({
"redis-queue-endpoint": z.string().optional(),
"redis-event-manager-queue-name": z.string().optional(),
json: z.boolean(),
"network-name": z.string(),
"log-level": logLevel,
"public-client-log-level": logLevel.optional(),
"wallet-client-log-level": logLevel.optional(),
Expand Down
6 changes: 0 additions & 6 deletions src/cli/config/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,6 @@ export const logOptions: CliCommandOptions<ILogArgsInput> = {
require: true,
default: false
},
"network-name": {
description: "Name of the network (used for metrics)",
type: "string",
require: true,
default: "localhost"
},
"log-level": {
description: "Default log level",
type: "string",
Expand Down
6 changes: 1 addition & 5 deletions src/cli/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function bundlerHandler(args_: IOptionsInput): Promise<void> {

const chain: Chain = {
id: chainId,
name: args.networkName,
name: 'chain-name', // isn't important, never used
nativeCurrency: {
name: "ETH",
symbol: "ETH",
Expand Down Expand Up @@ -157,10 +157,6 @@ export async function bundlerHandler(args_: IOptionsInput): Promise<void> {
await gasPriceManager.init()

const registry = new Registry()
registry.setDefaultLabels({
network: chain.name,
chainId
})
const metrics = createMetrics(registry)

await preFlightChecks(config)
Expand Down
6 changes: 1 addition & 5 deletions src/utils/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export function createMetrics(registry: Registry, register = true) {
help: "Total number of requests",
labelNames: [
"route",
"network",
"chainId",
"rpc_method",
"rpc_status",
"code",
Expand All @@ -33,8 +31,6 @@ export function createMetrics(registry: Registry, register = true) {
help: "Duration of requests in seconds",
labelNames: [
"route",
"network",
"chainId",
"rpc_method",
"rpc_status",
"code",
Expand All @@ -47,7 +43,7 @@ export function createMetrics(registry: Registry, register = true) {
const userOperationsInMempool = new Gauge({
name: "alto_user_operations_in_mempool_count",
help: "Number of user operations in mempool",
labelNames: ["network", "chainId", "status"] as const,
labelNames: ["status"] as const,
registers
})

Expand Down