LiteLLM team and key based logging

Team and key based logging routes each team's or key's LLM traffic to its own logging destination, or switches it off for one team, on a shared LiteLLM gateway. This page explains the options, setup, limits and when the separation matters for compliance.

On this page

Why LiteLLM team and key based logging matters on a shared gateway

Team and key based logging lets one shared LiteLLM gateway send each team's or each key's request logs to its own destination, or turn logging off for a single team. A platform team running one gateway for several business units may find that one unit's prompts are covered by stricter rules than another's, so a single global callback is not enough. The per-team or per-key setting lets the platform team point a unit at its own Langfuse project, a GCS bucket, LangSmith or Arize, or disable logging for that unit entirely while others keep tracing.

The LiteLLM team logging documentation gives disabling logging for one team as an example of the GDPR case: a team whose prompts contain personal data may need logs kept out of a central store, or kept only in a location its privacy team has approved. Other reasons follow the same pattern, such as separating a regulated unit's traces from engineering experiments or keeping data inside a required region. Before you design this, confirm with your privacy and legal team which units, which data categories and which retention periods apply, because the gateway can enforce a setting but cannot decide the policy.

Parts of this feature require an Enterprise license, so confirm the edition with LiteLLM before you commit to a per-team design. The LiteLLM team logging documentation describes which settings are available and how they are configured. Also confirm that the destination you choose, such as a self-hosted Langfuse instance, can meet your own retention and access requirements, since the gateway routes logs but does not govern what the destination keeps.

Which logging option fits each team or key

This table compares four ways to route a team's or key's LLM traffic on a shared LiteLLM gateway: a per-team Langfuse project, custom callbacks, a GCS bucket and disabling logging for a team. Read each row for what data leaves the gateway, which license tier you need, and the compliance case it fits. Confirm which options your LiteLLM edition supports before you finalize the design.

OptionData sent to the destinationLicense neededWhen it fits
Per-team Langfuse projectRequest and response traces for that team's or key's calls, sent to a Langfuse project only that team can readEnterprise license for team-level logging in LiteLLM; Langfuse core features are open source (MIT)Teams that need their own trace view and access boundary inside one Langfuse instance
Custom callbacksWhatever your callback code chooses to forward, such as selected fields, metadata or a filtered payloadConfirm with your edition; team-level callbacks are an Enterprise feature in LiteLLMTeams whose records must go to an internal system or be reduced before storage
GCS bucket destinationLogged request records written as objects to a Google Cloud Storage bucket assigned to the teamConfirm with your edition; the topic's supported integrations list includes GCS, and parts of the feature require EnterpriseTeams that must keep records in a specific bucket, region or retention setup on Google Cloud
Logging disabled for a teamNothing for that team's traffic is sent to a logging destination; spend and routing still applyConfirm with your edition before design; LiteLLM docs cite disabling logging for one team as a GDPR exampleTeams whose prompts contain personal data that must not be stored in any logging system

When separate logging destinations matter for compliance

Teams whose prompts carry personal data, such as customer support summaries, HR case notes or patient-related text, face the strictest questions about where that data is copied. Under GDPR-style obligations, the controller has to know which systems hold personal data, for how long, and who can read it. A shared logging destination that receives every team's prompts widens that set of systems. Routing one team's logs to its own project, or turning logging off for that team, narrows the set and makes the data flow easier to describe to a privacy office. The LiteLLM documentation gives disabling logging for one team as an example for GDPR compliance, which is the case this tab is about.

  • Data map: A dedicated destination gives you one system to list in the record of processing and in the data flow diagram.
  • Retention control: A separate project or bucket can carry its own retention setting, which a shared store may not allow per team.
  • Access scope: Only people assigned to that team's destination can read its prompts, which supports need-to-know reviews.
  • Disabled logging: For teams where prompts should not be stored at all, turning logging off for their keys removes one copy from the picture.
  • Deletion requests: Knowing exactly where a team's logs live makes it practical to answer erasure requests.

Before relying on this, confirm with your privacy counsel which processing purposes apply, and whether the gateway's own spend records still store prompt content for that team.",

How to configure per-team logging on a LiteLLM gateway

