Skip to content

Commit

Permalink
modify per code review feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
blueww committed Dec 10, 2024
1 parent 74afb5f commit 3861419
Show file tree
Hide file tree
Showing 13 changed files with 146 additions and 123 deletions.
2 changes: 1 addition & 1 deletion src/blob/generated/middleware/end.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function endMiddleware(
)}`,
context.contextId
);
AzuriteTelemetryClient.TraceBlobRequest(context);
AzuriteTelemetryClient.TraceRequest(context);

res.getBodyStream().end();
}
2 changes: 2 additions & 0 deletions src/blob/generated/middleware/error.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AzuriteTelemetryClient } from '../../../common/Telemetry';
import Context from '../Context';
import MiddlewareError from '../errors/MiddlewareError';
import IRequest from '../IRequest';
Expand Down Expand Up @@ -129,6 +130,7 @@ export default function errorMiddleware(
context.contextId
);
}
AzuriteTelemetryClient.TraceRequest(context);

next();
}
251 changes: 134 additions & 117 deletions src/common/Telemetry.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/queue/generated/middleware/end.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function endMiddleware(
)}`,
context.contextID
);
AzuriteTelemetryClient.TraceQueueRequest(context);
AzuriteTelemetryClient.TraceRequest(context);

res.getBodyStream().end();
}
2 changes: 2 additions & 0 deletions src/queue/generated/middleware/error.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AzuriteTelemetryClient } from "../../../common/Telemetry";
import Context from "../Context";
import MiddlewareError from "../errors/MiddlewareError";
import IRequest from "../IRequest";
Expand Down Expand Up @@ -129,6 +130,7 @@ export default function errorMiddleware(
context.contextID
);
}
AzuriteTelemetryClient.TraceRequest(context) ;

next();
}
2 changes: 1 addition & 1 deletion src/table/generated/middleware/end.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function endMiddleware(
)}`,
context.contextID
);
AzuriteTelemetryClient.TraceTableRequest(context) ;
AzuriteTelemetryClient.TraceRequest(context) ;

res.getBodyStream().end();
}
2 changes: 2 additions & 0 deletions src/table/generated/middleware/error.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AzuriteTelemetryClient } from "../../../common/Telemetry";
import Context from "../Context";
import MiddlewareError from "../errors/MiddlewareError";
import IRequest from "../IRequest";
Expand Down Expand Up @@ -126,6 +127,7 @@ export default function errorMiddleware(
context.contextID
);
}
AzuriteTelemetryClient.TraceRequest(context) ;

next();
}
1 change: 0 additions & 1 deletion tests/BlobTestServerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export default class BlobTestServerFactory {
undefined,
inMemoryPersistence
);
AzuriteTelemetryClient.init("", true, undefined);
return new BlobServer(config);
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/blob/blobCorsRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe("Blob Cors requests test", () => {

before(async () => {
await server.start();
AzuriteTelemetryClient.init("", true, undefined);
await AzuriteTelemetryClient.TraceStartEvent("Blob Test");
});

Expand Down
1 change: 1 addition & 0 deletions tests/queue/oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe("Queue OAuth Basic", () => {
oauth: "basic"
})
await server.start();
AzuriteTelemetryClient.init("", true, undefined);
await AzuriteTelemetryClient.TraceStartEvent("Queue Test");
});

Expand Down
1 change: 0 additions & 1 deletion tests/queue/utils/QueueTestServerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default class QueueTestServerFactory {
undefined,
inMemoryPersistence
);
AzuriteTelemetryClient.init("", true, undefined);
return new QueueServer(config);
}
}
1 change: 1 addition & 0 deletions tests/table/apis/table.entity.azure.data-tables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe("table Entity APIs test - using Azure/data-tables", () => {
before(async () => {
server = createTableServerForTestHttps();
await server.start();
AzuriteTelemetryClient.init("", true, undefined);
await AzuriteTelemetryClient.TraceStartEvent("Table Test");
});

Expand Down
1 change: 0 additions & 1 deletion tests/table/utils/TableTestServerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default class TableTestServerFactory {
undefined,
inMemoryPersistence
);
AzuriteTelemetryClient.init("", true, undefined);
return new TableServer(config);
}
}

0 comments on commit 3861419

Please sign in to comment.