Monitor RT journeys - track activation success, debug failures, query activation logs, and optimize performance
66%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./realtime-skills/rt-journey-monitor/SKILL.mdMonitor RT journey performance, track activation success, and debug failures.
# List all RT journeys for parent segment
tdx api "/entities/realtime_journeys?parent_segment_id=<parent_segment_id>" --type cdp
# View journey details
tdx api "/entities/realtime_journeys/<journey_id>" --type cdp
# Check journey status
tdx api "/entities/realtime_journeys/<journey_id>/status" --type cdp# View activation logs
tdx api "/entities/realtime_journeys/<journey_id>/activations" --type cdp
# Check recent triggers
tdx api "/entities/realtime_journeys/<journey_id>/triggers?limit=100" --type cdp
# View errors
tdx api "/entities/realtime_journeys/<journey_id>/errors" --type cdpQuery activation logs directly:
select
time,
delivered,
status,
activation_name,
journey_name,
error,
response
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and journey_name = 'welcome_new_users'
order by time desc
limit 100| Column | Type | Description |
|---|---|---|
| time | int | Event timestamp (epoch) |
| delivered | string | "true" or "false" |
| status | long | HTTP status code (200, 404, 500, etc.) |
| timestamp | long | Processing timestamp |
| activation_type | string | webhook, salesforce, email |
| log_time | long | Log entry timestamp |
| journey_name | string | Journey identifier |
| journey_stage_name | string | Stage name (if applicable) |
| activation_name | string | Activation name |
| rid | string | Request ID |
| error | string | Error message (if failed) |
| activation_id | string | Unique activation ID |
| event_id | string | Event that triggered activation |
| response | string | Response from destination system |
select
journey_name,
count(*) as total_activations,
count(case when delivered = 'true' then 1 end) as successful,
count(case when delivered = 'false' then 1 end) as failed,
round(100.0 * count(case when delivered = 'true' then 1 end) / count(*), 2) as success_rate_pct
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
group by journey_name
order by total_activations descselect
td_time_string(time, 'yyyy-MM-dd HH:00:00') as hour,
count(*) as activation_count,
count(case when delivered = 'true' then 1 end) as successful,
count(case when delivered = 'false' then 1 end) as failed
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and journey_name = 'abandoned_cart'
group by td_time_string(time, 'yyyy-MM-dd HH:00:00')
order by hourselect
status,
count(*) as count,
round(100.0 * count(*) / sum(count(*)) over (), 2) as percentage
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and journey_name = 'welcome_new_users'
group by status
order by count descselect
error,
status,
count(*) as error_count,
max(time) as last_occurrence
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and delivered = 'false'
group by error, status
order by error_count desc
limit 20select
td_time_string(time, 'yyyy-MM-dd HH:mm:ss') as timestamp,
activation_name,
error,
status,
response,
event_id
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1h')
and delivered = 'false'
and journey_name = 'cart_recovery'
order by time desc
limit 50select
td_time_string(time, 'yyyy-MM-dd HH:mm:ss') as timestamp,
status,
response,
error
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1h')
and activation_type = 'td_webhook_out'
and journey_name = 'product_recommendations'
order by time desc
limit 20-- Find timeout errors
select
count(*) as timeout_count,
activation_name
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and error like '%timeout%'
group by activation_nameSolution: Increase webhook timeout_ms or optimize endpoint response time
-- Find auth errors
select
error,
count(*) as count
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and (status = 401 or status = 403)
group by errorSolution: Verify API keys and credentials in secrets
-- Find rate limit errors
select
td_time_string(time, 'yyyy-MM-dd HH:mm:ss') as timestamp,
count(*) as count
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1h')
and status = 429
group by td_time_string(time, 'yyyy-MM-dd HH:mm:ss')
order by timestampSolution: Reduce activation frequency or increase rate limits with destination
-- Find validation errors
select
error,
response,
count(*) as count
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and status = 400
group by error, response
order by count descSolution: Verify payload template matches destination API requirements
Track time from event to activation:
select
journey_name,
avg(timestamp - time) as avg_latency_seconds,
min(timestamp - time) as min_latency_seconds,
max(timestamp - time) as max_latency_seconds
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1h')
group by journey_nameselect
td_time_string(time, 'yyyy-MM-dd') as date,
journey_name,
count(*) as daily_activations
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-7d')
group by td_time_string(time, 'yyyy-MM-dd'), journey_name
order by date, journey_name# Check RT status
tdx ps view <parent_segment_id> --json | jq '.realtime_config.status'
# Verify key event exists
tdx api "/audiences/<parent_segment_id>/realtime_key_events" --type cdp | jq '.[]'
# Test webhook manually
curl -X POST "https://your-webhook.com/endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"test": "payload",
"user_id": "test_123"
}'
# Check journey is enabled
tdx api "/entities/realtime_journeys/<journey_id>" --type cdp | jq '.enabled'
# View journey configuration
tdx api "/entities/realtime_journeys/<journey_id>" --type cdp | jq '.activations'✅ Journey enabled: Check journey status is "enabled" ✅ RT status OK: Verify RT config status is "ok" ✅ Events flowing: Confirm events are being ingested ✅ Key event configured: Verify key event exists ✅ Webhook accessible: Test webhook endpoint responds ✅ Credentials valid: Check API keys/secrets are current ✅ Payload valid: Verify payload matches destination format ✅ No rate limits: Check destination rate limits not exceeded
Set up monitoring alerts:
-- Alert if error rate > 10%
select
journey_name,
count(*) as total,
count(case when delivered = 'false' then 1 end) as failed,
round(100.0 * count(case when delivered = 'false' then 1 end) / count(*), 2) as error_rate
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-15m')
group by journey_name
having error_rate > 10-- Alert if no activations in last hour
select
'welcome_journey' as journey_name,
max(time) as last_activation_time,
td_time_format(max(time), 'yyyy-MM-dd HH:mm:ss', 'UTC') as last_activation
from cdp_audience_<parent_segment_id>_rt.activations
where journey_name = 'welcome_journey'
and td_interval(time, '-24h')
having max(time) < td_time_add(td_scheduled_time(), '-1h')-- Alert if specific error occurs frequently
select
error,
count(*) as count
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-15m')
and delivered = 'false'
group by error
having count > 10-- Find high-volume journeys
select
journey_name,
count(*) as activation_count,
count(distinct event_id) as unique_events
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
group by journey_name
order by activation_count descOptimization: Add filters to reduce trigger frequency
-- Find slowest activations
select
journey_name,
activation_name,
avg(timestamp - time) as avg_latency_sec
from cdp_audience_<parent_segment_id>_rt.activations
where td_interval(time, '-1d')
and delivered = 'true'
group by journey_name, activation_name
having avg_latency_sec > 60
order by avg_latency_sec descOptimization: Optimize webhook endpoint or use async processing
Consider creating:
After monitoring setup:
treasure-data/td-skills
7c1015d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.