Skip to content

Conversation

jtheopillus
Copy link
Contributor

Eppo Internal:

🎟️ Fixes issue
πŸ“œ Design Doc: link if applicable

Motivation and Context

Add methods that pass context while getting assignment

Description

Context is very useful to pass values (e.g. for tracing in the logger)

How has this been documented?

How has this been tested?

Copy link
Member

@leoromanovsky leoromanovsky left a comment

Choose a reason for hiding this comment

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

thanks for the contribution; looking forward to rolling this out and making it the canonical pattern in the next major version.

Comment on lines 8 to +15
type IAssignmentLogger interface {
LogAssignment(event AssignmentEvent)
}

type IAssignmentLoggerContext interface {
LogAssignment(context.Context, AssignmentEvent)
}

Copy link
Member

Choose a reason for hiding this comment

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

thanks for adding this. would appreciate a comment on IAssignmentLogger declaring it deprecated at next major version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added the comment πŸ‘


switch {
case ec.loggerContext != nil:
// prioritise logger context if it's defined in the config
Copy link
Member

Choose a reason for hiding this comment

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

πŸ‘

@leoromanovsky leoromanovsky merged commit 4b99235 into Eppo-exp:main Jul 7, 2025
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.

2 participants