Skip to content

Commit a8b8f7c

Browse files
authored
Update prettier dev-dependency to v2.5.1 in Monitor (Azure#19562)
* Upgrade prettier dev dependency to v2.5.1 * Format files
1 parent 7398626 commit a8b8f7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+384
-390
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/monitor/monitor-opentelemetry-exporter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"mocha": "^7.1.1",
9999
"nock": "^12.0.3",
100100
"nyc": "^15.0.0",
101-
"prettier": "^1.16.4",
101+
"prettier": "^2.5.1",
102102
"rimraf": "^3.0.0",
103103
"rollup": "^1.16.3",
104104
"sinon": "^9.0.2",

sdk/monitor/monitor-opentelemetry-exporter/samples-dev/basicTracerNode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ dotenv.config();
2121

2222
const provider = new BasicTracerProvider({
2323
resource: new Resource({
24-
[SemanticResourceAttributes.SERVICE_NAME]: "basic-service"
25-
})
24+
[SemanticResourceAttributes.SERVICE_NAME]: "basic-service",
25+
}),
2626
});
2727

2828
// Configure span processor to send spans to the exporter
2929
const exporter = new AzureMonitorTraceExporter({
3030
connectionString:
31-
process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>"
31+
process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>",
3232
});
3333
provider.addSpanProcessor(new SimpleSpanProcessor(exporter as any));
3434

