-
Notifications
You must be signed in to change notification settings - Fork 820
Enable wrapping of distributor push. #3755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable wrapping of distributor push. #3755
Conversation
e1b3788
to
299d0ad
Compare
299d0ad
to
9e74266
Compare
Would it make sense to reuse recently introduced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to me. Just left minor comments.
Would it make sense to reuse recently introduced PushOnlyIngesterServer instead?
@pstibrany I'm not sure. I talked to Karsten offline and the use case here is to run the distributor as is but being able, in a downstream project, to access the WriteRequest
before (or after) it has been handled by the Distributor.Push()
. I think a wrapper here is what we want. WDYT?
c43a8cb
to
3d54f41
Compare
What I meant was to modify
Which would work and wouldn't introduce new dependencies, but it doesn't really solve the problem this PR is solving. While working on this, we I'd suggest we reduce the dependency from
WDYT? |
@pracucci the linter complains
Should I ignore it? |
@pstibrany, I've tried that but it introduces a circular dependency since the config in
I was thinking about this. However, the wrapper is defined in the config. Since the config is passed to the handler why not evaluate it there?
Ah, I start to understand. You don't want the dependency on config and thus avoid the circular dependency. I'm open to that. @pracucci, what's your take? |
@jeschkies I'm fine with Peter's suggestion 👍 |
Once you will move it to |
3d54f41
to
71f2866
Compare
I called it |
fa59a1b
to
990458a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing our feedback!
990458a
to
53365f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (modulo a couple of nits). Thanks!
Summary: Introduces PushFunc and PushWrapper types which are used to defined a configurable wrapper around the push function of the distributor. It is similar to an HTTP middleware but receives the already deserialized write request. Co-authored-by: Marco Pracucci <marco@pracucci.com> Signed-off-by: Karsten Jeschkies <k@jeschkies.xyz>
53365f2
to
9ba2e56
Compare
Summary:
Introduces
PushFunc
andPushWrapper
types which are used to defined aconfigurable wrapper around the push function of the distributor. It is
similar to an HTTP middleware but receives the already deserialized
write request.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]