Skip to content

otel context isn't propagated #1653

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

Open
vainaircorn opened this issue Apr 23, 2025 · 0 comments · May be fixed by #1655
Open

otel context isn't propagated #1653

vainaircorn opened this issue Apr 23, 2025 · 0 comments · May be fixed by #1655

Comments

@vainaircorn
Copy link

I've instrumented my indexing code with openllmetry; when submitting batches on the ThreadPoolExecutor the context (used by otel to propagate trace) isn't being passed:

following is suggested fix:

# do not block the thread - the results are written to a central (locked) list and we want to have multiple concurrent batch-requests
ctx = contextvars.copy_context()

self.__executor.submit(
    ctx.run,
    functools.partial(self.__send_batch, objs, refs, readd_rate_limit=isinstance(self.__batching_mode, _RateLimitedBatching)),
)
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 a pull request may close this issue.

1 participant