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
6 changes: 6 additions & 0 deletions .changeset/big-parents-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@eth-optimism/batch-submitter": patch
"@eth-optimism/data-transport-layer": patch
---

Adds a release version to batch-submitter and data-transport-layer usage of Sentry
3 changes: 3 additions & 0 deletions packages/batch-submitter/exec/run-batch-submitter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env node

console.log(process.env.npm_package_version);
process.exit(1)

const batchSubmitter = require("../dist/src/exec/run-batch-submitter")

batchSubmitter.run()
1 change: 1 addition & 0 deletions packages/batch-submitter/src/exec/run-batch-submitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
const log = new Logger({
name: 'oe:batch-submitter:init',
sentryOptions: {
release: `@eth-optimism/batch-submitter@${process.env.npm_package_version}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this injected in at runtime by yarn?

Copy link
Contributor Author

@snario snario Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally like this:

❯ cat exec/run-batch-submitter.js
console.log(process.env.npm_package_version);

❯ yarn start
$ node ./exec/run-batch-submitter.js
0.1.12

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that yarn or npm MUST be the entrypoint or it will be undefined

dsn: process.env.SENTRY_DSN,
tracesSampleRate: 0.05,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
this.state.app = express()
Sentry.init({
dsn: this.options.sentryDsn,
release: `@eth-optimism/data-transport-layer@${process.env.npm_package_version}`,
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({
Expand Down