This sequence takes a shared LiteLLM gateway from one global logging setup to separate logging destinations per team or key, with a disabled team verified to write nothing. Each step ends with a check you can record as evidence.

  1. Confirm edition, database and virtual key support

    Confirm which LiteLLM edition and version your gateway runs, and that it is backed by PostgreSQL, since virtual keys need a PostgreSQL database. Team-level logging settings are part of the Enterprise feature set, so confirm with LiteLLM or in the Enterprise documentation whether your license covers team and key based logging and which logging integrations it includes. Check the version against the release line you plan to stay on. The step is done when you have a written note of edition, version, database and licensed features, and a test call to the proxy's health or model listing returns successfully.

  2. Create the team and its virtual keys

    As the gateway administrator, create the team in the admin UI or through the management API, then issue one or more virtual keys assigned to that team. Restrict each key to the models the team is approved to use so that logging scope and model scope match the same boundary. Record the team ID and key aliases in your configuration inventory. The check is that a request made with the new key succeeds against an approved model and that the request appears in the gateway's own spend or request records with the team attached.

  3. Provision a separate logging destination for the team

    Create the destination the team's traces should reach, for example a dedicated Langfuse project for that team with its own public and secret keys. Do the same for any other integration you plan to use, such as a GCS bucket or LangSmith project. Keep one destination per team so that records from different teams never share a project. Store the destination credentials in your secret manager, not in plain configuration. The check is that you can log into or query each destination and see it is empty and separately addressable.

  4. Configure team logging settings

    Add the team's logging callback settings in the LiteLLM configuration or the admin UI, mapping the team to its destination credentials. Follow the team logging documentation for the exact keys for your version and integration, and reference secrets by environment variable or secret manager reference rather than literal values. Keep a second team's settings separate. Reload or restart the proxy as your deployment requires. The check is that the saved team configuration shows the intended destination for that team and that no other team points at the same project.

  5. Send a test request and confirm the destination

    Send a uniquely marked test prompt using the team's key, such as a made-up string that cannot appear elsewhere. Then search the team's destination for that marker and confirm the trace arrives there. Also search the other teams' destinations and the default destination for the same marker. The step is complete only when the marker appears in the intended destination and in no other, which is the evidence that separation works. Keep the test prompt free of real personal data.

  6. Disable logging for a team and confirm no records

    Turn logging off for the team using the disable setting described in the team logging documentation, which is the approach the documentation gives for a GDPR-style case. Send another uniquely marked test prompt with that team's key. Check the team's destination, the other destinations and the gateway's logs for the new marker. The check is that the marker is absent from every logging destination. Record the configuration change, the time you made it and the test result as an evidence item for your compliance file.

  7. Record the configuration and review on change

    Export or screenshot the final team logging configuration, the destination inventory and both test results, and store them with your change records. Note who owns each destination and who can change the team settings. Repeat the send-and-search test whenever a key is rotated, a team is added, or the LiteLLM version changes, because configuration can behave differently across releases. The step is done when the evidence set can be handed to an auditor or internal reviewer without rerunning the setup.

How one request reaches the right logging destination

The request starts at the calling application, which sends a virtual key to the LiteLLM proxy inside the client's trust boundary. The proxy resolves the key to its team, then the team's logging callback decides where the trace goes: a Langfuse project, a GCS bucket, or nowhere at all. Only after that choice does the request go to the model provider, so check that the callback is set per team and that a team with logging disabled never reaches a logging destination.

Per-team routing of logs at the LiteLLM gateway, inside the client's boundary.

Security risks in per-team logging design

Per-team logging moves prompts and responses to different destinations, so each routing decision becomes a control point. The cards below cover the failure modes that most often expose data or hide it from review on a shared LiteLLM gateway.

Destination credentials in the secret manager

Each team's logging destination needs its own credentials, such as a Langfuse public and secret key pair or a bucket access policy. These values are stored in the gateway configuration, so they are sensitive in the same way provider keys are. Confirm where each credential is stored, who can read it, and whether rotation is part of the runbook. Keep the admin key and destination secrets in a secret manager rather than in plain configuration files.

Team logging docs

Misrouted logs after a key moves

If a virtual key is reassigned from one team to another, its traffic may keep flowing to the previous team's Langfuse project or bucket. The second team then receives prompts it should never see, and the first team's dashboards go quiet without any error. Before moving keys, check the logging configuration on both the key and the team, and test with a harmless request that the destination changed as expected.

Prompts kept without retention rules

