You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[#1855](https://github.com/open-telemetry/opentelemetry-js/pull/1855) Use instrumentation loader to load plugins and instrumentations ([@obecny](https://github.com/obecny))
*[#1874](https://github.com/open-telemetry/opentelemetry-js/pull/1874) More specific api type names ([@dyladan](https://github.com/dyladan))
25
+
26
+
### :rocket: (Enhancement)
27
+
28
+
*`opentelemetry-exporter-prometheus`
29
+
*[#1857](https://github.com/open-telemetry/opentelemetry-js/pull/1857) feat: add prometheus exporter host and port env vars ([@naseemkullah](https://github.com/naseemkullah))
30
+
*[#1879](https://github.com/open-telemetry/opentelemetry-js/pull/1879) feat(prometheus): add `getMetricsRequestHandler`-method to Prometheus ([@weyert](https://github.com/weyert))
31
+
*`opentelemetry-core`, `opentelemetry-tracing`
32
+
*[#1918](https://github.com/open-telemetry/opentelemetry-js/pull/1918) chore: batch processor, aligning with latest spec changes for environments variables ([@obecny](https://github.com/obecny))
33
+
*`opentelemetry-instrumentation-grpc`
34
+
*[#1806](https://github.com/open-telemetry/opentelemetry-js/pull/1806) feat: merge grpc-js into grpc instrumentation #1657 ([@vmarchaud](https://github.com/vmarchaud))
35
+
*`opentelemetry-api`, `opentelemetry-core`
36
+
*[#1880](https://github.com/open-telemetry/opentelemetry-js/pull/1880) feat(diag-logger): introduce a new global level api.diag for internal diagnostic logging ([@MSNev](https://github.com/MSNev))
37
+
* Other
38
+
*[#1920](https://github.com/open-telemetry/opentelemetry-js/pull/1920) chore: adding compatibility matrix for core and contrib versions ([@obecny](https://github.com/obecny))
*[#1883](https://github.com/open-telemetry/opentelemetry-js/pull/1883) feat: add support to forward args in context.with ([@Flarna](https://github.com/Flarna))
Copy file name to clipboardExpand all lines: README.md
+47
Original file line number
Diff line number
Diff line change
@@ -244,6 +244,53 @@ To request automatic tracing support for a module not on this list, please [file
244
244
245
245
## Upgrade guidelines
246
246
247
+
### 0.17.0 to ???
248
+
249
+
[PR-1880](https://github.com/open-telemetry/opentelemetry-js/pull/1880) feat(diag-logger): introduce a new global level api.diag for internal diagnostic logging
- These PR's remove the previous ```Logger``` and ```LogLevel``` implementations and change the way you should use the replacement ```DiagLogger``` and ```DiagLogLevel```, below are simple examples of how to change your existing usages.
254
+
255
+
#### Setting the global diagnostic logger
256
+
257
+
The new global [```api.diag```](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-api/src/api/diag.ts#L32) provides the ability to set the global diagnostic logger ```setLogger()``` and logging level ```setLogLevel()```, it is also a ```DiagLogger``` implementation and should be directly to log diagnostic messages.
258
+
259
+
All included logger references have been removed in preference to using the global ```api.diag``` directly, so you no longer need to pass around the logger instance via function parameters or included as part of the configuration for a component.
260
+
261
+
```javascript
262
+
// Setting the default Global logger to use the Console
// And optionally change the logging level (Defaults to INFO)
267
+
diag.setLogLevel(DiagLogLevel.ERROR);
268
+
```
269
+
270
+
#### Using the logger anywhere in the code
271
+
272
+
```typescript
273
+
import { diag } from"@opentelemetry/api";
274
+
275
+
// Remove or make optional the parameter and don't use it.
276
+
exportfunction MyFunction() {
277
+
diag.debug("...");
278
+
diag.info("...");
279
+
diag.warn("...");
280
+
diag.error("...");
281
+
diag.verbose("..");
282
+
}
283
+
284
+
```
285
+
286
+
#### Setting the logger back to a noop
287
+
288
+
```typescript
289
+
import { diag } from"@opentelemetry/api";
290
+
diag.setLogger();
291
+
292
+
```
293
+
247
294
### 0.16.0 to 0.17.0
248
295
249
296
[PR-1855](https://github.com/open-telemetry/opentelemetry-js/pull/1855) Use instrumentation loader to load plugins and instrumentations
0 commit comments