Skip to content

feat(ultimate-scraper): tag CLI invocations with --user-agent for telemetry attribution#42

Merged
vystrcild merged 1 commit into
apify:mainfrom
lukas-bekr:feat/ultimate-scraper-cli-telemetry
Apr 28, 2026
Merged

feat(ultimate-scraper): tag CLI invocations with --user-agent for telemetry attribution#42
vystrcild merged 1 commit into
apify:mainfrom
lukas-bekr:feat/ultimate-scraper-cli-telemetry

Conversation

@lukas-bekr
Copy link
Copy Markdown
Contributor

@lukas-bekr lukas-bekr commented Apr 27, 2026

Summary

  • Adds --user-agent apify-agent-skills/apify-ultimate-scraper to every apify CLI example across the skill: 8 in SKILL.md, 8 inserts (across 7 example locations) in references/gotchas.md, 1 in references/actor-index.md, and 4 inline mentions in workflow guidance files (company-research, ecommerce-price-monitoring, job-market-and-recruitment, real-estate-and-hospitality).
  • Adds a top-level rule in SKILL.md (alongside the existing --json rule) so agents that construct ad-hoc commands still emit the flag.
  • Bumps the CLI prerequisite from v1.4.0+v1.5.0+ (the flag was merged in apify/apify-cli#1102 and shipped in v1.5.0).

Why

The CLI now emits a caller-id field (properties.userAgent) on every cli_command_* Segment event. Tagging skill-driven invocations lets us measure agent-skills usage in Mixpanel separately from generic human CLI usage. Value matches the existing apify-agent-skills/<slug> naming convention so future cross-pipeline continuity is automatic.

Scope

  • Only apify-ultimate-scraper is instrumented in this PR. Development-focused skills (apify-actor-development, apify-actorization, apify-generate-output-schema) will be tagged separately.
  • Flag is silently rejected on the actor entrypoint, which the skill never invokes — non-issue.

🤖 Generated with Claude Code

…emetry attribution

Adds --user-agent apify-agent-skills/apify-ultimate-scraper to every apify CLI
example in the apify-ultimate-scraper skill (SKILL.md, gotchas.md, actor-index.md,
and four workflow guidance files), plus a top-level rule in SKILL.md documenting
the convention. Bumps the CLI prerequisite to v1.5.0+ since the flag was
introduced in apify/apify-cli#1102.

This lets us distinguish skill-driven CLI invocations from generic human usage
in Mixpanel/Segment via properties.userAgent, and aligns with the existing
apify-agent-skills/<slug> naming convention used in actor_run.meta_user_agent
data feeding dashboards.apify.com/dashboards/276.

Refs: apify/apify-cli#1102

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vystrcild
Copy link
Copy Markdown
Collaborator

Tested, working! 👍

@lukas-bekr Did you test how the data are attributed to the runs? Will we be able to see it in Actor Runs or does CLI works differently?

@vystrcild vystrcild merged commit 316e7cf into apify:main Apr 28, 2026
2 checks passed
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.

3 participants