Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2.0 Release #1345

Merged
merged 8 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
847 changes: 429 additions & 418 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Microsoft Application Insights Team",
"license": "MIT",
"bugs": "https://github.com/microsoft/ApplicationInsights-node.js/issues",
"version": "3.1.0",
"version": "3.2.0",
"description": "Microsoft Application Insights module for Node.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -68,18 +68,18 @@
"@azure/core-client": "^1.0.0",
"@azure/core-rest-pipeline": "^1.9.2",
"@azure/identity": "^4.2.1",
"@azure/monitor-opentelemetry": "^1.5.0",
"@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.23",
"@azure/monitor-opentelemetry": "^1.6.0",
"@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.24",
"@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/api-logs": "^0.51.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api-logs": "^0.52.0",
"@opentelemetry/core": "^1.24.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.51.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.51.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
"@opentelemetry/otlp-exporter-base": "^0.51.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.52.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.52.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/otlp-exporter-base": "^0.52.0",
"@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-logs": "^0.51.0",
"@opentelemetry/sdk-logs": "^0.52.0",
"@opentelemetry/sdk-metrics": "^1.24.0",
"@opentelemetry/sdk-trace-base": "^1.24.0",
"@opentelemetry/sdk-trace-node": "^1.24.0",
Expand Down
3 changes: 2 additions & 1 deletion src/shim/shim-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ class Config implements IConfig {
...options.instrumentationOptions,
console: { enabled: false },
};
const samplingRatio = this.samplingPercentage / 100;
// If samplingPercentage is not defined, default to 100%
const samplingRatio = this.samplingPercentage !== undefined ? this.samplingPercentage / 100 : 1;
if (samplingRatio >= 0 && samplingRatio <= 1) {
options.samplingRatio = samplingRatio;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { InstrumentationConfig } from "@opentelemetry/instrumentation";
import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base";


export const APPLICATION_INSIGHTS_OPENTELEMETRY_VERSION = "3.1.0";
export const APPLICATION_INSIGHTS_OPENTELEMETRY_VERSION = "3.2.0";
export const DEFAULT_ROLE_NAME = "Web";
export const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";

Expand Down
2 changes: 1 addition & 1 deletion test/functionalTests/runner/taskExpectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = {
"RemoteDependencyData",
(telemetry) => {
return telemetry.data.baseData.name === "mongodb.createIndexes" &&
telemetry.data.baseData.data === "{\"createIndexes\":\"?\",\"indexes\":\"?\"}" &&
telemetry.data.baseData.data === "{\"createIndexes\":\"?\",\"indexes\":[{\"name\":\"?\",\"key\":{\"testrecord\":\"?\"}}]}" &&
telemetry.data.baseData.target === "localhost|testapp" &&
telemetry.data.baseData.type === "mongodb";
}
Expand Down
1 change: 0 additions & 1 deletion test/functionalTests/runner/testValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module.exports.TestValidation = class TestValidation {

// Helper fn for validator that runs on all telemetry items
const baseValidator = (item) => {
return true;
return item.tags['ai.internal.sdkVersion'].indexOf("node") > -1; // sdk should always report a version including "node:"
};

Expand Down
Loading
Loading