feat(tracing): port enterprise event sessions to OSS - #7461
Closed
lorenzejay wants to merge 1 commit into
Closed
lorenzejay wants to merge 1 commit into
lorenzejay wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| crewai_event_bus.emit(flow_source, during) | ||
| raise RuntimeError("host execution failed") | ||
|
|
||
| crewai_event_bus.emit(flow_source, after) |
| crewai_event_bus.emit(flow_source, after) | ||
| assert crewai_event_bus.flush() | ||
|
|
||
| expected = [before.event_id, during.event_id, after.event_id] |
| ): | ||
| record(session) | ||
| raise failure("execution failed") | ||
| consent.assert_not_called() |
|
|
||
|
|
||
| class ConsentApp(CrewRunApp): | ||
| def on_mount(self, event): |
| providers = HostProviders() | ||
| received = [] | ||
| checkpoint_events = [] | ||
| execution_before = get_execution_uuid() |
| checkpoint_listener.__module__ = "crewai.state.checkpoint_listener" | ||
| before = FlowStartedEvent(flow_name=flow_source.name) | ||
| during = FlowStartedEvent(flow_name=flow_source.name) | ||
| after = FlowStartedEvent(flow_name=flow_source.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
OSS-144: Export authenticated execution spans directly to Wharf
OSS-145: Buffer ephemeral spans locally and export only after consent
Revised port for review alongside #7359.
Summary
Port enterprise deployment tracing into OSS using its event-driven
telemetry_sessionmodel. Crew, Flow, and standalone Agent kickoffs create an execution session whose handlers preserve enterprise span names, attributes, event timestamps, parenting, and human-feedback resume links.telemetry_sessionwith host provider, logging, resource, and redaction hooks. Registration is session-specific so existing application listeners survive; the event bus and process-global OpenTelemetry provider are unchanged. This revision adds no nativeoperation()wrappers.Verification
Combined regression suite: 717 passed, 2 existing skips. Covers telemetry, enterprise provider compatibility, local mock AMP/Wharf HTTP collectors and decoded OTLP payloads, grants/export bounds, consent, execution IDs, Flow conversations, legacy tracing compatibility, and the CLI/TUI. External networking was blocked during tests.
Ruff, formatting, strict mypy for all 18 changed source files, whitespace checks, and repository commit hooks passed.
An additional feedback/event suite had 309 passes and 4 initialization failures because the local environment lacks the optional LiteLLM and Anthropic providers. No live enterprise deployment or production collector was exercised.
Additional context
The enterprise repository is unchanged. Its adapter migration to the shared OSS session API is separate; the provider compatibility tests exercise the host contract locally. End-to-end rollout depends on the AMP grant endpoint and Wharf grant support.
The grant response does not supply a viewer URL, so the TUI no longer derives a trace link from the legacy batch uploader.