Skip to content

Commit 9b1b5e3

Browse files
authored
Merge pull request #4 from Dharin-shah/add-appium-info
add appium info
2 parents 9ba90b2 + 5512e75 commit 9b1b5e3

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

packages/opentelemetry/lib/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class OpentelemetryPlugin extends BasePlugin {
2727
static handleSetOpentelemetryConfig (req, res) {
2828
const opentelemetryBlob = req.body;
2929
const exporterConfig = opentelemetryBlob.exporter;
30-
if (!exporterConfig) {
30+
if (typeof exporterConfig == 'undefined' || exporterConfig == null) {
3131
const response = JSON.stringify({
3232
status: STATUS_MESSAGE.FAILURE, message: STATUS_MESSAGE.INVALID_EXPORTER_ERROR
3333
});

packages/opentelemetry/lib/tracing/exporterFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ConsoleSpanExporter, SpanExporter } from '@opentelemetry/tracing'; // e
66
const DEFAULT_SERVICE_NAME = 'appium';
77

88
const AVAILABLE_EXPORTERS = {
9-
JAGGER: 'jagger',
9+
JAEGER: 'jaeger',
1010
ZIPKIN: 'zipkin',
1111
PROMETHEUS: 'prometheus',
1212
CONSOLE: 'console'
@@ -21,7 +21,7 @@ const AVAILABLE_EXPORTERS = {
2121
*/
2222
function buildExporter (exporterType, config = null) {
2323
switch (exporterType) {
24-
case AVAILABLE_EXPORTERS.JAGGER:
24+
case AVAILABLE_EXPORTERS.JAEGER:
2525
return new JaegerExporter(config || { serviceName: DEFAULT_SERVICE_NAME });
2626
case AVAILABLE_EXPORTERS.ZIPKIN:
2727
return new ZipkinExporter(config || { serviceName: DEFAULT_SERVICE_NAME });

packages/opentelemetry/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"scripts": {
66
"test:unit": "mocha ./build/test/unit/*-specs.js"
77
},
8+
"tags": [
9+
"appium"
10+
],
11+
"appium": {
12+
"pluginName": "opentelemetry",
13+
"mainClass": "OpentelemetryPlugin"
14+
},
815
"main": "./build/index.js",
916
"directories": {
1017
"lib": "./lib"

packages/opentelemetry/test/unit/exporter-specs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ describe('ExporterFactory', function () {
2121
exporterObject.should.be.instanceOf(ConsoleSpanExporter);
2222
await exporterObject.shutdown();
2323
});
24-
it(`should return exporter object for ${AVAILABLE_EXPORTERS.JAGGER} exporter`, async function () {
25-
const exporterObject = buildExporter('jagger');
24+
it(`should return exporter object for ${AVAILABLE_EXPORTERS.JAEGER} exporter`, async function () {
25+
const exporterObject = buildExporter('jaeger');
2626
exporterObject.should.be.instanceOf(JaegerExporter);
2727
await exporterObject.shutdown();
2828
});

0 commit comments

Comments
 (0)