Skip to content

Commit 4465b86

Browse files
committed
linting fix
1 parent 37e3d77 commit 4465b86

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/src/aws-opentelemetry-configurator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ import { AttributePropagatingSpanProcessorBuilder } from './attribute-propagatin
5656
import { AwsBatchUnsampledSpanProcessor } from './aws-batch-unsampled-span-processor';
5757
import { AwsMetricAttributesSpanExporterBuilder } from './aws-metric-attributes-span-exporter-builder';
5858
import { AwsSpanMetricsProcessorBuilder } from './aws-span-metrics-processor-builder';
59-
import { OTLPUdpSpanExporter } from './otlp-udp-exporter';
6059
import { OTLPAwsSpanExporter } from './otlp-aws-span-exporter';
60+
import { OTLPUdpSpanExporter } from './otlp-udp-exporter';
6161
import { AwsXRayRemoteSampler } from './sampler/aws-xray-remote-sampler';
6262
// This file is generated via `npm run compile`
6363
import { LIB_VERSION } from './version';

aws-distro-opentelemetry-node-autoinstrumentation/test/otlp-aws-span-exporter.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import expect from 'expect';
44
import { OTLPAwsSpanExporter } from '../src/otlp-aws-span-exporter';
55
import * as sinon from 'sinon';
66
import * as proxyquire from 'proxyquire';
7-
import nock = require('nock');
7+
import * as nock from 'nock';
88
import { getNodeVersion } from '../src/utils';
99

1010
const XRAY_OTLP_ENDPOINT = 'https://xray.us-east-1.amazonaws.com';
11+
const XRAY_OTLP_ENDPOINT_PATH = '/v1/traces';
1112
const AUTHORIZATION_HEADER = 'Authorization';
1213
const X_AMZ_DATE_HEADER = 'X-Amz-Date';
1314
const X_AMZ_SECURITY_TOKEN_HEADER = 'X-Amz-Security-Token';
@@ -18,7 +19,7 @@ const EXPECTED_AUTH_SECURITY_TOKEN = 'test_token';
1819

1920
const nodeVersion = getNodeVersion();
2021

21-
/* istanbul ignore if */
22+
/* istanbul ignore else */
2223
if (nodeVersion < 16) {
2324
it.skip(`Skipping tests - Node.js version ${nodeVersion} is below required version 16`, () => {});
2425
} else {
@@ -31,7 +32,7 @@ if (nodeVersion < 16) {
3132
sandbox = sinon.createSandbox();
3233

3334
scope = nock(XRAY_OTLP_ENDPOINT)
34-
.post('/v1/traces')
35+
.post(XRAY_OTLP_ENDPOINT_PATH)
3536
.reply((uri: any, requestBody: any) => {
3637
return [200, ''];
3738
});
@@ -67,7 +68,7 @@ if (nodeVersion < 16) {
6768
});
6869

6970
it('Should inject SigV4 Headers successfully', async () => {
70-
const exporter = new mockModule.OTLPAwsSpanExporter(XRAY_OTLP_ENDPOINT + '/v1/traces');
71+
const exporter = new mockModule.OTLPAwsSpanExporter(XRAY_OTLP_ENDPOINT + XRAY_OTLP_ENDPOINT_PATH);
7172

7273
scope.on('request', (req, interceptor, body) => {
7374
const headers = req.headers;
@@ -96,7 +97,7 @@ if (nodeVersion < 16) {
9697

9798
dependencies.forEach(dependency => {
9899
it(`should not sign headers if missing dependency: ${dependency}`, async () => {
99-
const exporter = new OTLPAwsSpanExporter(XRAY_OTLP_ENDPOINT + '/v1/traces');
100+
const exporter = new OTLPAwsSpanExporter(XRAY_OTLP_ENDPOINT + XRAY_OTLP_ENDPOINT_PATH);
100101

101102
scope.on('request', (req, interceptor, body) => {
102103
const headers = req.headers;

0 commit comments

Comments
 (0)