heroku 10.13.3-beta.0 → 10.14.1-beta.0
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.
|
@@ -9,6 +9,13 @@ class Add extends command_1.Command {
|
|
|
9
9
|
const { flags, args } = await this.parse(Add);
|
|
10
10
|
const { app, headers, space, signals, transport } = flags;
|
|
11
11
|
const { endpoint } = args;
|
|
12
|
+
// Allow splunk, but do not show splunk in error message until splunk transport is accepted as a feature
|
|
13
|
+
// When splunk transport is accepted as a feature, and options are added for the transport flag, this section should be removed
|
|
14
|
+
const publicTransports = ['http', 'grpc'];
|
|
15
|
+
const validTransports = [...publicTransports, 'splunk'];
|
|
16
|
+
if (!validTransports.includes(transport)) {
|
|
17
|
+
throw new Error(`Expected --transport=${transport} to be one of: ${publicTransports.join(', ')}`);
|
|
18
|
+
}
|
|
12
19
|
let id;
|
|
13
20
|
if (app) {
|
|
14
21
|
const { body: herokuApp } = await this.heroku.get(`/apps/${app}`, {
|
|
@@ -29,7 +36,7 @@ class Add extends command_1.Command {
|
|
|
29
36
|
signals: (0, util_1.validateAndFormatSignals)(signals),
|
|
30
37
|
exporter: {
|
|
31
38
|
endpoint,
|
|
32
|
-
type: (transport
|
|
39
|
+
type: this.getExporterType(transport),
|
|
33
40
|
headers: JSON.parse(exporterHeaders),
|
|
34
41
|
},
|
|
35
42
|
};
|
|
@@ -41,6 +48,16 @@ class Add extends command_1.Command {
|
|
|
41
48
|
});
|
|
42
49
|
core_1.ux.log(`successfully added drain ${drain.exporter.endpoint}`);
|
|
43
50
|
}
|
|
51
|
+
getExporterType(transport) {
|
|
52
|
+
switch (transport) {
|
|
53
|
+
case 'grpc':
|
|
54
|
+
return 'otlp';
|
|
55
|
+
case 'splunk':
|
|
56
|
+
return 'splunk';
|
|
57
|
+
default:
|
|
58
|
+
return 'otlphttp';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
44
61
|
}
|
|
45
62
|
exports.default = Add;
|
|
46
63
|
Add.description = 'Add and configure a new telemetry drain. Defaults to collecting all telemetry unless otherwise specified.';
|
|
@@ -49,7 +66,8 @@ Add.flags = {
|
|
|
49
66
|
headers: command_1.flags.string({ description: 'custom headers to configure the drain in json format' }),
|
|
50
67
|
space: command_1.flags.string({ char: 's', description: 'space to add a drain to' }),
|
|
51
68
|
signals: command_1.flags.string({ default: 'all', description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.' }),
|
|
52
|
-
transport
|
|
69
|
+
// If splunk transport is accepted as a feature, this should have options: ['http', 'grpc', 'splunk']
|
|
70
|
+
transport: command_1.flags.string({ default: 'http', description: 'transport protocol for the drain' }),
|
|
53
71
|
};
|
|
54
72
|
Add.args = {
|
|
55
73
|
endpoint: core_1.Args.string({ required: true, description: 'drain url' }),
|
package/oclif.manifest.json
CHANGED
|
@@ -10232,10 +10232,6 @@
|
|
|
10232
10232
|
"default": "http",
|
|
10233
10233
|
"hasDynamicHelp": false,
|
|
10234
10234
|
"multiple": false,
|
|
10235
|
-
"options": [
|
|
10236
|
-
"http",
|
|
10237
|
-
"grpc"
|
|
10238
|
-
],
|
|
10239
10235
|
"type": "option"
|
|
10240
10236
|
}
|
|
10241
10237
|
},
|
|
@@ -15019,5 +15015,5 @@
|
|
|
15019
15015
|
]
|
|
15020
15016
|
}
|
|
15021
15017
|
},
|
|
15022
|
-
"version": "10.
|
|
15018
|
+
"version": "10.14.1-beta.0"
|
|
15023
15019
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heroku",
|
|
3
3
|
"description": "CLI to interact with Heroku",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.14.1-beta.0",
|
|
5
5
|
"author": "Heroku",
|
|
6
6
|
"bin": "./bin/run",
|
|
7
7
|
"bugs": "https://github.com/heroku/cli/issues",
|
|
@@ -398,5 +398,5 @@
|
|
|
398
398
|
"version": "oclif readme --multi && git add README.md ../../docs"
|
|
399
399
|
},
|
|
400
400
|
"types": "lib/index.d.ts",
|
|
401
|
-
"gitHead": "
|
|
401
|
+
"gitHead": "a3102b313c0bbe7e9f3013b3bfebd78e471f77f3"
|
|
402
402
|
}
|