Warn users when instrumentation is used before ag.init(), Previously,…#4098
Warn users when instrumentation is used before ag.init(), Previously,…#4098Excali556 wants to merge 4 commits intoAgenta-AI:mainfrom
Conversation
… calling tracing/instrumentation methods before initialization failed silently. This adds a clear warning to guide users to call ag.init() first.
|
@Excali556 is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @Excali556 , This PR looks like a duplicate from the other one. |
Sure |
|
Also @Excali556 , |
Sure. The idea was mainly to make it more visible to users. The existing log.info can be easy to miss, especially since info logs aren’t always surfaced. Since calling instrumentation before ag.init() can lead to confusing behavior, I thought a warning would make it clearer that something’s off, without breaking anything. So it’s mostly about making the issue easier to notice and act on. |
(Fixes #3170 )
Previously, calling tracing or instrumentation methods before
ag.init()failed silently, making it difficult for users to understand why instrumentation was not working.This PR adds a warning when such methods are used before initialization, guiding users to call
ag.init()first.Summary
ag.init()Testing
Verified locally
python -m compileall .to ensure no syntax errorsag.init()Added or updated tests
N/A
QA follow-up
N/A
Demo
N/A
Checklist