Expand description
Core library for constructing and running a Hubble service.
Hubble constructs the application. Hubble persists traces in
PostgreSQL, serves its HTTP API and embedded Hubble dashboard,
and exposes an OTLP/HTTP receiver for external telemetry.
§Traces
Configure storage through HUBBLE_DATABASE_URL.
The OTLP receiver accepts JSON or protobuf at POST /v1/traces.
Received spans are persisted and streamed to connected dashboards.
§Networking and security
The dashboard runs its own listeners, which bind loopback by default:
| Listener | Default bind |
|---|---|
| Web UI and API | 127.0.0.1:8080 |
| OTLP receiver | 127.0.0.1:4318 |
| Optional management API | 127.0.0.1:8081 |
Built-in authentication is disabled by default. Configure local
authentication with HUBBLE_AUTH_MODE=local. Single-tenant startup ensures one organization/project;
use hubble admin invite-owner to invite its first local owner.
Session cookies are secure by default and should only be
configured otherwise for intentional plain-HTTP development.
The same authentication setting protects OTLP with project API keys rather than dashboard sessions. Disabled authentication permits tokenless single-project ingestion and ignores Authorization headers. Use TLS or a trusted network for project API keys, and restrict anonymous ingestion to trusted clients. The private management listener has a separate service bearer credential and is disabled by default.
§Example
use radiant_hubble::Hubble;
Hubble::new().run().await?;Re-exports§
pub use billing::BillingError;pub use billing::UsageDenied;pub use billing::UsageDeniedReason;pub use provisioning::CreatedApiKey;pub use provisioning::ProvisioningError;pub use utoipa;
Modules§
- billing
- Console cloud billing and dashboard usage refusals.
- permissions
- Organization roles and the permissions required by dashboard operations.
- provisioning
- Trusted provisioning operations used by local administrative tools.
- simulations
- Simulation definitions, runs, and schedules, executed by a separate executor service.
Structs§
- Agent
RunUsage - Usage associated with a newly identified agent invocation in telemetry.
- Authenticated
User - The persistent user authenticated for the current request.
- Authorized
Organization - An organization resolved for an explicitly authorized operation.
- Authorized
Project - A project resolved and authorized for the current request.
- Connection
Secret - A credential supplied when adding or reconnecting a connection: an access
token, or an OAuth client secret. Carried in request bodies only, never
in a response, and redacted from
Debugoutput. - Connection
Summary - One connection as shown to a user. Never carries a credential.
- Conversation
History Message - One recorded message with references and explicit truncation information.
- Conversation
History Summary - A bounded preview with a Hubble conversation identifier for follow-up reads.
- Conversation
Id - Hubble-issued identifier for a persisted conversation.
- Conversation
IdError - An invalid conversation ID.
- Created
Invitation - An invitation secret returned once to its issuer.
- Dashboard
App - A constructed dashboard whose storage and shared state are ready.
- Dashboard
Extension - Configures an application extension registered through
Hubble::extension. - Dashboard
State - Shared state available to core and trusted application-provided API handlers.
- Http
Meta Agent Provider - A
MetaAgentProviderreached over HTTP. - Hubble
- Configures a Hubble application.
- Invitation
Id - Identifier for an organization invitation.
- List
Organizations Response - Response for
GET /api/organizations. - List
Projects Response - Response for
GET /api/organizations/{organization_id}/projects. - LogGroup
Selection - A group identified independently of any saved Logs tab.
- Meta
Agent Extension - A registered Meta Agent provider implementation.
- Meta
Agent Extension IdError - Invalid stable identifier for a Meta Agent extension.
- Oauth
Client - An OAuth client registration for a connection with
ConnectionAuth::Oauth. - Observation
Correlation - A Linear issue an observation was correlated with.
- Observation
Settings - How a project’s agent activity is grouped for observation reviews.
- Observation
Signal Verdict - A signal verdict recorded during an observation review, including non-matches. Reviews record every active signal they checked, not just those that matched.
- Observation
Summary - A recorded review of a trace or group of related activity.
- Open
ApiRouter - A wrapper struct for
axum::Routerandutoipa::openapi::OpenApifor composing handlers and services with collecting OpenAPI information from the handlers. - Organization
- Organization metadata.
- Organization
Id - An organization identifier.
- Organization
IdError - An invalid organization ID.
- Personal
Tool Preference Changes - Atomic current-user changes at the connection revision observed before editing.
- Personal
Tool Preferences - Current-user overrides; a null entry removes that tool’s override.
- Project
- Project metadata.
- Project
Id - A project identifier.
- Project
IdError - An invalid project ID.
- Project
LogView - A project Logs page view.
- Project
LogView Details - A project log view together with its canonical route segment.
- Project
LogViews - The ordered views configured for a project.
- Project
RunFilter - An exact attribute filter applied before listing or grouping runs.
- Project
Tool Policies - Atomic changes to project tool policy at an observed connection revision.
- Provider
AddConnection Request - Request to add a connection to a tool server and discover its tools.
- Provider
Begin Connection Oauth Request - Start an interactive authorization for a new or existing MCP connection. The provider owns the temporary state and token exchange; Hubble only returns the authorization URL to the browser.
- Provider
Begin Connection Oauth Response - URL that Hubble sends the browser to for the authorization step.
- Provider
Bind Usage Scope Request - Associates a Hubble project with the billing organization for provider-generated usage. The scope comes from authenticated Hubble state, never usage event metadata.
- Provider
Cancel Turn Request - Request to cancel an in-progress turn.
- Provider
Capabilities - Optional features implemented by a Meta Agent provider.
- Provider
Complete Connection Oauth Request - The authorization server’s callback. The provider verifies and consumes
statebefore exchanging the code; it returns the owning project for a safe dashboard redirect. - Provider
Complete Connection Oauth Response - Owning project used to return the browser to the connection screen.
- Provider
Connection Context - Trusted connection authority, derived by Hubble from the authenticated user.
- Provider
Connection List - A project’s connections: every
builtinone first, thencustomones. - Provider
Conversation History Page - Conversation messages, oldest first. Excludes raw tool arguments and results.
- Provider
Conversation History Search - Search results, newest conversations first.
- Provider
Conversation Ref - A newly opened provider-side conversation.
- Provider
Create Conversation Request - Request to open a new provider-side conversation.
- Provider
Create Signal Request - Author a signal, active by default. Set
draftto retain it for review before future observation reviews start checking it. - Provider
Create Turn Request - Request to start a new turn (send a message) in an existing conversation.
- Provider
Deactivate Signal Request - Retire a signal without deleting its definition or historical verdicts.
- Provider
Delete Conversation Request - Request to permanently delete a provider-side conversation and its turns.
- Provider
Discover Tools Request - Request to refresh a connection’s tool catalog from its server.
- Provider
Event Page - A page of new events for one turn.
- Provider
Fetch Events Request - Request for new events on an existing turn.
- Provider
Force Observation Review Request - Request to force an immediate review of
project_id’s current window. - Provider
GetObservation Settings Request - Request to read a project’s observation review settings.
- Provider
List Connections Request - Request to list a project’s connections.
- Provider
List Observations Request - Request to list a project’s recent observations.
- Provider
List Signals Request - Request to list a project’s signals.
- Provider
Observation List - A project’s recent observations, newest first.
- Provider
Promote Signal Request - Request to promote a draft signal to durable, making it active.
- Provider
Provision Hubble Connection Request - Request to push a newly minted (or rotated) Hubble MCP credential to the
provider as
project_id’s fixed, always-allow Hubble connection. - Provider
Read Conversation History Request - Read retained messages, with independent message and text pagination.
- Provider
Reconnect Connection Request - Request to replace a connection’s credential and discover its tools again.
- Provider
Remove Connection Request - Request to remove a connection: revoke it, delete its credential, and deny any approval still waiting on one of its tools.
- Provider
Resolve Approval Request - Request to resolve an outstanding approval on a turn.
- Provider
Revoke Hubble Connection Request - Request to revoke
project_id’s fixed Hubble connection on the provider. - Provider
Search Conversation History Request - Search retained user/assistant messages in one project’s conversations.
- Provider
SetConversation Visibility Request - Change sharing; the provider must authorize the creator (or an owner of creator-less history).
- Provider
SetObservation Settings Request - Replace a project’s observation review settings. Repeating a write is safe.
- Provider
SetPersonal Tool Preferences Request - Save overrides for the authenticated user only.
- Provider
SetProject Tool Policies Request - Save project policy with revision checking.
- Provider
SetTool Permissions Request - Request to change a connection’s tool permissions.
- Provider
Signal List - A project’s active, draft, and inactive signals.
- Provider
Turn Ref - A newly created provider-side turn.
- Provisioned
Organization - An unowned organization and the project created with it.
- Retention
Config Error - The configured retention day count is invalid.
- Retention
Days - A validated retention window of 1 to 3650 days.
- Running
Dashboard - A running dashboard with explicit shutdown control.
- Signal
Summary - One signal memory: a named, described criterion an hourly observation
review checks evidence against once it is
Durable. - Tool
Descriptor - One tool a connection’s server advertises, with its effective permission.
- Tool
Permissions - A connection’s per-tool permissions with the revision they were read at.
- Trace
Ingestion Request - Trace ingestion considered for usage accounting and policy enforcement.
- Trace
Usage - A received trace and any usage newly identified within it.
- TurnId
- Hubble-issued identifier for one turn within a conversation.
- Turn
IdError - An invalid turn ID.
- Usage
Activity - Aggregated activity for one metered feature.
- Usage
Aggregate - Immutable periodic report of compatible measurements, created before delivery.
- Usage
Analytics Item - One row in the usage analytics breakdown.
- Usage
Console Client - Stateless client for the Console usage API.
- Usage
Console Config - Console connection settings.
Debugoutput redacts the API key. - Usage
Consumption Receipt - Access decision and delivery acknowledgement returned for a consumption request.
- Usage
Count Snapshot - Versioned absolute count for an organization-level resource.
- Usage
Credits - Organization-wide credit consumption for the current period.
- Usage
Delivery Issue - Record identifiers and a sanitized failure reason for operator inspection.
- Usage
Delivery Summary - Outcome of a delivery pass, counted in queue records.
- Usage
Delivery Worker - Handle for one background delivery task. Dropping it aborts the task; pending records remain in the database.
- Usage
Error - Error returned by a usage controller.
- Usage
Extension - A usage controller and its embedded database migrations.
- Usage
Extension IdError - Invalid stable identifier for a usage extension.
- Usage
Feature Check - Entitlement or capacity evaluation without consuming credits or reserving capacity.
- Usage
Ingestion Batch - Accepted ingestion counters committed with their telemetry transaction. Repeated deliveries count as ingestion, but do not create another invocation charge.
- Usage
Inspection - Counts and diagnostic records from Hubble’s local usage-delivery queue.
- Usage
Measurement - Immutable, organization-scoped measurement sent to Console.
- Usage
Operations - Operator commands that access usage tables through a caller-supplied database pool.
- Usage
Overage - Overage configuration for the current plan.
- Usage
Overage Rate - Price applied to usage beyond the included allowance.
- Usage
Period - Current billing period in Unix milliseconds.
- Usage
Plan - Plan shown on the organization usage page.
- Usage
Reporter - Records usage and evaluates access. Delivery workers are started separately.
- Usage
Scope - Billing organization and optional project attribution for a measurement.
- Usage
Summary - Organization usage visibility returned to the dashboard.
- UserId
- A user identifier.
Enums§
- Authentication
Mode - Selects the authentication backend used by the dashboard and OTLP ingestion.
- Connection
Auth - How the provider authenticates to a connection’s server.
- Connection
Kind - Whether a connection is part of the provider or was added by a user.
- Connection
Scope - Whether a tool connection belongs to the project or the current user.
- Connection
Status - Whether the provider can currently reach a connection’s server.
- Conversation
Context - The Hubble object a conversation was opened against.
- Conversation
Visibility - Organization sharing selected by the conversation creator.
- Create
Invitation Error - Errors returned when trusted provisioning creates an initial-owner invitation.
- Dashboard
Error - Errors constructing or running Hubble.
- Dashboard
Extension Error - An invalid or conflicting application-extension registration.
- Global
Retention Policy - Default trace retention for projects without an override.
- Http
Meta Agent Provider Error HttpMetaAgentProvidercould not be configured.- Hubble
CliError - Failure while running a Hubble command.
- Logs
Grouping - How matching items are collected into groups.
- Logs
Source - Determines what each ungrouped result row represents.
- Message
Author - Persisted message attribution, independent of the author’s current permissions.
- Message
Role - Author of one conversational message.
- Observation
Evidence - Telemetry reviewed to produce an observation.
- Observation
Grouping - Unit of agent activity reviewed for an observation.
- Project
LogColumn - A column in a project’s run table.
- Project
LogViews Error - Invalid project Logs page configuration.
- Project
Retention Policy - Whether a project follows global retention or uses its own setting.
- Project
Tool Policy - The project’s limit on a tool; personal preferences cannot override Deny.
- Provider
Actor - Authenticated posting authority asserted by Hubble, never accepted from dashboard input.
- Provider
Error - An error returned by a Meta Agent provider implementation.
- Provider
Event - One unit of provider-reported progress for a turn.
- Provider
Force Observation Review Outcome - Outcome of a forced review. Callers can distinguish a completed review with no new observations from one skipped due to cooldown or an ongoing review.
- Provision
Organization Error - Errors returned when provisioning an organization.
- Replace
Invitation Error - Errors returned when replacing a pending initial-owner invitation.
- Signal
Memory Status - Whether a signal is pending, active, or retained but inactive.
- Signal
Origin - How a signal was first authored. Lifecycle transitions retain this provenance.
- Signal
Scorer - Identifies the scorer behind a verdict: Jev’s dedicated probability-threshold scorer when configured, or the full review model’s single-shot synthesis.
- Tool
Permission - What the provider does when the model calls a tool.
- Trace
Ingestion Decision - Traces that Hubble may persist from a telemetry delivery.
- Usage
Access Decision - Result of evaluating access or admitting one operation during an outage.
- Usage
Console Error - Transport or boundary failure. Response bodies are deliberately not propagated.
- Usage
Delivery Mode - Controls usage delivery timing and whether consumption may be gated.
- Usage
Delivery Receipt - Acknowledgement that Console durably recorded a request.
- Usage
Event - An occurrence that may count toward product usage.
- Usage
Operations Error - Failure while inspecting the queue or requeueing a record.
- Usage
Property - Flat, non-sensitive metadata used for analytics and pricing configuration.
- Usage
Rejection - Console rejection codes for records that must not be retried unchanged.
- Usage
Reporting Error - Reporting failure; invalid input and conflicts never become outage admissions.
- Usage
Validation Error - Invalid metering input; rejected before persistence or network delivery.
Constants§
- DASHBOARD_
EXTENSION_ API_ VERSION - Dashboard extension API version supported by this Hubble dashboard.
Traits§
- Meta
Agent Provider - The provider-neutral Meta Agent Provider API.
- Usage
Controller - Applies product usage accounting and policy enforcement at Hubble integration points.
Functions§
- api_doc
- Build the
OpenAPIdocument describing every/api/*route. - apply_
authentication_ contract - Add the dashboard’s optional session-cookie authentication contract to an
OpenAPIdocument. - management_
api_ doc - Build the private management API’s
OpenAPIdocument. - provider_
api_ router - Serve the Provider API for
provider, requiringcredentialas a bearer token on every request.