feat: add demo data generation script#81
Open
GuyMoses wants to merge 4 commits into
Open
Conversation
276b1cf to
4c13ae5
Compare
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).
4c13ae5 to
4643aea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
scripts/demo-generate.shfor populating a demo environment with realistic Claude Code session data.Usage
./scripts/demo-generate.sh ~/source/dash0What it does
.claude/dash0-agent-plugin.local.mdto target demo endpointPrerequisites
OTLP_URL,AUTH_TOKEN,DATASETat the top of the script for your target environmentConfiguration