A destination such as a Langfuse project or a GCS bucket keeps prompts and responses until someone deletes them. Teams often set up logging quickly and never define a retention period for each destination. For personal data, ask each destination owner for the retention setting they will use and confirm it in writing. Retention in LiteLLM's own spend logs is a separate setting and should be checked separately.

Untracked admin changes to logging

Changes to a team's logging destination, or to whether logging is disabled, are configuration changes made by administrators. Without an audit trail, a reviewer cannot tell who turned logging off for a team or when it changed. This matters most where logging is disabled to meet a privacy requirement, because the disabled state is the control. Confirm that admin actions on team settings are recorded and that the record identifies a person, which depends on SSO being in place.

Silent logging loss after an upgrade

A gateway upgrade can change how callbacks, team settings or destination configuration are read, and a team's logs can stop without raising an alert. The team may believe its traffic is still recorded. After each upgrade, send a test request for every team with a custom destination and confirm that the trace or object appears in the expected place. Add this check to the upgrade runbook.

Langfuse Enterprise controls for some teams

Some Langfuse controls that support per-team privacy, including server-side data masking, data retention policies and audit logs, need an Enterprise license key on a self-hosted instance. The license key docs list which features require a key, so check them before promising a control to a team. Without a key, the team's protection depends on what the LiteLLM side redacts before sending data onward.

Langfuse license key docs

Questions buyers ask about team and key based logging

What does team and key based logging cost, and what drives the cost up?

The cost comes from four places: the LiteLLM license, the logging destination, the infrastructure that hosts it, and the people who configure and run it. Per-team logging to Langfuse is listed among features that parts of the feature require an Enterprise license for, so the license line depends on which callbacks you use and how many teams need separate routing. Self-hosted Langfuse is MIT licensed for core features, but its Enterprise features, such as data retention policies, audit logs and server-side data masking, need a license key. A self-hosted Langfuse runs Web, Worker, PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible storage, and the scaling guide lists minimum resources of 2 CPU and 4 GiB for web, worker and PostgreSQL, and 2 CPU and 8 GiB for ClickHouse. Each separate destination adds to that footprint and to storage. Ask any quote to price the license, the hosting, the storage growth per team and the configuration work separately.

How long does setting up per-team logging take?

Duration depends mostly on the number of teams and destinations, whether each team uses its own Langfuse project or a shared one, and whether the destination already exists. Setup has three parts: standing up the destination, configuring per-key or per-team callbacks on the gateway, and testing that each team's traffic lands only where it should. Custom callbacks take more design work than a standard Langfuse project. Any fixed-scope agreement should list the destinations, the number of teams and the test cases in writing before the timeline is agreed. Ask for the timeline to be tied to those inputs rather than to a single number.

What does our team need to provide for this work?

You need to provide a running LiteLLM gateway with PostgreSQL, the list of teams and keys that need separate logging, and a decision on which of them must be logged, which must be sent elsewhere and which must not be logged at all. You also need the logging destination details, such as a Langfuse instance or a Google Cloud Storage bucket, and access to a test environment. Your security and privacy staff should confirm where prompts may be stored, how long they may be kept and who may read them. Without those decisions, the configuration cannot be finished or verified.

Can our own engineers configure team-based logging without outside help?

Yes, if your engineers are comfortable with LiteLLM's virtual keys, callback configuration and the Langfuse data model, and have time to test. The LiteLLM documentation describes the configuration, and the feature is documented as a per-key or per-team setting. The harder parts are usually not the settings themselves but the verification: confirming that a request from one team never reaches another team's destination, that disabled teams send no records to any tool, and that spend and audit records still match. Many organizations split the work, keeping the configuration in-house and buying an independent review of the test results. DeployOpen can plan, implement and document the setup, or test it as part of a security review, under a written scope.

Does turning off logging for a team satisfy GDPR on its own?

No. Disabling logging for one team is an example in the LiteLLM documentation, but it is one control among several. Prompts can still be stored in places other than the logging callback, including the spend log table in PostgreSQL, provider-side retention, caches and application logs. You also need a lawful basis for processing, a data processing agreement with each provider and destination, retention rules and a way to answer data subject requests. Compliance decisions belong to your privacy and legal teams, and independent assessors decide whether controls are sufficient. DeployOpen prepares the technical controls and evidence for that review but does not issue attestations or certifications.

Do LiteLLM upgrades change our per-team logging settings?

