Skip to content

fix: send batch-submitter error logs to sentry#525

Merged
annieke merged 4 commits intomasterfrom
feat/bs-send-to-sentry
Apr 21, 2021
Merged

fix: send batch-submitter error logs to sentry#525
annieke merged 4 commits intomasterfrom
feat/bs-send-to-sentry

Conversation

@annieke
Copy link
Copy Markdown
Contributor

@annieke annieke commented Apr 20, 2021

Description
Batch submitter errors weren't being properly sent to Sentry before, due to the way the destination was initialized. This PR adds multi-stream functionality to Logger, and has been tested and sends log.errors in the Batch Submitter to Sentry.

Additional context
This now writes to both Sentry and stdout!

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 20, 2021

🦋 Changeset detected

Latest commit: 7836892

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@eth-optimism/core-utils Minor
@eth-optimism/batch-submitter Patch
@eth-optimism/contracts Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/message-relayer Patch
@eth-optimism/smock Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@annieke annieke requested a review from snario April 20, 2021 22:55
@tynes
Copy link
Copy Markdown
Contributor

tynes commented Apr 20, 2021

not sure how it impacts GCP logs but it stopped writing any logs to stdout during development.

GCP will read in logs via stdout and stderr and then index them for searching.

One fix is to use pino-multi-stream, which has may be significantly less performant according to this comment.

Looking at the comments following the link you posted, I think they have really high standards for fast (which is good) and we do enough network i/o to where that is likely the bottleneck and some additional overhead when logging won't be that big of a deal.

We will still want logs going to stdout for development purposes and having them viewable on GCP is nice. From the PoV of external Ethereum devs, we need to make sure our stack is easy to set up and deploy to for local networks

Copy link
Copy Markdown
Contributor

@snario snario left a comment

Choose a reason for hiding this comment

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

We should not disable STDOUT.

@annieke annieke requested a review from snario April 21, 2021 00:59
tracesSampleRate: 0.05,
level: 'error'
const log = new Logger({
name: 'oe:batch-submitter:init',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this conforming to some known format?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i have no idea... @karlfloersch might have more context here

Copy link
Copy Markdown
Contributor

@snario snario left a comment

Choose a reason for hiding this comment

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

Conditional approval on fixing the suggested change (i.e., .concat does not mutate)

@annieke annieke force-pushed the feat/bs-send-to-sentry branch from ad42d07 to 17e441e Compare April 21, 2021 16:06
@annieke annieke merged commit a0a7956 into master Apr 21, 2021
@annieke annieke deleted the feat/bs-send-to-sentry branch April 21, 2021 16:46
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
* fix: send batch-submitter error logs to sentry

* chore: changeset

* move sentry to logger and use multi-stream
theochap pushed a commit that referenced this pull request Jan 15, 2026
<!--
Thank you for your Pull Request. Please provide a description above and
review
the requirements below.

Bug fixes and new features should include tests.

Contributors guide:
https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md

The contributors guide includes instructions for running rustfmt and
building the
documentation.
-->

<!-- ** Please select "Allow edits from maintainers" in the PR Options
** -->

## Motivation

Ref alloy-rs/alloy#2478

`OpTransactionRequest` is a wrapper around `TransactionRequest`.

It doesn't implement `TransactionBuilder4844` (It shouldn't). But this
makes it incompatible with `ProviderBuilder` default constructor `new`

<!--
Explain the context and why you're making that change. What is the
problem
you're trying to solve? In some cases there is not a problem and this
can be
thought of as being the motivation for your change.
-->

## Solution

- Remove OpTransactionRequest
- Move related `From` conversions 
- Use TransactionRequest in network impl

<!--
Summarize the solution and provide any necessary context needed to
understand
the code change.
-->

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
theochap pushed a commit that referenced this pull request Jan 15, 2026
…ionRequest` of `Optimism` (#557)

## Motivation

The change #525 introduced ambiguity of
`alloy_network::TransactionBuilder` implementation for
`TransactionRequest`, being implemented twice once for `Ethereum` and
once for `Optimism`. This then requires fully qualified syntax to
differentiate.

## Solution

Bring back `OpTransactionRequest`

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
theochap pushed a commit that referenced this pull request Jan 21, 2026
…ionRequest` of `Optimism` (alloy-rs/op-alloy#557)

## Motivation

The change #525 introduced ambiguity of
`alloy_network::TransactionBuilder` implementation for
`TransactionRequest`, being implemented twice once for `Ethereum` and
once for `Optimism`. This then requires fully qualified syntax to
differentiate.

## Solution

Bring back `OpTransactionRequest`

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
emhane added a commit that referenced this pull request Feb 4, 2026
…ck_updates (#541)

Closes #525

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants