Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Can we pass context.Context to custom Bloblang functions?

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Locate the custom Bloblang function registration and the current func(args ...any) (any, error) entry point; read how the message context is available there. Done means custom functions can receive context.Context and use tracing information plus upstream timeout and cancellation behavior without breaking existing function behavior.

Written by the indexing model from the issue text.

Description

bloblang enhancement plugin api

Hey team,

I’m writing some custom Bloblang functions for a Benthos pipeline, and I noticed I can’t get the tracing info (trace / span) that’s already on the message. The reason is the current function signature doesn’t give us a context.Context.

Right now it’s:

func myFunc(args ...any) (any, error) {
    // no ctx here
}

If we could write it like this instead:

func myFunc(ctx context.Context, args ...any) (any, error) {
    span := trace.SpanFromContext(ctx)
    // do stuff...
}

we could:

  • keep end-to-end tracing intact (no more orphan spans)
  • respect timeouts and cancellations coming from upstream
Dominant language
Go
Stars
571
Forks
121
Avg merge
1d 13h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redpanda-data/benthos

All issues in redpanda-data/benthos

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.