Add Amplitude plugin v1.1.0 for monitoring product analytics data - #106
Add Amplitude plugin v1.1.0 for monitoring product analytics data#106conor-richey wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe PR adds the Amplitude plugin with authentication, regional API configuration, analytics data streams, indexed object mappings, and three dashboard views. ChangesAmplitude plugin contracts and configuration
Catalog and user data streams
Analytics streams and transformations
Dashboard views and navigation
Sequence Diagram(s)sequenceDiagram
participant OverviewDashboard
participant AmplitudeDataStream
participant AmplitudeAPI
participant ResponseScript
OverviewDashboard->>AmplitudeDataStream: request history or realtime data
AmplitudeDataStream->>AmplitudeAPI: send configured Amplitude request
AmplitudeAPI-->>AmplitudeDataStream: return parallel dates and series
AmplitudeDataStream->>ResponseScript: transform response arrays
ResponseScript-->>OverviewDashboard: return row-based records
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/Amplitude/v1/custom_types.json`:
- Line 4: Rename the Amplitude source types from plugin-prefixed names to the
upstream terms Event Type and Cohort in plugins/Amplitude/v1/custom_types.json
at lines 4-4 and 11-11. Update every matching sourceType reference in
plugins/Amplitude/v1/defaultContent/scopes.json at lines 5-5 and 17-17, plus all
corresponding data stream matchers under plugins/Amplitude/v1, so all references
use the renamed values consistently.
In `@plugins/Amplitude/v1/dataStreams/eventCountHistory.json`:
- Line 11: Move the request-object transformations into map definitions before
getArgs: in plugins/Amplitude/v1/dataStreams/eventCountHistory.json lines 11-11,
map the optional group-by event property and bind the resulting JSON value in
the HTTP query; in plugins/Amplitude/v1/dataStreams/cohortEventHistory.json
lines 11-12, map the event-type and cohort-segment JSON values and bind them in
the query. Remove the embedded IIFE and complex mustache transformations while
preserving the existing request payloads.
In `@plugins/Amplitude/v1/dataStreams/eventTypes.json`:
- Around line 27-31: Replace the mustache-style valueExpression-based label
derivations with map transformations at both affected data stream definitions:
in plugins/Amplitude/v1/dataStreams/eventTypes.json#L27-L31, update the label
mapping to use map while preserving the existing display_name fallback to
event_type; in plugins/Amplitude/v1/dataStreams/eventProperties.json#L22-L26,
map event_property to name using map instead of valueExpression.
In `@plugins/Amplitude/v1/dataStreams/scripts/eventCountHistory.js`:
- Around line 20-27: Update the single-series branch in the event count
transformation so grouped requests retain the corresponding group label instead
of assigning groupValue to null. Determine whether grouping is active from the
available grouping metadata or request context, and map the one series to its
one label while preserving the existing ungrouped output shape.
In `@plugins/Amplitude/v1/dataStreams/userSearch.json`:
- Around line 16-22: Add example placeholders to both required text inputs: in
plugins/Amplitude/v1/dataStreams/userSearch.json lines 16-22, update the
identifier field with a neutral example such as user@example.com; in
plugins/Amplitude/v1/dataStreams/userActivity.json lines 19-25, add a numeric
Amplitude ID example such as 123456789. Preserve the existing validation and
help text.
In `@plugins/Amplitude/v1/dataStreams/validateAuth.json`:
- Line 3: Update the data stream displayName from the action-oriented “Validate
Auth” to a noun-based name such as “Authentication Validation,” while leaving
the stream behavior unchanged.
In `@plugins/Amplitude/v1/defaultContent/eventTypeOverview.dash.json`:
- Around line 113-116: Remove the hard-coded Amplitude taxonomy defaults from
plugins/Amplitude/v1/defaultContent/eventTypeOverview.dash.json lines 113-116 by
eliminating the default groupByProperty value "[Amplitude] Element Text"; also
remove the default eventType value "Dashboard Loaded" from
plugins/Amplitude/v1/defaultContent/cohortOverview.dash.json lines 76-78,
leaving these selections user-driven or plugin-validated.
In `@plugins/Amplitude/v1/ui.json`:
- Around line 23-38: Add neutral, non-secret example placeholder values to both
password fields identified by the apiKey and secretKey names in the UI
configuration. Keep the existing labels, help text, and required validation
unchanged, and ensure the placeholders are illustrative examples rather than
real credentials.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 83dff1c5-adcf-49be-a6d9-011b4afa4fb7
⛔ Files ignored due to path filters (1)
plugins/Amplitude/v1/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (25)
plugins/Amplitude/v1/configValidation.jsonplugins/Amplitude/v1/custom_types.jsonplugins/Amplitude/v1/dataStreams/activeUsersHistory.jsonplugins/Amplitude/v1/dataStreams/cohortEventHistory.jsonplugins/Amplitude/v1/dataStreams/cohorts.jsonplugins/Amplitude/v1/dataStreams/eventCountHistory.jsonplugins/Amplitude/v1/dataStreams/eventProperties.jsonplugins/Amplitude/v1/dataStreams/eventTypes.jsonplugins/Amplitude/v1/dataStreams/realtimeActiveUsers.jsonplugins/Amplitude/v1/dataStreams/scripts/activeUsersHistory.jsplugins/Amplitude/v1/dataStreams/scripts/cohortEventHistory.jsplugins/Amplitude/v1/dataStreams/scripts/eventCountHistory.jsplugins/Amplitude/v1/dataStreams/scripts/realtimeActiveUsers.jsplugins/Amplitude/v1/dataStreams/userActivity.jsonplugins/Amplitude/v1/dataStreams/userSearch.jsonplugins/Amplitude/v1/dataStreams/validateAuth.jsonplugins/Amplitude/v1/defaultContent/cohortOverview.dash.jsonplugins/Amplitude/v1/defaultContent/eventTypeOverview.dash.jsonplugins/Amplitude/v1/defaultContent/manifest.jsonplugins/Amplitude/v1/defaultContent/overview.dash.jsonplugins/Amplitude/v1/defaultContent/scopes.jsonplugins/Amplitude/v1/docs/README.mdplugins/Amplitude/v1/indexDefinitions/default.jsonplugins/Amplitude/v1/metadata.jsonplugins/Amplitude/v1/ui.json
- Fix eventCountHistory grouping bug: determine grouped vs ungrouped from context.config.groupByProperty instead of series.length, which incorrectly dropped the group label whenever a grouped property only returned one distinct value. - Simplify getArgs request construction in eventCountHistory.json and cohortEventHistory.json, dropping an embedded IIFE and a redundant Array.isArray check (autocomplete fields always return an array). - Rename validateAuth stream display name to noun-based 'Authentication Validation'. - Add example placeholders to userSearch, userActivity, and the plugin's apiKey/secretKey fields. - Remove hardcoded, project-specific default values (a SquaredUp internal event property and event name) from the Event Type and Cohort overview dashboards. Not applying two other suggestions from the same review pass: - Renaming 'Amplitude Event Type'/'Amplitude Cohort' source types to drop the plugin-name prefix goes against the established convention used by every other multi-object-type plugin in this repo. - No 'map' transformation mechanism exists in this plugin schema for eventTypes/eventProperties valueExpression columns; the current fallback ternary matches the documented pattern.
🔌 Plugin overview
🖼️ Plugin screenshots
Plugin configuration
Default dashboards
🧪 Testing
📚 Checklist
Summary by CodeRabbit