Skip to content

Conversation

@fenilfaldu
Copy link
Contributor

📥 Pull Request

📘 Description
Added support for customizing task span names using default tags and updated task span creation to use tag-based naming when available also maintained backward compatibility with default "crewai.task" name if no default-tags were passed while Initialization.

🧪 Testing
Tested the mardown_validator.ipynb runbook.

Screenshot 2025-05-20 at 5 05 25 AM

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentops/instrumentation/crewai/instrumentation.py 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@areibman
Copy link
Contributor

Helpful! Can you also update the documentation to tell users how to provide this info?

Does this mean we could do agentops.init(session_name="my session") ?

@fenilfaldu
Copy link
Contributor Author

I would say we won't be able to do agentops.init(session_name="my session") because this tag can only be used when session is created and in cewai instrumentation task is the root span not the session.

@areibman areibman requested a review from Dwij1704 May 20, 2025 16:06
@areibman areibman linked an issue May 20, 2025 that may be closed by this pull request
Copy link
Member

@Dwij1704 Dwij1704 left a comment

Choose a reason for hiding this comment

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

@fenilfaldu You might have misunderstood this, the issue is that we don't set tags that we get from init in case of crewai, We need a mechanism to set list of tags in span attributes of root span (crewai.workflow etc). This can be done by setting it in the crewai instrumentor itself where the root span is first started.

The naming modifications you did is redundant for this issue, pick up #988 after you are done with this.

I recommend closing this PR and raising a new one that only has changes related to tags in crewai and another PR with changes regarding setting span name for root spans that cover both sessions span and crewai specific root span types.

@fenilfaldu
Copy link
Contributor Author

Got it! closing this pr and raised the new one :)

@fenilfaldu fenilfaldu closed this May 20, 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.

[bug] No tags in crewai root span

4 participants