Skip to main content
Tagging traces with environments helps you organize and analyze traces from different stages of your deployment pipeline. This makes it easy to debug production issues without sifting through development traces.

Why Use Environments?

Separating traces by environment allows you to:
  • Debug production issues without dev/test traces cluttering the view
  • Compare performance between environments (e.g., staging vs production)
  • Track costs separately for each environment
  • Monitor quality at different stages of deployment
  • Test changes in staging before deploying to production

Setting the Environment

Tag traces by passing the environment parameter when initializing the connector:

Common Environment Names

While you can use any string for the environment, these are common conventions:
Use consistent naming across your organization. Decide on prod vs production and stick with it.

Environment from Environment Variables

The best practice is to set the environment using the ARCBEAM_ENVIRONMENT environment variable:

Multiple Environments in One Project

You can send traces from multiple environments to the same project. Each trace is tagged with its environment, so you can easily filter between them. Example setup:
  • Project: “Customer Support Bot”
  • Environments:
    • dev - Your local machine
    • staging - Staging server
    • production - Live production server
All traces go to the same project, but you can filter to see only production traces when debugging issues.

Separate Projects vs Environments

You have two options for organizing traces:

Option 2: Separate Projects per Environment

Most teams prefer Option 1 (one project, multiple environments) because it’s simpler and makes comparisons easier.

Querying by Environment

You can query traces by environment using the Arcbeam API:
This is useful for:
  • Custom dashboards
  • Automated alerts
  • Cost reporting by environment

Best Practices

Always Tag Production

At minimum, always tag production traces:
This ensures you can always filter to production traces.

Use Consistent Names

Pick environment names and stick with them:
This prevents typos like "producton" or "prod" vs "production".

Document Your Environment Strategy

Make it clear in your team’s docs:
  • Which environments exist
  • What each environment is for
  • How to tag traces correctly

Next Steps

View Traces

Filter and explore traces by environment

Projects

Learn about organizing with projects

Create Collections

Organize traces for team review and collaboration

Troubleshooting

Fix common issues