Skip to content

Add property to support analytics across apps #1290

Open
@julianna-ciq

Description

There's a growing interest in tracking workflow and data usages, with tools like DataDog, OpenTelemetry, Sumo, or Zipkin. While Desktop Agents already have a lot of the information they need to provide these integrations, there's no reliable way for a DA to identify when multiple API calls are related. Proposed below is an optional addition to context payloads, which will provide hooks for telemetry tracking tools.

This proposal follows the same approach that HTTP used for their traceparent headers, as well as the approach used in the open source OpenTelemetry standard.

Supercedes the previously submitted issue #1142

Proposal

While a full integration with a telemetry tool would need to include information about which app shared which context when, none of those features would require a change to the Desktop Agent standard. The DA already knows all of those pieces. The only thing the DA doesn't already know, per the standard, is if an FDC3 context payload is shared in response to another FDC3 message.

This proposal is for a single, optional property change that enables the Desktop Agent and individual Apps to communicate this narrow detail.

Desktop Agent

Desktop Agents SHOULD include a traceId (a properly random UUID). If an intent/context is raised/broadcast with a traceId, the desktop agent should do nothing. If there is no traceId, the deskotp agent SHOULD add one.

Individual App

If an app receives a context payload, and wants to do something in response, the app should forward the received traceId. If the app is not responding to anything, it can safely ignore the traceId.

Example

Price App broadcasts this context.

{
  "type": "fdc3.instrument",
  "id": {
    "ticker": "MSFT"
  }
}

Since there's no traceId, the desktop agent will inject one. Order App receives this context payload:

{
  "type": "fdc3.instrument",
  "id": {
    "ticker": "MSFT"
  },
  "traceId": "699381f3-284f-4014-a476-e114ef951cef"
}

The Order App will then send off price information about MSFT. Since it's responding to a context, it will include the traceId of the context it's responding to.

{
  "type": "fdc3.valuation",
  "price": 20,
  "value": 100,
  "CURRENCY_ISOCODE": "USD",
  "traceId": "699381f3-284f-4014-a476-e114ef951cef"
}

Now, the desktop agent can see that Order App has responded to Price App. Without the traceId, the desktop agent would have to guess if the contexts were related.

Other considerations

This feature could also provide desktop agents the necessary data to help identify infinite loops. For example, you could have Price App send a message, which causes Order App to respond, which causes Price App to respond, and then they ping pong off of each other forever. In networking, this is called a "broadcast storm." There is theoretically no way to determine the difference between legitimate high traffic versus illegitimate infinte loops - at least, without this kind of tracing information.

Conclusion

This proposal makes it possible for apps or desktop agents to implement telemetry, while not being perscriptive about any particular integration or tool.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions