Skip to content

Add custom-channel execution metrics mixin for AJO monitoring#2180

Closed
mukullamba04 wants to merge 5 commits into
adobe:masterfrom
mukullamba04:feature/custom-channel-execution-metrics-mixin
Closed

Add custom-channel execution metrics mixin for AJO monitoring#2180
mukullamba04 wants to merge 5 commits into
adobe:masterfrom
mukullamba04:feature/custom-channel-execution-metrics-mixin

Conversation

@mukullamba04
Copy link
Copy Markdown
Contributor

@mukullamba04 mukullamba04 commented May 23, 2026

Adds two new XDM mixins under extensions/adobe/experience/customerJourneyManagement/ to support execution telemetry for Adobe Journey Optimizer Custom Channels and Integrations:

  • custom-channel-execution-metrics — extends ExperienceEvent for Custom Channel message feedback events.
  • integration-execution-metrics — extends ExperienceEvent for Integration execution events (separate event family from message feedback).

Design context

Two new XDM mixins for Adobe Journey Optimizer (AJO) Custom Channels monitoring. AJO Custom Channels are customer-defined outbound HTTP integrations (e.g. Viber, Slack-as-channel). Each delivery emits a message.feedback event; this mixin extends those events with per-call HTTP execution detail (endpoint URL template, method, request timestamp, response time, status code, error code, error reason, throttle-applicable flag, and a Phase-2-reserved waitTime field). Fields stored as templates (with {{placeholder}} syntax un-substituted) rather than runtime-interpolated values to control downstream cardinality. Examples cover the success and HTTP-5xx cases.

Why two mixins

The two pipelines have different shapes:

  • Custom Channel events flow through message feedback and have no response cache, so the mixin omits cacheHit / cacheApplicable.
  • Integration events emit on a separate event stream and carry required identity fields (integrationId, integrationName, messageExecutionID), so they live in their own mixin rather than being overloaded onto message feedback.

Field design notes

  • statusCode is a raw HTTP integer to preserve drill-down (e.g. 502 vs 504).
  • errorCode is a free-form string (no enum constraint) so producers can evolve the vocabulary without an XDM schema bump.
  • throttleApplicable mirrors the cacheApplicable config-level-vs-runtime semantic — distinguishes "throttling configured for this call" from "this specific call was throttled".
  • waitTime is reserved for Phase 2 throttle-wait instrumentation and will be null in Phase 1 emissions.

Examples

6 example JSON files are included (2 per mixin):

  • Custom channel: success + HTTP 5XX failure.
  • Integration: success + cacheHit.

Test plan

  • npm test
  • npm run lint
  • npm run incompatibility-check
  • npm run xed-validation
  • Verified all 6 examples validate against their mixin schemas locally.

Mukul Lamba and others added 5 commits May 20, 2026 04:00
Two new XDM mixins under customerJourneyManagement:

  - custom-channel-execution-metrics — per-call execution metrics for
    custom-channel deliveries. Populated only by MSW for custom-channel
    sends; email/SMS/Push paths leave this absent. Shape: endpoint,
    method, requestTimestamp, responseTime (server HTTP response time
    only), httpStatusCode, isThrottled, errorCode (controlled
    vocabulary), errorReason.

  - integration-execution-metrics — per-call execution metrics for
    externalDataLookup integration calls, emitted as separate
    integration.execution events. Adds integrationId, integrationName,
    messageExecutionID (correlation), cacheHit + cacheApplicable (cache
    is service-user gated), plus the shared external-call surface.

errorCode is a unified envelope covering BOTH skip-stage (auth/cache)
and HTTP-stage (4xx/5xx/timeout) failures via a single controlled
vocabulary. Replaces an earlier proposal of separate preCallFailed +
errorCategory fields.

Each mixin is abstract + intendedToExtend ExperienceEvent, following
the existing message-delivery-feedback.schema.json pattern. Field
group is Option / not required — backward compatible for email/SMS/Push.

Refs: wiki 3886615741, parent epic CJM-119729.
Reserve network, capped, and validity-expired execution error codes so downstream monitoring producers can evolve without schema churn.
Renames in both XDM mixins (custom-channel-execution-metrics + integration-execution-metrics):
- httpStatusCode → statusCode (drop http prefix; field group already namespaces it)
- isThrottled → throttleApplicable (mirrors cacheApplicable config-level vs runtime pattern)

Add waitTime field (integer ms) to both mixins, reserved for Phase 2 per-call
throttle-wait instrumentation. Phase 1 producers leave it null; field exists
in XDM so downstream consumers do not need a schema update later.

Remove enum constraint on errorCode. Producers SHOULD use the controlled
vocabulary documented in wiki 3886615741 §7 (AUTH_CACHE_IO, AUTH_HTTP_ERROR,
AUTH_TOKEN_PARSE, AUTH_TOKEN_EXPIRED, INTEGRATION_CACHE_IO, REQUEST_GENERATION_ERROR,
HTTP_4XX, HTTP_5XX, HTTP_TIMEOUT, HTTP_PARSE_ERROR) but the schema does not
enum-constrain the value so producer code can evolve the vocabulary without
an XDM schema update.

All 4 example files updated to reflect the new field names. Wiki design rationale:
https://wiki.corp.adobe.com/spaces/~mulamba/pages/3886615741

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per design decision with the reporting team (2026-05-22): the endpoint field
must store the customer-configured URL template (e.g. https://api.viber.com/
v1/{{profile.id}}/send), not the runtime-interpolated URL. Storing the
interpolated form would create one Cortex time series per recipient and blow
through the live-reporting cardinality budget.

Precedent: AJO already has an email "domain" derived field that truncates
the link URL to the host portion for the same reason.

This commit only updates the schema description text on both mixins.
No producer-code change is needed - MSW already emits
`settings.baseUri + settings.endPoint` where `settings.endPoint` is the
customer-configured template (substitution happens later at HTTP request
time via the PoolingRestAPIIntegration layer).

Live reporting derives a coarser `endpointHost` tag from this template URL
for Cortex tagging; CJA all-time can still use the full template for
endpoint-level drilldown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mukullamba04 mukullamba04 changed the title Add custom-channel + integration execution metrics mixins for AJO monitoring Add custom-channel execution metrics mixin for AJO monitoring May 23, 2026
@mukullamba04
Copy link
Copy Markdown
Contributor Author

Closed in favor of #2181 — clean rewrite with all session decisions consolidated (field renames, URL-template form, free-form errorCode, integration mixin deferred to Phase 1B).

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