Skip to content

Commit

Permalink
[Beta] 3.0.0 beta.8 release (#1202)
Browse files Browse the repository at this point in the history
* Revert "3.0.0-beta.8 release"

This reverts commit fe2a514.

e

* 3.0.0-beta.8 release

* Update

* Update

* Readme update

* Test

* test undo
  • Loading branch information
hectorhdzg authored Sep 5, 2023
1 parent 1e94c8a commit c5c9705
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5,513 deletions.
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ npm install applicationinsights@beta

### Enable Application Insights

> *Important:* `TelemetryClient` must be setup *and* started *before* you import anything else. There may be resulting telemetry loss if other libraries are imported first.
> *Important:* `useAzureMonitor` must be called *before* you import anything else. There may be resulting telemetry loss if other libraries are imported first.

```typescript
const { TelemetryClient, ApplicationInsightsOptions } = require("applicationinsights");
const { useAzureMonitor, ApplicationInsightsOptions } = require("applicationinsights");

const config : ApplicationInsightsOptions = {
azureMonitorExporterConfig: {
connectionString: process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>"
}
};
const appInsights = new TelemetryClient(config);
useAzureMonitor(config);
```

* If the Connection String is set in the environment variable
Expand Down Expand Up @@ -112,7 +112,7 @@ const config : ApplicationInsightsOptions = {
}

};
const appInsights = new TelemetryClient(config);
useAzureMonitor(config);

```

Expand Down Expand Up @@ -159,17 +159,6 @@ process.env.APPLICATIONINSIGHTS_CONFIGURATION_FILE = "C:/applicationinsights/con

### Self-diagnostics

Azure Monitor Application Insights Distro uses the OpenTelemetry API Logger for internal logs. To enable it, use the following code:

```typescript
import { ApplicationInsightsClient, ApplicationInsightsConfig } from "applicationinsights";
import { DiagLogLevel } from "@opentelemetry/api";

const appInsights = new ApplicationInsightsClient(new ApplicationInsightsConfig());
const logger = appInsights.getLogger();
logger.updateLogLevel(DiagLogLevel.DEBUG);
```


`APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL` environment varialbe could be used to set desired log level, supporting the following values: `NONE`, `ERROR`, `WARN`, `INFO`, `DEBUG`, `VERBOSE` and `ALL`.

Expand Down
Loading

0 comments on commit c5c9705

Please sign in to comment.