Upgrades can change behavior, so per-team logging should be part of your upgrade test plan. LiteLLM maintains support for the four most recent stable minor versions, so you should plan to move within that window. After each upgrade, check that the callbacks, team and key settings, and destinations still apply, and that a test request from each team reaches only its intended destination. Langfuse updates within a major version are non-disruptive and run database migrations at startup, while major upgrades, such as v3 to v4, need a dedicated migration and ClickHouse 25.12 or later. Ask any quote how upgrades of both the gateway and the logging destination are tested and scheduled.

When does separating logs by team matter for compliance?

Separation matters when teams handle different categories of data, when a business unit or region has its own retention or access rules, or when one team must not have its prompts visible to another. It also matters when a team must be excluded from logging entirely for privacy reasons. Your compliance owners should map each team's data to the rules that apply to it before configuration begins. Separate destinations help with access control and retention, but they do not replace access reviews, encryption or deletion procedures. Ask for a written list of each team, its destination and its retention rule as part of the scope.

How to run per-team logging after go-live

Team logging is configuration that drifts. Each time a key is rotated, a team is renamed or split, or a person leaves and their keys are reassigned, the logging destination attached to that key or team can silently stop matching what the compliance record says it should be. Make a standing review part of the gateway runbook: export the current team and key logging settings on a fixed schedule and after every rotation or team change, and compare them with the approved register of which team logs where and why. Pay particular attention to teams where logging is turned off for privacy reasons, because a rotation that creates a new key without the same setting can start sending prompts to a destination nobody approved. Confirm with your own LiteLLM version how team logging settings carry across key regeneration, since that behavior is the first thing to test.

Destination health is a separate concern. A team's Langfuse project, GCS bucket, LangSmith or Arize endpoint can fail, be deleted, or lose credentials while the gateway keeps answering requests, so failed exports may not show up as user-facing errors. Monitor each destination directly, alert on failed or missing trace delivery per team, and check that the credentials the gateway holds for each destination are rotated on the same cycle as your other secrets. If you self-host Langfuse, its own components (Langfuse Web, Langfuse Worker, PostgreSQL, ClickHouse, Redis or Valkey and blob storage) each need health monitoring. Langfuse recommends scaling worker containers on CPU load, and under heavy ingestion splitting langfuse-web into separate ingestion and user interface deployments, so review worker CPU trends as team volumes grow.

Upgrades and audit trail complete the picture. Within a major Langfuse version, updates are non-disruptive and apply database migrations automatically at startup, so routine patching is manageable with a tested rollback plan. Major upgrades (v1 to v2, v2 to v3, v3 to v4) follow dedicated migration guides, and the v3 to v4 guide requires ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later, plus about 3x ClickHouse disk headroom when backfilling historic data. Plan those upgrades as projects with a staging copy, and confirm the current requirements in the Langfuse upgrade guide before scheduling them. Record every change to team logging (who requested it, the approved reason, the old and new destination, and the date) in a change log that your audit process can read, and make sure administrative actions are attributed to named people through SSO, since an audit trail built on shared credentials cannot show who changed a destination.

How DeployOpen scopes and delivers per-team logging

DeployOpen plans and builds per-team and per-key logging on a self-hosted LiteLLM gateway inside your own infrastructure. Each engagement starts with a written scope that maps every team or key to its logging destination, or to logging turned off, and ends with documented, tested handover.

How we scope

  • Inventory which teams and keys need their own logging destination, and which must have logging turned off.
  • Record which Langfuse projects, custom callbacks or storage buckets each team uses, and who owns each one.
  • Agree the written scope, deliverables and timeline before any configuration work begins.

How we build

  • Configure team and key logging callbacks on the gateway, and confirm which settings need an Enterprise license.
  • Test that each team's requests reach only its own destination, and that disabled teams send nothing to logging.
  • Check the logging output against the compliance requirements you set, such as a team with logging disabled for GDPR reasons.

How we hand over

  • Document the team-to-destination map, the configuration keys used and the test results for each team.
  • Provide a runbook for adding a new team, rotating a destination credential and changing a team's logging setting.
  • Walk your platform and compliance staff through the configuration so they can review it independently.

How we support

  • Engagements are fixed-scope, so changes to team or destination coverage are scoped and agreed in writing.
  • Ongoing support, upgrades and continuous testing are available as a retainer for the gateway and its logging setup.
  • Ask any provider, including DeployOpen, to confirm in writing which logging features your license tier includes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.