Skip to content

feat: add demo data generation script#81

Open
GuyMoses wants to merge 4 commits into
mainfrom
feat/demo-script
Open

feat: add demo data generation script#81
GuyMoses wants to merge 4 commits into
mainfrom
feat/demo-script

Conversation

@GuyMoses

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/demo-generate.sh for populating a demo environment with realistic Claude Code session data.

Usage

./scripts/demo-generate.sh ~/source/dash0

What it does

  • Generates 10 sessions from 5 simulated team members (Alice, Bob, Carol, Dave, Eve)
  • Multi-step prompts that produce multiple tool calls per session (3-5 turns each)
  • Mixes Sonnet and Opus models
  • Creates temporary .claude/dash0-agent-plugin.local.md to target demo endpoint
  • Restores original git config on exit

Prerequisites

  • Plugin installed at user or project scope in the work directory
  • Edit OTLP_URL, AUTH_TOKEN, DATASET at the top of the script for your target environment

Configuration

OTLP_URL="https://ingress.eu-west-1.aws.dash0.com:4318"
AUTH_TOKEN="your-ingest-token"
DATASET="claude-code-monitoring"

@GuyMoses GuyMoses force-pushed the feat/demo-script branch 2 times, most recently from 276b1cf to 4c13ae5 Compare May 18, 2026 10:14
GuyMoses added 4 commits June 14, 2026 12:42
Generates 10 realistic Claude Code sessions from 5 simulated team
members, with multi-step prompts that produce multiple tool calls per
session. Useful for populating a demo environment for recordings.

Usage: ./scripts/demo-generate.sh [work-dir]

Prerequisites:
- Plugin installed at user or project scope
- .claude/dash0-agent-plugin.local.md in work-dir with target endpoint

The script:
- Creates a per-project override (.claude/dash0-agent-plugin.local.md)
- Swaps git user.name between sessions for multi-user data
- Restores original git config on exit (via trap)
- Mixes Sonnet and Opus models
Claude Code fires SessionStart on resume, compact, and clear — not just
startup. Without a guard, each re-fire overwrites the trace context
(clobbering the model field) and re-runs the connectivity check with its
user-visible message.

Use a sentinel file in sessionDir to skip initialization on subsequent
fires. The sentinel is cleaned up with the rest of sessionDir on
SessionEnd.

Closes #112
Registers a plugin command that prints and opens the Dash0 session URL
for the current session. Adds a `session-url` subcommand to the binary
that takes session_id via stdin JSON and outputs the full URL.

Also forwards script arguments to the binary so subcommands work.
Adds `on-event generate` subcommand that replays fabricated hook events
through the real pipeline.Process path, producing spans and matching
GitHub App VCS metrics (dash0.gen_ai.vcs.*) with aligned join keys.

Supports multiple personas, models, multi-turn sessions, and MCP tool
calls. Packaged as a single binary subcommand (Cloud Run friendly).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant