Skip to content

CJM-119729: AJO Custom Channels execution metrics XDM mixin (Phase 1)#2181

Open
mukullamba04 wants to merge 1 commit into
adobe:masterfrom
mukullamba04:feature/custom-channel-execution-metrics-mixin-v2
Open

CJM-119729: AJO Custom Channels execution metrics XDM mixin (Phase 1)#2181
mukullamba04 wants to merge 1 commit into
adobe:masterfrom
mukullamba04:feature/custom-channel-execution-metrics-mixin-v2

Conversation

@mukullamba04
Copy link
Copy Markdown
Contributor

Summary

Adds the custom-channel-execution-metrics XDM field group under extensions/adobe/experience/customerJourneyManagement/, capturing per-call HTTP execution detail for AJO Custom Channels sends. This is the schema half of the broader AJO Custom Channels Monitoring (Phase 1) epic — paired with the Scala model in Adobe-CJM/message-runtime#5952 (now reopened) and the producer wiring in Adobe-CJM/message-streaming-worker#91, feeding the CJA template skeleton in AdobeAnalytics/aaui-features#392 (now reopened). Design source-of-truth: internal wiki 3886615741.

Key contracts / behaviors

Field design (custom-channel-execution-metrics)

  • endpoint: URL template form — placeholders ({{profile.email}}, etc.) are un-substituted before emit. This is the deliberate cardinality control; the email channel uses the same pattern (domain-only, link URL truncated) to avoid blowing up downstream live-reporting dimensions per-recipient.
  • method: HTTP verb, raw string.
  • requestTimestamp: ISO-8601, set when the HTTP boundary is crossed.
  • responseTime: integer ms, measured around the HTTP boundary only (auth lookup excluded).
  • waitTime: integer ms, Phase-2 reserved — emitted as 0 today, will be wired when throttling buckets / pre-call queuing are exposed.
  • statusCode: raw integer HTTP status code (no enum, no remapping).
  • throttleApplicable: boolean — true if a throttling config was applied to this call (not whether it was throttled). Lets downstream split capped vs. uncapped populations.
  • errorCode: free-form string. Kept as a string in XDM (NO enum constraint) — controlled vocabulary lives in the producer (message-runtime/ExecutionErrorCode, 9 codes today: AUTH_CACHE_IO, AUTH_HTTP_ERROR, AUTH_TOKEN_PARSE, AUTH_TOKEN_EXPIRED, REQUEST_GENERATION_ERROR, HTTP_4XX, HTTP_5XX, HTTP_TIMEOUT, HTTP_PARSE_ERROR). Producers can extend the vocabulary without an XDM schema change.
  • errorReason: free-form human-readable string, no PII contract beyond the existing event-level redaction.

Integration mixin — deferred

The companion integration-execution-metrics mixin that originally lived alongside this one has been removed from Phase 1 scope. Design is preserved in the wiki and will land in Phase 1B. Only the custom-channel mixin ships here.

Flow (Mermaid)

sequenceDiagram
    autonumber
    participant Cfg as ApiIntegrationSettings
    participant MSW as message-streaming-worker
    participant Exec as APIIntegrationExecutor
    participant FB as message.feedback emitter
    participant XDM as XDM field group<br/>(custom-channel-execution-metrics)

    Cfg->>MSW: endpoint template (un-interpolated)
    MSW->>Exec: executeWithMetadata(req)
    Exec-->>MSW: APIIntegrationExecutionMetadata<br/>(statusCode, responseTime)
    MSW->>FB: build feedback event<br/>endpoint = template<br/>statusCode = raw<br/>errorCode = ExecutionErrorCode.value
    FB->>XDM: emit message.feedback
Loading

Observability

  • Producer emits live via message.feedback → live-reporting-ingestion-adapter → live-reporting-service → CJA Workspace.
  • Endpoint resolver + Cortex layer consume the un-substituted template, derive host as a calculated dimension downstream.
  • No new producer-side metrics from this PR; observability is the schema contract these consumers depend on.

Schema / Repo keys

  • extensions/adobe/experience/customerJourneyManagement/custom-channel-execution-metrics.schema.json
  • extensions/adobe/experience/customerJourneyManagement/custom-channel-execution-metrics.example.1.json (success / 200)
  • extensions/adobe/experience/customerJourneyManagement/custom-channel-execution-metrics.example.2.json (HTTP 503 / populated error)

Deployment / rollout notes

  • This PR is the bottom of the dependency stackmessage-runtime, message-streaming-worker, live-reporting-*, metrics-registry-deploy, and aaui-features all reference field names defined here. Merge order: this → message-runtime → message-streaming-worker → live-reporting → metrics-registry → aaui.
  • No feature flag at the XDM layer (schemas don't gate emission).
  • No per-tenant provisioning gate at the XDM layer.

Testing

XDM repo CI validates schema/example consistency; the two examples cover the populated-success (HTTP 200) and populated-error (HTTP 503) cases. Producer/consumer integration is covered in the linked PRs.

Related work (this Phase-1 stack)

Adds two extensions/ schemas:
- custom-channel-execution-metrics: per-call HTTP execution detail
  emitted on message.feedback for custom-channel sends
- (Integration mixin deferred to Phase 1B - design preserved in
  internal wiki, not shipped in this PR)

Field design (custom-channel-execution-metrics):
endpoint (URL template form, placeholders un-substituted),
method, requestTimestamp, responseTime (ms), waitTime (ms,
Phase-2 reserved), statusCode (raw HTTP int), throttleApplicable
(config-applied flag), errorCode (free-form string), errorReason.

errorCode kept as free-form string in XDM (no enum constraint)
to let producers evolve the controlled vocabulary without an
XDM schema update.

URL-template form chosen for the endpoint field to avoid per-recipient
cardinality explosion in downstream live reporting; precedent is the
email domain-derived field that truncates link URLs.

Examples: success (200) + HTTP 503 covering populated + error cases.
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