@heroku/plugin-compute 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/compute/create/telemetry-drain.d.ts +20 -0
- package/lib/commands/compute/create/telemetry-drain.js +81 -0
- package/lib/commands/compute/create/telemetry-drain.js.map +1 -0
- package/lib/commands/compute/generate.d.ts +5 -0
- package/lib/commands/compute/generate.js +6 -0
- package/lib/commands/compute/generate.js.map +1 -1
- package/lib/commands/compute/update/telemetry-drain.d.ts +20 -0
- package/lib/commands/compute/update/telemetry-drain.js +69 -0
- package/lib/commands/compute/update/telemetry-drain.js.map +1 -0
- package/lib/shared/computeTelemetryDrain.d.ts +11 -0
- package/lib/shared/computeTelemetryDrain.js +30 -1
- package/lib/shared/computeTelemetryDrain.js.map +1 -1
- package/lib/shared/herokuProxyApi.js +2 -2
- package/messages/compute.create.telemetry-drain.md +53 -0
- package/messages/compute.errors.md +9 -1
- package/messages/compute.generate.md +8 -0
- package/messages/compute.update.telemetry-drain.md +57 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +290 -84
- package/package.json +1 -1
- package/schemas/compute-create-telemetry__drain.json +44 -0
- package/schemas/compute-update-telemetry__drain.json +43 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type TelemetryDrainResult } from '../../../shared/computeTelemetryDrain.js';
|
|
3
|
+
export type ComputeTelemetryDrainCreateResult = TelemetryDrainResult & {
|
|
4
|
+
app: string;
|
|
5
|
+
};
|
|
6
|
+
export default class TelemetryDrainCreate extends SfCommand<ComputeTelemetryDrainCreateResult> {
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly examples: string[];
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
url: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
signals: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
transport: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
header: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
static readonly requiresProject = false;
|
|
18
|
+
static readonly summary: string;
|
|
19
|
+
run(): Promise<ComputeTelemetryDrainCreateResult>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { requireAppName, resolveComputeAppNameFromDir, validateName } from '../../../shared/computeApp.js';
|
|
19
|
+
import { resolveHerokuAppId } from '../../../shared/computeQuery.js';
|
|
20
|
+
import { exporterTypeForTransport, parseHeaderFlags, toTelemetryDrainResult, validateAndFormatSignals, } from '../../../shared/computeTelemetryDrain.js';
|
|
21
|
+
import { createTelemetryDrainViaProxy } from '../../../shared/herokuProxyApi.js';
|
|
22
|
+
import { PLUGIN_NAME } from '../../../shared/plugin-name.js';
|
|
23
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
|
+
const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.create.telemetry-drain');
|
|
25
|
+
export default class TelemetryDrainCreate extends SfCommand {
|
|
26
|
+
static description = messages.getMessage('description');
|
|
27
|
+
static examples = messages.getMessages('examples');
|
|
28
|
+
static flags = {
|
|
29
|
+
name: Flags.string({
|
|
30
|
+
char: 'n',
|
|
31
|
+
env: 'COMPUTE_APP_NAME',
|
|
32
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
33
|
+
}),
|
|
34
|
+
url: Flags.string({
|
|
35
|
+
required: true,
|
|
36
|
+
summary: messages.getMessage('flags.url.summary'),
|
|
37
|
+
}),
|
|
38
|
+
signals: Flags.string({
|
|
39
|
+
summary: messages.getMessage('flags.signals.summary'),
|
|
40
|
+
default: 'all',
|
|
41
|
+
}),
|
|
42
|
+
// splunk is accepted by exporterTypeForTransport but deliberately left out of `options` and the
|
|
43
|
+
// help text: http and grpc are the public transports, splunk stays hidden.
|
|
44
|
+
transport: Flags.string({
|
|
45
|
+
summary: messages.getMessage('flags.transport.summary'),
|
|
46
|
+
default: 'http',
|
|
47
|
+
}),
|
|
48
|
+
header: Flags.string({
|
|
49
|
+
multiple: true,
|
|
50
|
+
summary: messages.getMessage('flags.header.summary'),
|
|
51
|
+
description: messages.getMessage('flags.header.description'),
|
|
52
|
+
}),
|
|
53
|
+
'target-org': Flags.requiredOrg({ char: 'o' }),
|
|
54
|
+
};
|
|
55
|
+
// Org-mediated lookup by --name -- no local project files are read.
|
|
56
|
+
static requiresProject = false;
|
|
57
|
+
static summary = messages.getMessage('summary');
|
|
58
|
+
async run() {
|
|
59
|
+
const { flags } = await this.parse(TelemetryDrainCreate);
|
|
60
|
+
const name = requireAppName(flags.name ?? (await resolveComputeAppNameFromDir(process.cwd())));
|
|
61
|
+
validateName(name);
|
|
62
|
+
// Validate every input before the first network call so a typo never costs a round trip.
|
|
63
|
+
const signals = validateAndFormatSignals(flags.signals);
|
|
64
|
+
const exporterType = exporterTypeForTransport(flags.transport);
|
|
65
|
+
const headers = flags.header ? parseHeaderFlags(flags.header) : undefined;
|
|
66
|
+
const connection = flags['target-org'].getConnection();
|
|
67
|
+
const appId = await resolveHerokuAppId(connection, name);
|
|
68
|
+
const drain = await createTelemetryDrainViaProxy(connection, {
|
|
69
|
+
appId,
|
|
70
|
+
name,
|
|
71
|
+
endpoint: flags.url,
|
|
72
|
+
exporterType,
|
|
73
|
+
signals,
|
|
74
|
+
headers,
|
|
75
|
+
});
|
|
76
|
+
const result = { app: name, ...toTelemetryDrainResult(drain) };
|
|
77
|
+
this.logSuccess(messages.getMessage('info.created', [result.id, name]));
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=telemetry-drain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-drain.js","sourceRoot":"","sources":["../../../../src/commands/compute/create/telemetry-drain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAC,cAAc,EAAE,4BAA4B,EAAE,YAAY,EAAC,MAAM,+BAA+B,CAAC;AACzG,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAEhB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAE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AAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -7,6 +7,10 @@ export type ComputeGenerateResult = {
|
|
|
7
7
|
path: string;
|
|
8
8
|
};
|
|
9
9
|
export default class Generate extends SfCommand<ComputeGenerateResult> {
|
|
10
|
+
static readonly deprecationOptions: {
|
|
11
|
+
to: string;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
10
14
|
static readonly description: string;
|
|
11
15
|
static readonly examples: string[];
|
|
12
16
|
static fetchTemplateSource: FetchTemplateSource;
|
|
@@ -16,6 +20,7 @@ export default class Generate extends SfCommand<ComputeGenerateResult> {
|
|
|
16
20
|
language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
21
|
};
|
|
18
22
|
static readonly requiresProject = true;
|
|
23
|
+
static readonly state = "deprecated";
|
|
19
24
|
static readonly summary: string;
|
|
20
25
|
run(): Promise<ComputeGenerateResult>;
|
|
21
26
|
}
|
|
@@ -24,6 +24,11 @@ import { PLUGIN_NAME } from '../../shared/plugin-name.js';
|
|
|
24
24
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
25
25
|
const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.generate');
|
|
26
26
|
export default class Generate extends SfCommand {
|
|
27
|
+
// oclif's Command lifecycle prints the warning from state + deprecationOptions; don't also this.warn().
|
|
28
|
+
static deprecationOptions = {
|
|
29
|
+
to: 'template generate project',
|
|
30
|
+
message: messages.getMessage('deprecation.message'),
|
|
31
|
+
};
|
|
27
32
|
static description = messages.getMessage('description');
|
|
28
33
|
static examples = messages.getMessages('examples');
|
|
29
34
|
// Overridable by tests so generate.test.ts stays offline -- production always uses the real
|
|
@@ -50,6 +55,7 @@ export default class Generate extends SfCommand {
|
|
|
50
55
|
}),
|
|
51
56
|
};
|
|
52
57
|
static requiresProject = true;
|
|
58
|
+
static state = 'deprecated';
|
|
53
59
|
static summary = messages.getMessage('summary');
|
|
54
60
|
async run() {
|
|
55
61
|
const { flags } = await this.parse(Generate);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/compute/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,WAAW,CAAC;AAExC,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,YAAY,EAAC,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAC,mBAAmB,EAA0C,MAAM,uCAAuC,CAAC;AACnH,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AAExD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;AASxE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAgC;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/compute/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,WAAW,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G,QAAQ,CAAC;IACjC,CAAC;IAED,KAAK,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7D,yFAAyF;QACzF,sEAAsE;QACtE,KAAK,CAAC,YAAY,CAAC,GAAG,QAAQ;aAC3B,UAAU,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;aAC1D,UAAU,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type TelemetryDrainResult } from '../../../shared/computeTelemetryDrain.js';
|
|
3
|
+
export type ComputeTelemetryDrainUpdateResult = TelemetryDrainResult;
|
|
4
|
+
export default class TelemetryDrainUpdate extends SfCommand<ComputeTelemetryDrainUpdateResult> {
|
|
5
|
+
static readonly args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
url: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
signals: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
transport: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
header: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
static readonly requiresProject = false;
|
|
18
|
+
static readonly summary: string;
|
|
19
|
+
run(): Promise<ComputeTelemetryDrainUpdateResult>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Args } from '@oclif/core';
|
|
17
|
+
import { Messages } from '@salesforce/core';
|
|
18
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
19
|
+
import { exporterTypeForTransport, parseHeaderFlags, toTelemetryDrainResult, validateAndFormatSignals, } from '../../../shared/computeTelemetryDrain.js';
|
|
20
|
+
import { updateTelemetryDrainViaProxy } from '../../../shared/herokuProxyApi.js';
|
|
21
|
+
import { PLUGIN_NAME } from '../../../shared/plugin-name.js';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages(PLUGIN_NAME, 'compute.update.telemetry-drain');
|
|
24
|
+
export default class TelemetryDrainUpdate extends SfCommand {
|
|
25
|
+
// No --name: the drain ID is globally unique, as in display telemetry-drain.
|
|
26
|
+
static args = {
|
|
27
|
+
id: Args.string({
|
|
28
|
+
required: true,
|
|
29
|
+
summary: messages.getMessage('args.id.summary'),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
static description = messages.getMessage('description');
|
|
33
|
+
static examples = messages.getMessages('examples');
|
|
34
|
+
static flags = {
|
|
35
|
+
url: Flags.string({ summary: messages.getMessage('flags.url.summary') }),
|
|
36
|
+
signals: Flags.string({ summary: messages.getMessage('flags.signals.summary') }),
|
|
37
|
+
// As in create: splunk is accepted but kept out of the help text.
|
|
38
|
+
transport: Flags.string({ summary: messages.getMessage('flags.transport.summary') }),
|
|
39
|
+
header: Flags.string({
|
|
40
|
+
multiple: true,
|
|
41
|
+
summary: messages.getMessage('flags.header.summary'),
|
|
42
|
+
description: messages.getMessage('flags.header.description'),
|
|
43
|
+
}),
|
|
44
|
+
'target-org': Flags.requiredOrg({ char: 'o' }),
|
|
45
|
+
};
|
|
46
|
+
static requiresProject = false;
|
|
47
|
+
static summary = messages.getMessage('summary');
|
|
48
|
+
async run() {
|
|
49
|
+
const { args, flags } = await this.parse(TelemetryDrainUpdate);
|
|
50
|
+
if (!flags.url && !flags.signals && !flags.transport && !flags.header) {
|
|
51
|
+
throw messages.createError('error.nothingToUpdate');
|
|
52
|
+
}
|
|
53
|
+
// Only the attributes the user passed go on the wire (PATCH), so everything else is left as-is.
|
|
54
|
+
const signals = flags.signals ? validateAndFormatSignals(flags.signals) : undefined;
|
|
55
|
+
const type = flags.transport ? exporterTypeForTransport(flags.transport) : undefined;
|
|
56
|
+
const headers = flags.header ? parseHeaderFlags(flags.header) : undefined;
|
|
57
|
+
const endpoint = flags.url;
|
|
58
|
+
const hasExporterChange = endpoint !== undefined || type !== undefined || headers !== undefined;
|
|
59
|
+
const exporter = hasExporterChange ? { endpoint, type, headers } : undefined;
|
|
60
|
+
const connection = flags['target-org'].getConnection();
|
|
61
|
+
const drain = await updateTelemetryDrainViaProxy(connection, { drainId: args.id, signals, exporter });
|
|
62
|
+
// Fall back to the requested ID if the response omits it, so --json never reports an empty id.
|
|
63
|
+
const drainResult = toTelemetryDrainResult(drain);
|
|
64
|
+
const result = { ...drainResult, id: drainResult.id === '' ? args.id : drainResult.id };
|
|
65
|
+
this.logSuccess(messages.getMessage('info.updated', [result.id]));
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=telemetry-drain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-drain.js","sourceRoot":"","sources":["../../../../src/commands/compute/update/telemetry-drain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAEhB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAE3D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,gCAAgC,CAAC,CAAC;AAItF,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAA4C;IAC5F,6EAA6E;IACtE,MAAM,CAAU,IAAI,GAAG;QAC5B,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAChD,CAAC;KACH,CAAC;IAEK,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG;QAC7B,GAAG,EAAE,K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|
3
3
|
export declare const TELEMETRY_SIGNALS: readonly TelemetrySignal[];
|
|
4
4
|
export declare const TELEMETRY_TRANSPORTS: readonly string[];
|
|
5
|
+
export declare const PUBLIC_TRANSPORTS: readonly string[];
|
|
5
6
|
export declare function validateAndFormatSignals(input: string): TelemetrySignal[];
|
|
6
7
|
export declare function exporterTypeForTransport(transport: string): TelemetryExporterType;
|
|
7
8
|
export declare function transportLabelForExporterType(exporterType: string): string;
|
|
@@ -9,3 +10,13 @@ export declare function formatTelemetryDrainRows(drain: components['schemas']['T
|
|
|
9
10
|
key: string;
|
|
10
11
|
value: string;
|
|
11
12
|
}>;
|
|
13
|
+
export declare function parseHeaderFlags(inputs: readonly string[]): Record<string, string>;
|
|
14
|
+
export type TelemetryDrainResult = {
|
|
15
|
+
endpoint?: string;
|
|
16
|
+
exporterType?: string;
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
id: string;
|
|
19
|
+
signals: string[];
|
|
20
|
+
transport?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function toTelemetryDrainResult(drain: components['schemas']['TelemetryDrain']): TelemetryDrainResult;
|
|
@@ -41,6 +41,8 @@ const TRANSPORT_TO_EXPORTER = {
|
|
|
41
41
|
splunk: 'splunk',
|
|
42
42
|
};
|
|
43
43
|
export const TELEMETRY_TRANSPORTS = Object.keys(TRANSPORT_TO_EXPORTER);
|
|
44
|
+
// The transports advertised to users (error text, hints). `splunk` is still accepted but stays hidden.
|
|
45
|
+
export const PUBLIC_TRANSPORTS = ['http', 'grpc'];
|
|
44
46
|
// DELIBERATELY case-sensitive, non-trimming, and treats `all` only as the whole input (never as a
|
|
45
47
|
// comma-separated element). This is an explicit decision, not an oversight: the plugin is pre-GA and
|
|
46
48
|
// no command consumes this yet, so staying strict now is the safe direction -- leniency (trimming,
|
|
@@ -61,7 +63,8 @@ export function validateAndFormatSignals(input) {
|
|
|
61
63
|
// (exact-match, no trim/case-fold); an unknown transport throws rather than silently defaulting.
|
|
62
64
|
export function exporterTypeForTransport(transport) {
|
|
63
65
|
if (!Object.hasOwn(TRANSPORT_TO_EXPORTER, transport)) {
|
|
64
|
-
|
|
66
|
+
const publicList = PUBLIC_TRANSPORTS.join(', ');
|
|
67
|
+
throw messages.createError('error.invalidTransport', [transport, publicList], [publicList]);
|
|
65
68
|
}
|
|
66
69
|
return TRANSPORT_TO_EXPORTER[transport];
|
|
67
70
|
}
|
|
@@ -83,4 +86,30 @@ export function formatTelemetryDrainRows(drain, appName) {
|
|
|
83
86
|
{ key: 'Headers', value: hasHeaders ? JSON.stringify(maskHeaderValues(headers)) : DASH },
|
|
84
87
|
];
|
|
85
88
|
}
|
|
89
|
+
// Splits on the first = only, so a header value that itself contains one (e.g. a base64 token's
|
|
90
|
+
// padding) isn't truncated. Requires a non-empty key; an empty value is allowed.
|
|
91
|
+
const HEADER_PATTERN = /^([^=]+)=(.*)$/v;
|
|
92
|
+
// Turns repeated --header key=value flags into the exporter headers object. A repeated key keeps its
|
|
93
|
+
// last value. Built via fromEntries so a key like `__proto__` becomes an own property rather than
|
|
94
|
+
// touching the prototype.
|
|
95
|
+
export function parseHeaderFlags(inputs) {
|
|
96
|
+
const entries = inputs.map((input) => {
|
|
97
|
+
const match = HEADER_PATTERN.exec(input);
|
|
98
|
+
if (!match) {
|
|
99
|
+
throw messages.createError('error.invalidHeader', [input]);
|
|
100
|
+
}
|
|
101
|
+
return [match[1], match[2]];
|
|
102
|
+
});
|
|
103
|
+
return Object.fromEntries(entries);
|
|
104
|
+
}
|
|
105
|
+
export function toTelemetryDrainResult(drain) {
|
|
106
|
+
return {
|
|
107
|
+
id: drain.id ?? '',
|
|
108
|
+
signals: drain.signals ?? [],
|
|
109
|
+
endpoint: drain.exporter?.endpoint,
|
|
110
|
+
exporterType: drain.exporter?.type,
|
|
111
|
+
transport: drain.exporter?.type ? transportLabelForExporterType(drain.exporter.type) : undefined,
|
|
112
|
+
headers: drain.exporter?.headers,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
86
115
|
//# sourceMappingURL=computeTelemetryDrain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeTelemetryDrain.js","sourceRoot":"","sources":["../../src/shared/computeTelemetryDrain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAK1C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAEtE,8FAA8F;AAC9F,yDAAyD;AACzD,MAAM,IAAI,GAAG,GAAG,CAAC;AAEjB,mGAAmG;AACnG,sGAAsG;AACtG,kGAAkG;AAClG,qFAAqF;AACrF,sFAAsF;AACtF,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B,SAAS,gBAAgB,CAAC,OAA+B;IACvD,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,mFAAmF;AACnF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,iBAAiB,GAA+B,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE3F,mGAAmG;AACnG,6EAA6E;AAC7E,uCAAuC;AACvC,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,QAAQ;CACwC,CAAC;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAsB,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"computeTelemetryDrain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M,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAeD,MAAM,UAAU,sBAAsB,CAAC,KAA8C;IACnF,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ;QAClC,YAAY,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI;QAClC,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAChG,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -193,7 +193,7 @@ export async function updateComputeConfigVarsViaProxy(connection, params) {
|
|
|
193
193
|
}
|
|
194
194
|
// Shared by display.ts (formation display) and config/set.ts + config/unset.ts (post-update
|
|
195
195
|
// release number) -- the one place that owns "list releases, take the highest version number."
|
|
196
|
-
// Range: version ..; max=1
|
|
196
|
+
// Range: version ..; max=1, order=desc asks Heroku for just the single highest-version release,
|
|
197
197
|
// but Math.max is still applied defensively rather than trusting max=1 to always return exactly
|
|
198
198
|
// one element. Returns undefined (not an error) for a brand-new app with no releases yet.
|
|
199
199
|
export async function fetchLatestReleaseVersionViaProxy(connection, params) {
|
|
@@ -202,7 +202,7 @@ export async function fetchLatestReleaseVersionViaProxy(connection, params) {
|
|
|
202
202
|
method: 'GET',
|
|
203
203
|
path: '/apps/{app_id_or_name}/releases',
|
|
204
204
|
params: { app_id_or_name: params.appId },
|
|
205
|
-
headers: { Range: 'version ..; max=1
|
|
205
|
+
headers: { Range: 'version ..; max=1, order=desc' },
|
|
206
206
|
});
|
|
207
207
|
const versions = releases.map(r => r.version).filter((v) => v !== undefined);
|
|
208
208
|
return versions.length === 0 ? undefined : Math.max(...versions);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Add a telemetry drain to a compute app.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Creates an OpenTelemetry drain that forwards the compute app's logs, metrics,
|
|
8
|
+
and traces to the endpoint you give with --url. Choose which signals to
|
|
9
|
+
forward with --signals and the wire protocol with --transport. Use
|
|
10
|
+
sf compute update telemetry-drain to change a drain later.
|
|
11
|
+
|
|
12
|
+
# flags.name.summary
|
|
13
|
+
|
|
14
|
+
DeveloperName of the compute app to add the drain to (or
|
|
15
|
+
<namespace>\_\_<developerName> if it was deployed under a namespace).
|
|
16
|
+
Defaults to the COMPUTE_APP_NAME environment variable, or the current
|
|
17
|
+
directory's app name if that isn't set either.
|
|
18
|
+
|
|
19
|
+
# flags.url.summary
|
|
20
|
+
|
|
21
|
+
Endpoint to forward telemetry to.
|
|
22
|
+
|
|
23
|
+
# flags.signals.summary
|
|
24
|
+
|
|
25
|
+
Comma-separated signals to forward: traces, metrics, logs, or all.
|
|
26
|
+
|
|
27
|
+
# flags.transport.summary
|
|
28
|
+
|
|
29
|
+
Wire protocol to use: http (OTLP over HTTP) or grpc (OTLP over gRPC).
|
|
30
|
+
|
|
31
|
+
# flags.header.summary
|
|
32
|
+
|
|
33
|
+
Header to send with each export, as key=value.
|
|
34
|
+
|
|
35
|
+
# flags.header.description
|
|
36
|
+
|
|
37
|
+
Repeat the flag to send more than one header. Header values often carry
|
|
38
|
+
credentials; they are sent to the endpoint and are never printed to the
|
|
39
|
+
terminal, but are included in --json output.
|
|
40
|
+
|
|
41
|
+
# info.created
|
|
42
|
+
|
|
43
|
+
Created telemetry drain %s for %s.
|
|
44
|
+
|
|
45
|
+
# examples
|
|
46
|
+
|
|
47
|
+
- Forward all signals from a compute app to an OTLP/HTTP collector:
|
|
48
|
+
|
|
49
|
+
<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4318 --target-org my-org
|
|
50
|
+
|
|
51
|
+
- Forward only traces and logs over gRPC, with an auth header:
|
|
52
|
+
|
|
53
|
+
<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4317 --transport grpc --signals traces,logs --header "x-api-key=my-key" --target-org my-org
|
|
@@ -205,7 +205,15 @@ The telemetry transport "%s" isn't valid. Use one of: %s.
|
|
|
205
205
|
|
|
206
206
|
# error.invalidTransport.actions
|
|
207
207
|
|
|
208
|
-
- Pass http
|
|
208
|
+
- Pass one of: %s. http is OTLP over HTTP; grpc is OTLP over gRPC.
|
|
209
|
+
|
|
210
|
+
# error.invalidHeader
|
|
211
|
+
|
|
212
|
+
The telemetry header "%s" isn't valid. Headers must be passed as key=value.
|
|
213
|
+
|
|
214
|
+
# error.invalidHeader.actions
|
|
215
|
+
|
|
216
|
+
- Pass each header as --header key=value; repeat the flag for more than one header.
|
|
209
217
|
|
|
210
218
|
# error.telemetryDrainNotFound
|
|
211
219
|
|
|
@@ -11,6 +11,14 @@ contacted, but this command does fetch the starter source for the chosen
|
|
|
11
11
|
language from its Heroku AppLink reference app on GitHub, so it requires
|
|
12
12
|
outbound network access.
|
|
13
13
|
|
|
14
|
+
This command is deprecated but still works. When you move to sf template generate
|
|
15
|
+
project --template compute, note that --language no longer defaults to node: the
|
|
16
|
+
replacement's --compute-language flag makes the language an explicit choice.
|
|
17
|
+
|
|
18
|
+
# deprecation.message
|
|
19
|
+
|
|
20
|
+
This command will be available as sf template generate project --template compute in version 1.0.0 of plugin-compute.
|
|
21
|
+
|
|
14
22
|
# flags.name.summary
|
|
15
23
|
|
|
16
24
|
Name for the new compute app. Use <namespace>\_\_<developerName> to scaffold
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Change the configuration of a compute telemetry drain.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Updates only the attributes you pass and leaves the rest of the drain as it
|
|
8
|
+
is. Passing --header adds or overwrites the headers you give and keeps the
|
|
9
|
+
drain's other headers. Use sf compute list telemetry-drain to find a drain's ID.
|
|
10
|
+
|
|
11
|
+
# args.id.summary
|
|
12
|
+
|
|
13
|
+
ID of the telemetry drain to update.
|
|
14
|
+
|
|
15
|
+
# flags.url.summary
|
|
16
|
+
|
|
17
|
+
New endpoint to forward telemetry to.
|
|
18
|
+
|
|
19
|
+
# flags.signals.summary
|
|
20
|
+
|
|
21
|
+
New comma-separated signals to forward: traces, metrics, logs, or all.
|
|
22
|
+
|
|
23
|
+
# flags.transport.summary
|
|
24
|
+
|
|
25
|
+
New wire protocol: http (OTLP over HTTP) or grpc (OTLP over gRPC).
|
|
26
|
+
|
|
27
|
+
# flags.header.summary
|
|
28
|
+
|
|
29
|
+
Header to send with each export, as key=value.
|
|
30
|
+
|
|
31
|
+
# flags.header.description
|
|
32
|
+
|
|
33
|
+
Repeat the flag to send more than one header. A header you pass adds
|
|
34
|
+
or overwrites the one with the same name; the drain's other headers are kept. Header values often carry credentials; they are
|
|
35
|
+
never printed to the terminal, but are included in --json output.
|
|
36
|
+
|
|
37
|
+
# error.nothingToUpdate
|
|
38
|
+
|
|
39
|
+
Nothing to update. Pass at least one of --url, --signals, --transport, or --header.
|
|
40
|
+
|
|
41
|
+
# error.nothingToUpdate.actions
|
|
42
|
+
|
|
43
|
+
- Pass the attribute you want to change, for example --url https://collector.example.com:4318.
|
|
44
|
+
|
|
45
|
+
# info.updated
|
|
46
|
+
|
|
47
|
+
Updated telemetry drain %s.
|
|
48
|
+
|
|
49
|
+
# examples
|
|
50
|
+
|
|
51
|
+
- Point a drain at a new endpoint:
|
|
52
|
+
|
|
53
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --url https://collector.example.com:4318 --target-org my-org
|
|
54
|
+
|
|
55
|
+
- Forward only logs over gRPC:
|
|
56
|
+
|
|
57
|
+
<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --signals logs --transport grpc --target-org my-org
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku/plugin-compute",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@heroku/plugin-compute",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4",
|
package/oclif.manifest.json
CHANGED
|
@@ -144,7 +144,11 @@
|
|
|
144
144
|
"compute:generate": {
|
|
145
145
|
"aliases": [],
|
|
146
146
|
"args": {},
|
|
147
|
-
"
|
|
147
|
+
"deprecationOptions": {
|
|
148
|
+
"to": "template generate project",
|
|
149
|
+
"message": "This command will be available as sf template generate project --template compute in version 1.0.0 of plugin-compute."
|
|
150
|
+
},
|
|
151
|
+
"description": "Creates the app directory under force-app/main/default/platformComputeApps/<name>/ (or\n--output-dir) with a compute metadata file, a Procfile, a project.toml, and\nstarter source in the language you choose with --language. No org is\ncontacted, but this command does fetch the starter source for the chosen\nlanguage from its Heroku AppLink reference app on GitHub, so it requires\noutbound network access.\n\nThis command is deprecated but still works. When you move to sf template generate\nproject --template compute, note that --language no longer defaults to node: the\nreplacement's --compute-language flag makes the language an explicit choice.",
|
|
148
152
|
"examples": [
|
|
149
153
|
"Scaffold a Node.js compute app named CreditRatingScorer:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer",
|
|
150
154
|
"Scaffold a Python compute app into a custom directory:\n<%= config.bin %> <%= command.id %> --name ReceiptOcr --language python --output-dir force-app/main/default/platformComputeApps/scorers"
|
|
@@ -205,6 +209,7 @@
|
|
|
205
209
|
"pluginAlias": "@heroku/plugin-compute",
|
|
206
210
|
"pluginName": "@heroku/plugin-compute",
|
|
207
211
|
"pluginType": "core",
|
|
212
|
+
"state": "deprecated",
|
|
208
213
|
"strict": true,
|
|
209
214
|
"summary": "Scaffold a new compute app into your Salesforce DX project.",
|
|
210
215
|
"enableJsonFlag": true,
|
|
@@ -370,6 +375,110 @@
|
|
|
370
375
|
"scale:compute"
|
|
371
376
|
]
|
|
372
377
|
},
|
|
378
|
+
"compute:create:telemetry-drain": {
|
|
379
|
+
"aliases": [],
|
|
380
|
+
"args": {},
|
|
381
|
+
"description": "Creates an OpenTelemetry drain that forwards the compute app's logs, metrics,\nand traces to the endpoint you give with --url. Choose which signals to\nforward with --signals and the wire protocol with --transport. Use\nsf compute update telemetry-drain to change a drain later.",
|
|
382
|
+
"examples": [
|
|
383
|
+
"Forward all signals from a compute app to an OTLP/HTTP collector:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4318 --target-org my-org",
|
|
384
|
+
"Forward only traces and logs over gRPC, with an auth header:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --url https://collector.example.com:4317 --transport grpc --signals traces,logs --header \"x-api-key=my-key\" --target-org my-org"
|
|
385
|
+
],
|
|
386
|
+
"flags": {
|
|
387
|
+
"json": {
|
|
388
|
+
"description": "Format output as json.",
|
|
389
|
+
"helpGroup": "GLOBAL",
|
|
390
|
+
"name": "json",
|
|
391
|
+
"allowNo": false,
|
|
392
|
+
"type": "boolean"
|
|
393
|
+
},
|
|
394
|
+
"flags-dir": {
|
|
395
|
+
"helpGroup": "GLOBAL",
|
|
396
|
+
"name": "flags-dir",
|
|
397
|
+
"summary": "Import flag values from a directory.",
|
|
398
|
+
"hasDynamicHelp": false,
|
|
399
|
+
"multiple": false,
|
|
400
|
+
"type": "option"
|
|
401
|
+
},
|
|
402
|
+
"name": {
|
|
403
|
+
"char": "n",
|
|
404
|
+
"env": "COMPUTE_APP_NAME",
|
|
405
|
+
"name": "name",
|
|
406
|
+
"summary": "DeveloperName of the compute app to add the drain to (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
407
|
+
"hasDynamicHelp": false,
|
|
408
|
+
"multiple": false,
|
|
409
|
+
"type": "option"
|
|
410
|
+
},
|
|
411
|
+
"url": {
|
|
412
|
+
"name": "url",
|
|
413
|
+
"required": true,
|
|
414
|
+
"summary": "Endpoint to forward telemetry to.",
|
|
415
|
+
"hasDynamicHelp": false,
|
|
416
|
+
"multiple": false,
|
|
417
|
+
"type": "option"
|
|
418
|
+
},
|
|
419
|
+
"signals": {
|
|
420
|
+
"name": "signals",
|
|
421
|
+
"summary": "Comma-separated signals to forward: traces, metrics, logs, or all.",
|
|
422
|
+
"default": "all",
|
|
423
|
+
"hasDynamicHelp": false,
|
|
424
|
+
"multiple": false,
|
|
425
|
+
"type": "option"
|
|
426
|
+
},
|
|
427
|
+
"transport": {
|
|
428
|
+
"name": "transport",
|
|
429
|
+
"summary": "Wire protocol to use: http (OTLP over HTTP) or grpc (OTLP over gRPC).",
|
|
430
|
+
"default": "http",
|
|
431
|
+
"hasDynamicHelp": false,
|
|
432
|
+
"multiple": false,
|
|
433
|
+
"type": "option"
|
|
434
|
+
},
|
|
435
|
+
"header": {
|
|
436
|
+
"description": "Repeat the flag to send more than one header. Header values often carry\ncredentials; they are sent to the endpoint and are never printed to the\nterminal, but are included in --json output.",
|
|
437
|
+
"name": "header",
|
|
438
|
+
"summary": "Header to send with each export, as key=value.",
|
|
439
|
+
"hasDynamicHelp": false,
|
|
440
|
+
"multiple": true,
|
|
441
|
+
"type": "option"
|
|
442
|
+
},
|
|
443
|
+
"target-org": {
|
|
444
|
+
"char": "o",
|
|
445
|
+
"name": "target-org",
|
|
446
|
+
"noCacheDefault": true,
|
|
447
|
+
"required": true,
|
|
448
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
449
|
+
"hasDynamicHelp": true,
|
|
450
|
+
"multiple": false,
|
|
451
|
+
"type": "option"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"hasDynamicHelp": true,
|
|
455
|
+
"hiddenAliases": [],
|
|
456
|
+
"id": "compute:create:telemetry-drain",
|
|
457
|
+
"pluginAlias": "@heroku/plugin-compute",
|
|
458
|
+
"pluginName": "@heroku/plugin-compute",
|
|
459
|
+
"pluginType": "core",
|
|
460
|
+
"strict": true,
|
|
461
|
+
"summary": "Add a telemetry drain to a compute app.",
|
|
462
|
+
"enableJsonFlag": true,
|
|
463
|
+
"requiresProject": false,
|
|
464
|
+
"isESM": true,
|
|
465
|
+
"relativePath": [
|
|
466
|
+
"lib",
|
|
467
|
+
"commands",
|
|
468
|
+
"compute",
|
|
469
|
+
"create",
|
|
470
|
+
"telemetry-drain.js"
|
|
471
|
+
],
|
|
472
|
+
"aliasPermutations": [],
|
|
473
|
+
"permutations": [
|
|
474
|
+
"compute:create:telemetry-drain",
|
|
475
|
+
"create:compute:telemetry-drain",
|
|
476
|
+
"create:telemetry-drain:compute",
|
|
477
|
+
"compute:telemetry-drain:create",
|
|
478
|
+
"telemetry-drain:compute:create",
|
|
479
|
+
"telemetry-drain:create:compute"
|
|
480
|
+
]
|
|
481
|
+
},
|
|
373
482
|
"compute:display:telemetry-drain": {
|
|
374
483
|
"aliases": [],
|
|
375
484
|
"args": {
|
|
@@ -668,6 +777,151 @@
|
|
|
668
777
|
"runtime-log:get:compute"
|
|
669
778
|
]
|
|
670
779
|
},
|
|
780
|
+
"compute:list:config": {
|
|
781
|
+
"aliases": [],
|
|
782
|
+
"args": {},
|
|
783
|
+
"deprecateAliases": true,
|
|
784
|
+
"description": "Shows every config var (environment variable) currently set for a deployed\ncompute app, sorted alphabetically. Goes through the target org's Salesforce\nConnect API, which calls Heroku on your behalf. Use sf compute get config to\nread a single var's value, sf compute set config to add or change vars, or\nsf compute unset config to remove them.",
|
|
785
|
+
"examples": [
|
|
786
|
+
"List all config vars for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
787
|
+
],
|
|
788
|
+
"flags": {
|
|
789
|
+
"json": {
|
|
790
|
+
"description": "Format output as json.",
|
|
791
|
+
"helpGroup": "GLOBAL",
|
|
792
|
+
"name": "json",
|
|
793
|
+
"allowNo": false,
|
|
794
|
+
"type": "boolean"
|
|
795
|
+
},
|
|
796
|
+
"flags-dir": {
|
|
797
|
+
"helpGroup": "GLOBAL",
|
|
798
|
+
"name": "flags-dir",
|
|
799
|
+
"summary": "Import flag values from a directory.",
|
|
800
|
+
"hasDynamicHelp": false,
|
|
801
|
+
"multiple": false,
|
|
802
|
+
"type": "option"
|
|
803
|
+
},
|
|
804
|
+
"name": {
|
|
805
|
+
"char": "n",
|
|
806
|
+
"env": "COMPUTE_APP_NAME",
|
|
807
|
+
"name": "name",
|
|
808
|
+
"summary": "DeveloperName of the compute app to list config vars for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
809
|
+
"hasDynamicHelp": false,
|
|
810
|
+
"multiple": false,
|
|
811
|
+
"type": "option"
|
|
812
|
+
},
|
|
813
|
+
"target-org": {
|
|
814
|
+
"char": "o",
|
|
815
|
+
"name": "target-org",
|
|
816
|
+
"noCacheDefault": true,
|
|
817
|
+
"required": true,
|
|
818
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
819
|
+
"hasDynamicHelp": true,
|
|
820
|
+
"multiple": false,
|
|
821
|
+
"type": "option"
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"hasDynamicHelp": true,
|
|
825
|
+
"hiddenAliases": [
|
|
826
|
+
"compute:config:list"
|
|
827
|
+
],
|
|
828
|
+
"id": "compute:list:config",
|
|
829
|
+
"pluginAlias": "@heroku/plugin-compute",
|
|
830
|
+
"pluginName": "@heroku/plugin-compute",
|
|
831
|
+
"pluginType": "core",
|
|
832
|
+
"strict": true,
|
|
833
|
+
"summary": "List a compute app's config vars.",
|
|
834
|
+
"enableJsonFlag": true,
|
|
835
|
+
"requiresProject": false,
|
|
836
|
+
"isESM": true,
|
|
837
|
+
"relativePath": [
|
|
838
|
+
"lib",
|
|
839
|
+
"commands",
|
|
840
|
+
"compute",
|
|
841
|
+
"list",
|
|
842
|
+
"config.js"
|
|
843
|
+
],
|
|
844
|
+
"aliasPermutations": [],
|
|
845
|
+
"permutations": [
|
|
846
|
+
"compute:list:config",
|
|
847
|
+
"list:compute:config",
|
|
848
|
+
"list:config:compute",
|
|
849
|
+
"compute:config:list",
|
|
850
|
+
"config:compute:list",
|
|
851
|
+
"config:list:compute"
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
"compute:list:telemetry-drain": {
|
|
855
|
+
"aliases": [],
|
|
856
|
+
"args": {},
|
|
857
|
+
"description": "Shows every OpenTelemetry drain forwarding the compute app's logs, metrics,\nand traces, with each drain's ID, signals, and endpoint. Use\nsf compute display telemetry-drain to see the full detail of a single drain.",
|
|
858
|
+
"examples": [
|
|
859
|
+
"List the telemetry drains for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
860
|
+
],
|
|
861
|
+
"flags": {
|
|
862
|
+
"json": {
|
|
863
|
+
"description": "Format output as json.",
|
|
864
|
+
"helpGroup": "GLOBAL",
|
|
865
|
+
"name": "json",
|
|
866
|
+
"allowNo": false,
|
|
867
|
+
"type": "boolean"
|
|
868
|
+
},
|
|
869
|
+
"flags-dir": {
|
|
870
|
+
"helpGroup": "GLOBAL",
|
|
871
|
+
"name": "flags-dir",
|
|
872
|
+
"summary": "Import flag values from a directory.",
|
|
873
|
+
"hasDynamicHelp": false,
|
|
874
|
+
"multiple": false,
|
|
875
|
+
"type": "option"
|
|
876
|
+
},
|
|
877
|
+
"name": {
|
|
878
|
+
"char": "n",
|
|
879
|
+
"env": "COMPUTE_APP_NAME",
|
|
880
|
+
"name": "name",
|
|
881
|
+
"summary": "DeveloperName of the compute app to list telemetry drains for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
882
|
+
"hasDynamicHelp": false,
|
|
883
|
+
"multiple": false,
|
|
884
|
+
"type": "option"
|
|
885
|
+
},
|
|
886
|
+
"target-org": {
|
|
887
|
+
"char": "o",
|
|
888
|
+
"name": "target-org",
|
|
889
|
+
"noCacheDefault": true,
|
|
890
|
+
"required": true,
|
|
891
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
892
|
+
"hasDynamicHelp": true,
|
|
893
|
+
"multiple": false,
|
|
894
|
+
"type": "option"
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"hasDynamicHelp": true,
|
|
898
|
+
"hiddenAliases": [],
|
|
899
|
+
"id": "compute:list:telemetry-drain",
|
|
900
|
+
"pluginAlias": "@heroku/plugin-compute",
|
|
901
|
+
"pluginName": "@heroku/plugin-compute",
|
|
902
|
+
"pluginType": "core",
|
|
903
|
+
"strict": true,
|
|
904
|
+
"summary": "List the telemetry drains configured for a compute app.",
|
|
905
|
+
"enableJsonFlag": true,
|
|
906
|
+
"requiresProject": false,
|
|
907
|
+
"isESM": true,
|
|
908
|
+
"relativePath": [
|
|
909
|
+
"lib",
|
|
910
|
+
"commands",
|
|
911
|
+
"compute",
|
|
912
|
+
"list",
|
|
913
|
+
"telemetry-drain.js"
|
|
914
|
+
],
|
|
915
|
+
"aliasPermutations": [],
|
|
916
|
+
"permutations": [
|
|
917
|
+
"compute:list:telemetry-drain",
|
|
918
|
+
"list:compute:telemetry-drain",
|
|
919
|
+
"list:telemetry-drain:compute",
|
|
920
|
+
"compute:telemetry-drain:list",
|
|
921
|
+
"telemetry-drain:compute:list",
|
|
922
|
+
"telemetry-drain:list:compute"
|
|
923
|
+
]
|
|
924
|
+
},
|
|
671
925
|
"compute:set:config": {
|
|
672
926
|
"aliases": [],
|
|
673
927
|
"args": {
|
|
@@ -982,13 +1236,18 @@
|
|
|
982
1236
|
"config:unset:compute"
|
|
983
1237
|
]
|
|
984
1238
|
},
|
|
985
|
-
"compute:
|
|
1239
|
+
"compute:update:telemetry-drain": {
|
|
986
1240
|
"aliases": [],
|
|
987
|
-
"args": {
|
|
988
|
-
|
|
989
|
-
|
|
1241
|
+
"args": {
|
|
1242
|
+
"id": {
|
|
1243
|
+
"name": "id",
|
|
1244
|
+
"required": true
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
"description": "Updates only the attributes you pass and leaves the rest of the drain as it\nis. Passing --header adds or overwrites the headers you give and keeps the\ndrain's other headers. Use sf compute list telemetry-drain to find a drain's ID.",
|
|
990
1248
|
"examples": [
|
|
991
|
-
"
|
|
1249
|
+
"Point a drain at a new endpoint:\n<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --url https://collector.example.com:4318 --target-org my-org",
|
|
1250
|
+
"Forward only logs over gRPC:\n<%= config.bin %> <%= command.id %> 01234567-89ab-cdef-0123-456789abcdef --signals logs --transport grpc --target-org my-org"
|
|
992
1251
|
],
|
|
993
1252
|
"flags": {
|
|
994
1253
|
"json": {
|
|
@@ -1006,86 +1265,33 @@
|
|
|
1006
1265
|
"multiple": false,
|
|
1007
1266
|
"type": "option"
|
|
1008
1267
|
},
|
|
1009
|
-
"
|
|
1010
|
-
"
|
|
1011
|
-
"
|
|
1012
|
-
"name": "name",
|
|
1013
|
-
"summary": "DeveloperName of the compute app to list config vars for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
1268
|
+
"url": {
|
|
1269
|
+
"name": "url",
|
|
1270
|
+
"summary": "New endpoint to forward telemetry to.",
|
|
1014
1271
|
"hasDynamicHelp": false,
|
|
1015
1272
|
"multiple": false,
|
|
1016
1273
|
"type": "option"
|
|
1017
1274
|
},
|
|
1018
|
-
"
|
|
1019
|
-
"
|
|
1020
|
-
"
|
|
1021
|
-
"
|
|
1022
|
-
"required": true,
|
|
1023
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1024
|
-
"hasDynamicHelp": true,
|
|
1275
|
+
"signals": {
|
|
1276
|
+
"name": "signals",
|
|
1277
|
+
"summary": "New comma-separated signals to forward: traces, metrics, logs, or all.",
|
|
1278
|
+
"hasDynamicHelp": false,
|
|
1025
1279
|
"multiple": false,
|
|
1026
1280
|
"type": "option"
|
|
1027
|
-
}
|
|
1028
|
-
},
|
|
1029
|
-
"hasDynamicHelp": true,
|
|
1030
|
-
"hiddenAliases": [
|
|
1031
|
-
"compute:config:list"
|
|
1032
|
-
],
|
|
1033
|
-
"id": "compute:list:config",
|
|
1034
|
-
"pluginAlias": "@heroku/plugin-compute",
|
|
1035
|
-
"pluginName": "@heroku/plugin-compute",
|
|
1036
|
-
"pluginType": "core",
|
|
1037
|
-
"strict": true,
|
|
1038
|
-
"summary": "List a compute app's config vars.",
|
|
1039
|
-
"enableJsonFlag": true,
|
|
1040
|
-
"requiresProject": false,
|
|
1041
|
-
"isESM": true,
|
|
1042
|
-
"relativePath": [
|
|
1043
|
-
"lib",
|
|
1044
|
-
"commands",
|
|
1045
|
-
"compute",
|
|
1046
|
-
"list",
|
|
1047
|
-
"config.js"
|
|
1048
|
-
],
|
|
1049
|
-
"aliasPermutations": [],
|
|
1050
|
-
"permutations": [
|
|
1051
|
-
"compute:list:config",
|
|
1052
|
-
"list:compute:config",
|
|
1053
|
-
"list:config:compute",
|
|
1054
|
-
"compute:config:list",
|
|
1055
|
-
"config:compute:list",
|
|
1056
|
-
"config:list:compute"
|
|
1057
|
-
]
|
|
1058
|
-
},
|
|
1059
|
-
"compute:list:telemetry-drain": {
|
|
1060
|
-
"aliases": [],
|
|
1061
|
-
"args": {},
|
|
1062
|
-
"description": "Shows every OpenTelemetry drain forwarding the compute app's logs, metrics,\nand traces, with each drain's ID, signals, and endpoint. Use\nsf compute display telemetry-drain to see the full detail of a single drain.",
|
|
1063
|
-
"examples": [
|
|
1064
|
-
"List the telemetry drains for a compute app:\n<%= config.bin %> <%= command.id %> --name CreditRatingScorer --target-org my-org"
|
|
1065
|
-
],
|
|
1066
|
-
"flags": {
|
|
1067
|
-
"json": {
|
|
1068
|
-
"description": "Format output as json.",
|
|
1069
|
-
"helpGroup": "GLOBAL",
|
|
1070
|
-
"name": "json",
|
|
1071
|
-
"allowNo": false,
|
|
1072
|
-
"type": "boolean"
|
|
1073
1281
|
},
|
|
1074
|
-
"
|
|
1075
|
-
"
|
|
1076
|
-
"
|
|
1077
|
-
"summary": "Import flag values from a directory.",
|
|
1282
|
+
"transport": {
|
|
1283
|
+
"name": "transport",
|
|
1284
|
+
"summary": "New wire protocol: http (OTLP over HTTP) or grpc (OTLP over gRPC).",
|
|
1078
1285
|
"hasDynamicHelp": false,
|
|
1079
1286
|
"multiple": false,
|
|
1080
1287
|
"type": "option"
|
|
1081
1288
|
},
|
|
1082
|
-
"
|
|
1083
|
-
"
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"summary": "DeveloperName of the compute app to list telemetry drains for (or\n<namespace>\\_\\_<developerName> if it was deployed under a namespace).\nDefaults to the COMPUTE_APP_NAME environment variable, or the current\ndirectory's app name if that isn't set either.",
|
|
1289
|
+
"header": {
|
|
1290
|
+
"description": "Repeat the flag to send more than one header. A header you pass adds\nor overwrites the one with the same name; the drain's other headers are kept. Header values often carry credentials; they are\nnever printed to the terminal, but are included in --json output.",
|
|
1291
|
+
"name": "header",
|
|
1292
|
+
"summary": "Header to send with each export, as key=value.",
|
|
1087
1293
|
"hasDynamicHelp": false,
|
|
1088
|
-
"multiple":
|
|
1294
|
+
"multiple": true,
|
|
1089
1295
|
"type": "option"
|
|
1090
1296
|
},
|
|
1091
1297
|
"target-org": {
|
|
@@ -1101,12 +1307,12 @@
|
|
|
1101
1307
|
},
|
|
1102
1308
|
"hasDynamicHelp": true,
|
|
1103
1309
|
"hiddenAliases": [],
|
|
1104
|
-
"id": "compute:
|
|
1310
|
+
"id": "compute:update:telemetry-drain",
|
|
1105
1311
|
"pluginAlias": "@heroku/plugin-compute",
|
|
1106
1312
|
"pluginName": "@heroku/plugin-compute",
|
|
1107
1313
|
"pluginType": "core",
|
|
1108
1314
|
"strict": true,
|
|
1109
|
-
"summary": "
|
|
1315
|
+
"summary": "Change the configuration of a compute telemetry drain.",
|
|
1110
1316
|
"enableJsonFlag": true,
|
|
1111
1317
|
"requiresProject": false,
|
|
1112
1318
|
"isESM": true,
|
|
@@ -1114,19 +1320,19 @@
|
|
|
1114
1320
|
"lib",
|
|
1115
1321
|
"commands",
|
|
1116
1322
|
"compute",
|
|
1117
|
-
"
|
|
1323
|
+
"update",
|
|
1118
1324
|
"telemetry-drain.js"
|
|
1119
1325
|
],
|
|
1120
1326
|
"aliasPermutations": [],
|
|
1121
1327
|
"permutations": [
|
|
1122
|
-
"compute:
|
|
1123
|
-
"
|
|
1124
|
-
"
|
|
1125
|
-
"compute:telemetry-drain:
|
|
1126
|
-
"telemetry-drain:compute:
|
|
1127
|
-
"telemetry-drain:
|
|
1328
|
+
"compute:update:telemetry-drain",
|
|
1329
|
+
"update:compute:telemetry-drain",
|
|
1330
|
+
"update:telemetry-drain:compute",
|
|
1331
|
+
"compute:telemetry-drain:update",
|
|
1332
|
+
"telemetry-drain:compute:update",
|
|
1333
|
+
"telemetry-drain:update:compute"
|
|
1128
1334
|
]
|
|
1129
1335
|
}
|
|
1130
1336
|
},
|
|
1131
|
-
"version": "0.3.
|
|
1337
|
+
"version": "0.3.1"
|
|
1132
1338
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/ComputeTelemetryDrainCreateResult",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"ComputeTelemetryDrainCreateResult": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"app": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"endpoint": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"exporterType": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"headers": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"id": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"signals": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"transport": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"app",
|
|
39
|
+
"id",
|
|
40
|
+
"signals"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/ComputeTelemetryDrainUpdateResult",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"ComputeTelemetryDrainUpdateResult": {
|
|
6
|
+
"$ref": "#/definitions/TelemetryDrainResult"
|
|
7
|
+
},
|
|
8
|
+
"TelemetryDrainResult": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"endpoint": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"exporterType": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"headers": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"id": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"signals": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"transport": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"id",
|
|
38
|
+
"signals"
|
|
39
|
+
],
|
|
40
|
+
"additionalProperties": false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|