Skip to content

Commit 8f77e3e

Browse files
Add docstring for workflowDiagnosticsEnabled feature flag resolver (#977)
* Add env variable for enabling workflow diagnostics, and use it in the workflowDiagnosticsEnabled feature flag resolver * Add docstring to workflowDiagnosticsEnabled resolver, detailing required server versions for full & partial support.
1 parent 299a57d commit 8f77e3e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
* Returns whether workflow diagnostics APIs and UI are enabled.
3+
*
4+
* To enable workflow diagnostics, set the CADENCE_WORKFLOW_DIAGNOSTICS_ENABLED env variable to true.
5+
* For further customization, override the implementation of this resolver.
6+
*
7+
* Server version behaviour:
8+
* - \>= 1.3.1: Diagnostics APIs and UI will work as expected.
9+
* - \>= 1.2.13 & < 1.3.1: Diagnostics APIs will work, but the format may not be as expected; only raw JSON will be displayed.
10+
* - < 1.2.13: Diagnostics APIs will return a GRPC unimplemented error (maps to HTTP 404 in the client).
11+
*
12+
* @returns {Promise<boolean>} Whether workflow diagnostics are enabled.
13+
*/
114
export default async function workflowDiagnosticsEnabled(): Promise<boolean> {
2-
return false;
15+
return process.env.CADENCE_WORKFLOW_DIAGNOSTICS_ENABLED === 'true';
316
}

0 commit comments

Comments
 (0)