Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
5c89c45f
Unverified
Commit
5c89c45f
authored
Jun 17, 2021
by
Ben Wilson
Committed by
GitHub
Jun 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the metric prefix string to a label (#1047)
Added changeset and fixes Changeset to patch
parent
b74b0520
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
sour-adults-worry.md
.changeset/sour-adults-worry.md
+7
-0
run-batch-submitter.ts
packages/batch-submitter/src/exec/run-batch-submitter.ts
+2
-2
metrics.ts
packages/common-ts/src/common/metrics.ts
+1
-1
service.ts
packages/data-transport-layer/src/services/server/service.ts
+1
-1
No files found.
.changeset/sour-adults-worry.md
0 → 100644
View file @
5c89c45f
---
'
@eth-optimism/batch-submitter'
:
patch
'
@eth-optimism/common-ts'
:
patch
'
@eth-optimism/data-transport-layer'
:
patch
---
Move the metric prefix string to a label #1047
packages/batch-submitter/src/exec/run-batch-submitter.ts
View file @
5c89c45f
...
@@ -84,6 +84,7 @@ export const run = async () => {
...
@@ -84,6 +84,7 @@ export const run = async () => {
const
env
=
process
.
env
const
env
=
process
.
env
const
environment
=
config
.
str
(
'
node-env
'
,
env
.
NODE_ENV
)
const
environment
=
config
.
str
(
'
node-env
'
,
env
.
NODE_ENV
)
const
network
=
config
.
str
(
'
eth-network-name
'
,
env
.
ETH_NETWORK_NAME
)
const
network
=
config
.
str
(
'
eth-network-name
'
,
env
.
ETH_NETWORK_NAME
)
const
service
=
`batch-submitter`
const
release
=
`batch-submitter@
${
env
.
npm_package_version
}
`
const
release
=
`batch-submitter@
${
env
.
npm_package_version
}
`
const
sentryDsn
=
config
.
str
(
'
sentry-dsn
'
,
env
.
SENTRY_DSN
)
const
sentryDsn
=
config
.
str
(
'
sentry-dsn
'
,
env
.
SENTRY_DSN
)
const
sentryTraceRate
=
config
.
ufloat
(
const
sentryTraceRate
=
config
.
ufloat
(
...
@@ -181,8 +182,7 @@ export const run = async () => {
...
@@ -181,8 +182,7 @@ export const run = async () => {
/* Metrics */
/* Metrics */
const
metrics
=
new
Metrics
({
const
metrics
=
new
Metrics
({
prefix
:
name
,
labels
:
{
environment
,
release
,
network
,
service
},
labels
:
{
environment
,
release
,
network
},
})
})
const
FRAUD_SUBMISSION_ADDRESS
=
config
.
str
(
const
FRAUD_SUBMISSION_ADDRESS
=
config
.
str
(
...
...
packages/common-ts/src/common/metrics.ts
View file @
5c89c45f
...
@@ -9,7 +9,7 @@ import { Server } from 'net'
...
@@ -9,7 +9,7 @@ import { Server } from 'net'
import
{
Logger
}
from
'
./logger
'
import
{
Logger
}
from
'
./logger
'
export
interface
MetricsOptions
{
export
interface
MetricsOptions
{
prefix
:
string
prefix
?
:
string
labels
?:
Object
labels
?:
Object
}
}
...
...
packages/data-transport-layer/src/services/server/service.ts
View file @
5c89c45f
...
@@ -153,11 +153,11 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
...
@@ -153,11 +153,11 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
*/
*/
private
_initMetrics
()
{
private
_initMetrics
()
{
this
.
metrics
=
new
Metrics
({
this
.
metrics
=
new
Metrics
({
prefix
:
this
.
name
,
labels
:
{
labels
:
{
environment
:
this
.
options
.
nodeEnv
,
environment
:
this
.
options
.
nodeEnv
,
network
:
this
.
options
.
ethNetworkName
,
network
:
this
.
options
.
ethNetworkName
,
release
:
this
.
options
.
release
,
release
:
this
.
options
.
release
,
service
:
this
.
name
,
},
},
})
})
const
metricsMiddleware
=
promBundle
({
const
metricsMiddleware
=
promBundle
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment