Skip to content

DurableEmitter: Instrument Callsites#2134

Open
DylanTinianov wants to merge 2 commits into
mainfrom
CRE-4443-durable-emitter-err
Open

DurableEmitter: Instrument Callsites#2134
DylanTinianov wants to merge 2 commits into
mainfrom
CRE-4443-durable-emitter-err

Conversation

@DylanTinianov
Copy link
Copy Markdown
Contributor

@DylanTinianov DylanTinianov commented Jun 8, 2026

Add emit callsites and noop if not initialized to prevent plumbing config everywhere.

@DylanTinianov DylanTinianov self-assigned this Jun 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

@DylanTinianov DylanTinianov changed the title DurableEmitter: Noop if not initialized DurableEmitter: Instrument Callsites Jun 8, 2026
@DylanTinianov DylanTinianov marked this pull request as ready for review June 8, 2026 15:13
@DylanTinianov DylanTinianov requested review from a team as code owners June 8, 2026 15:13
@DylanTinianov DylanTinianov enabled auto-merge June 8, 2026 18:29
d := globalEmitter.Load()
if d == nil {
return errors.New("global DurableEmitter not initialized; call durableemitter.Setup first")
return nil
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.

this coalesces a negative path with a happy path which is not ideal. IMHO a better path forward is to either keep the error path as is, or define explicit error types that a consumer can switch case on.

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