sdk/monitor/monitor-opentelemetry-exporter/samples-dev/httpSample.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function handleRequest(request: any, response: any) {
6262
}
6363
const span = serverTracer.startSpan("handleRequest", {
6464
kind: 1, // server
65-
attributes: { key: "value" }
65+
attributes: { key: "value" },
6666
});
6767
// Annotate our span to capture metadata about the operation
6868
span.addEvent("invoking handleRequest");
@@ -96,7 +96,7 @@ function makeRequest() {
9696
http.get(
9797
{
9898
host: "localhost",
99-
port: 8080
99+
port: 8080,
100100
},
101101
(response) => {
102102
const body: any = [];
@@ -115,7 +115,7 @@ function setupOpenTelemetry() {
115115
const provider = new NodeTracerProvider();
116116
const exporter = new AzureMonitorTraceExporter({
117117
connectionString:
118-
process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>"
118+
process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>",
119119
});
120120

121121
provider.addSpanProcessor(new SimpleSpanProcessor(exporter as any));
@@ -125,7 +125,7 @@ function setupOpenTelemetry() {
125125

126126
registerInstrumentations({
127127
// // when boostraping with lerna for testing purposes
128-
instrumentations: [new HttpInstrumentation()]
128+
instrumentations: [new HttpInstrumentation()],
129129
});
130130
serverTracer = provider.getTracer("serverTracer");
131131
clientTracer = provider.getTracer("clientTracer");

sdk/monitor/monitor-opentelemetry-exporter/src/Declarations/Constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export enum ServiceApiVersion {
88
/**
99
* V2 Version
1010
*/
11-
V2 = "2020-09-15_Preview"
11+
V2 = "2020-09-15_Preview",
1212
}
1313

1414
/**
@@ -64,7 +64,7 @@ export enum QuickPulseCounter {
6464
DEPENDENCY_DURATION = "\\ApplicationInsights\\Dependency Call Duration",
6565

6666
// Exception
67-
EXCEPTION_RATE = "\\ApplicationInsights\\Exceptions/Sec"
67+
EXCEPTION_RATE = "\\ApplicationInsights\\Exceptions/Sec",
6868
}
6969

7070
/**
@@ -82,7 +82,7 @@ export enum PerformanceCounter {
8282

8383
// Requests
8484
REQUEST_RATE = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",
85-
REQUEST_DURATION = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"
85+
REQUEST_DURATION = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time",
8686
}
8787

8888
/**
@@ -100,7 +100,7 @@ export const PerformanceToQuickPulseCounter: { [key: string]: QuickPulseCounter
100100
[QuickPulseCounter.DEPENDENCY_RATE]: QuickPulseCounter.DEPENDENCY_RATE,
101101
[QuickPulseCounter.DEPENDENCY_FAILURE_RATE]: QuickPulseCounter.DEPENDENCY_FAILURE_RATE,
102102
[QuickPulseCounter.DEPENDENCY_DURATION]: QuickPulseCounter.DEPENDENCY_DURATION,
103-
[QuickPulseCounter.EXCEPTION_RATE]: QuickPulseCounter.EXCEPTION_RATE
103+
[QuickPulseCounter.EXCEPTION_RATE]: QuickPulseCounter.EXCEPTION_RATE,
104104
};
105105

106106
/**

sdk/monitor/monitor-opentelemetry-exporter/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import {
55
DEFAULT_BREEZE_API_VERSION,
66
DEFAULT_BREEZE_ENDPOINT,
7-
ServiceApiVersion
7+
ServiceApiVersion,
88
} from "./Declarations/Constants";
99

1010
const DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS = 60_000;
@@ -46,5 +46,5 @@ export const DEFAULT_EXPORTER_CONFIG: AzureExporterInternalConfig = {
4646
endpointUrl: DEFAULT_BREEZE_ENDPOINT,
4747
batchSendRetryIntervalMs: DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS,
4848
maxConsecutiveFailuresBeforeWarning: DEFAULT_MAX_CONSECUTIVE_FAILURES_BEFORE_WARNING,
49-
apiVersion: DEFAULT_BREEZE_API_VERSION
49+
apiVersion: DEFAULT_BREEZE_API_VERSION,
5050
};

sdk/monitor/monitor-opentelemetry-exporter/src/export/trace.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { HttpSender, FileSystemPersist } from "../platform";
1010
import {
1111
DEFAULT_EXPORTER_CONFIG,
1212
AzureExporterConfig,
13-
AzureExporterInternalConfig
13+
AzureExporterInternalConfig,
1414
} from "../config";
1515
import { PersistentStorage, Sender } from "../types";
1616
import { isRetriable, BreezeResponse } from "../utils/breezeUtils";
@@ -36,7 +36,7 @@ export class AzureMonitorTraceExporter implements SpanExporter {
3636
this._numConsecutiveRedirects = 0;
3737
const connectionString = options.connectionString || process.env[ENV_CONNECTION_STRING];
3838
this._options = {
39-
...DEFAULT_EXPORTER_CONFIG
39+
...DEFAULT_EXPORTER_CONFIG,
4040
};
4141
this._options.apiVersion = options.apiVersion ?? this._options.apiVersion;
4242

@@ -68,7 +68,7 @@ export class AzureMonitorTraceExporter implements SpanExporter {
6868
? { code: ExportResultCode.SUCCESS }
6969
: {
7070
code: ExportResultCode.FAILED,
71-
error: new Error("Failed to persist envelope in disk.")
71+
error: new Error("Failed to persist envelope in disk."),
7272
};
7373
} catch (ex) {
7474
return { code: ExportResultCode.FAILED, error: ex };
@@ -108,7 +108,7 @@ export class AzureMonitorTraceExporter implements SpanExporter {
108108
}
109109
// Failed -- not retriable
110110
return {
111-
code: ExportResultCode.FAILED
111+
code: ExportResultCode.FAILED,
112112
};
113113
} else {
114114
// calls resultCallback(ExportResult) based on result of persister.push
@@ -117,7 +117,7 @@ export class AzureMonitorTraceExporter implements SpanExporter {
117117
} else {
118118
// Failed -- not retriable
119119
return {
120-
code: ExportResultCode.FAILED
120+
code: ExportResultCode.FAILED,
121121
};
122122
}
123123
} catch (error) {

sdk/monitor/monitor-opentelemetry-exporter/src/platform/nodejs/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
export const SDK_INFO = {
99
NAME: "opentelemetry",
1010
RUNTIME: "node",
11-
LANGUAGE: "nodejs"
11+
LANGUAGE: "nodejs",
1212
};

sdk/monitor/monitor-opentelemetry-exporter/src/platform/nodejs/httpSender.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
TelemetryItem as Envelope,
1010
ApplicationInsightsClient,
1111
ApplicationInsightsClientOptionalParams,
12-
ApplicationInsightsClientTrackOptionalParams
12+
ApplicationInsightsClientTrackOptionalParams,
1313
} from "../../generated";
1414
import { AzureExporterInternalConfig } from "../../config";
1515

@@ -24,11 +24,11 @@ export class HttpSender implements Sender {
2424
constructor(private _exporterOptions: AzureExporterInternalConfig) {
2525
// Build endpoint using provided configuration or default values
2626
this._appInsightsClientOptions = {
27-
host: this._exporterOptions.endpointUrl
27+
host: this._exporterOptions.endpointUrl,
2828
};
2929

3030
this._appInsightsClient = new ApplicationInsightsClient({
31-
...this._appInsightsClientOptions
31+
...this._appInsightsClientOptions,
3232
});
3333

3434
this._appInsightsClient.pipeline.removePolicy({ name: redirectPolicyName });
@@ -50,7 +50,7 @@ export class HttpSender implements Sender {
5050
}
5151
await this._appInsightsClient.track(envelopes, {
5252
...options,
53-
onResponse
53+
onResponse,
5454
});
5555

5656
return { statusCode: response?.status, result: response?.bodyAsText ?? "" };

sdk/monitor/monitor-opentelemetry-exporter/src/utils/constants/applicationinsights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ export enum DependencyTypes {
2727
QueueMessage = "Queue Message",
2828
Sql = "SQL",
2929
Http = "Http",
30-
Grpc = "GRPC"
30+
Grpc = "GRPC",
3131
}

0 commit comments

Comments
 (0)