Core Concepts
Tags
Attach labels to every trace for filtering and grouping in the dashboard.
Tags are free-form string labels attached to every trace produced by an init() call. Use them to filter and group traces in the Neatlogs dashboard without changing your workflow_name.
Setting Tags
Pass a list of strings to neatlogs.init():
neatlogs.init(
api_key=os.environ["NEATLOGS_API_KEY"],
endpoint=os.environ["NEATLOGS_ENDPOINT"],
workflow_name="customer-support",
tags=["production", "v2.1", "team-search"],
)All traces from this process will carry these tags.
Common Use Cases
| Tag purpose | Examples |
|---|---|
| Environment | "production", "staging", "dev" |
| Release version | "v2.1", "release-42" |
| Team or owner | "team-search", "platform" |
| Experiment | "experiment-a", "prompt-v3" |
| Feature flag | "new-retriever", "gpt-4o-mini" |
Tags vs Workflow Name
workflow_nameidentifies the application or feature area. It stays the same across deployments.tagschange between deployments, experiments, or environments. Use them for anything that varies run-to-run.
# Don't encode environment in workflow_name
neatlogs.init(workflow_name="customer-support-prod") # ❌
# Use tags for environment, workflow_name for the app
neatlogs.init(workflow_name="customer-support", tags=["production"]) # ✅