Skip to content

Commit 7148c16

Browse files
committed
docs: shorten readme sections
1 parent 2df6310 commit 7148c16

File tree

6 files changed

+290
-284
lines changed

6 files changed

+290
-284
lines changed

README.md

+28-276
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,33 @@ The below table describes which versions of each set of packages are expected to
149149
| 1.19.x | 0.46.x |
150150
| 1.18.x | 0.45.x |
151151
| 1.17.x | 0.44.x |
152-
| 1.16.x | 0.42.x |
153-
| 1.15.x | 0.41.x |
154-
| 1.14.x | 0.40.x |
155-
| 1.13.x | 0.39.x |
156-
| 1.12.x | 0.38.x |
157-
| 1.11.x | 0.37.x |
158-
| 1.10.x | 0.36.x |
159-
| 1.9.x | 0.35.x |
160-
| 1.8.x (this and later versions require API >=1.3.0 for metrics) | 0.34.x |
161-
| 1.7.x | 0.33.x |
162-
| 1.6.x | 0.32.x |
163-
| 1.5.x | 0.31.x |
164-
| 1.4.x | 0.30.x |
165-
| 1.3.x | 0.29.x |
166-
| 1.2.x | 0.29.x |
167-
| 1.1.x | 0.28.x |
168-
| 1.0.x | 0.27.x |
169-
| 1.0.x (this and later versions require API >=1.0.0 for traces) | 0.26.x |
152+
153+
<details>
154+
<summary>Older version compatibility matrix</summary>
155+
156+
<table>
157+
<tr><th>Stable Packages</th> <th>Experimental Packages</th></tr>
158+
<tr><td>1.16.x</td> <td>0.42.x</td></tr>
159+
<tr><td>1.15.x</td> <td>0.41.x</td></tr>
160+
<tr><td>1.14.x</td> <td>0.40.x</td></tr>
161+
<tr><td>1.13.x</td> <td>0.39.x</td></tr>
162+
<tr><td>1.12.x</td> <td>0.38.x</td></tr>
163+
<tr><td>1.11.x</td> <td>0.37.x</td></tr>
164+
<tr><td>1.10.x</td> <td>0.36.x</td></tr>
165+
<tr><td>1.9.x</td> <td>0.35.x</td></tr>
166+
<tr><td>1.8.x (this and later versions require API >=1.3.0 for metrics)</td><td>0.34.x</td></tr>
167+
<tr><td>1.7.x</td> <td>0.33.x</td></tr>
168+
<tr><td>1.6.x</td> <td>0.32.x</td></tr>
169+
<tr><td>1.5.x</td> <td>0.31.x</td></tr>
170+
<tr><td>1.4.x</td> <td>0.30.x</td></tr>
171+
<tr><td>1.3.x</td> <td>0.29.x</td></tr>
172+
<tr><td>1.2.x</td> <td>0.29.x</td></tr>
173+
<tr><td>1.1.x</td> <td>0.28.x</td></tr>
174+
<tr><td>1.0.x</td> <td>0.27.x</td></tr>
175+
<tr><td>1.0.x (this and later versions require API >=1.0.0 for traces)</td><td>0.26.x</td></tr>
176+
</table>
177+
178+
</details>
170179

171180
## Versioning
172181

@@ -299,266 +308,9 @@ These instrumentations are hosted at <https://github.com/open-telemetry/opentele
299308
| -------------------------------------------------------- | --------------------------------------------------------------------------------------- |
300309
| [@opentelemetry/shim-opentracing][otel-shim-opentracing] | OpenTracing shim allows existing OpenTracing instrumentation to report to OpenTelemetry |
301310

302-
## Upgrade guidelines
303-
304-
### 0.37.x to 0.38.0
305-
306-
- `@opentelemetry/sdk-node` `NodeSDKConfiguration.defaultAttributes` has been unused and was removed as the concept does not exist in OpenTelemetry anymore
307-
- Please use `NodeSDKConfiguration.resource` instead.
308-
309-
### 0.35.x to 0.36.0
310-
311-
- `@opentelemetry/sdk-node` changed `await start()` to now be synchronous
312-
- `@opentelemetry/sdk-node` changed `await detectResources()` to now be synchronous
313-
314-
### 0.28.x to 0.29.x
315-
316-
- `@opentelemetry/exporter-trace-otlp-http` is now exporting `scopeSpans` instead of `instrumentationLibrarySpans`
317-
- this exporter now requires collector version `0.48` and up.
318-
- `@opentelemetry/exporter-metrics-otlp-http` is now exporting `scopeMetrics` instead of `instrumentationLibraryMetrics`
319-
- this exporter now requires collector version `0.48` and up.
320-
321-
### 0.27.x to 0.28.x
322-
323-
- In `@opentelemetry/exporter-trace-otlp-http`, `OTLPExporterBase._isShutdown` is replaced with `_shutdownOnce`.
324-
325-
### 0.26.x to 0.27.x
326-
327-
Metric and trace exporters are split into separate packages:
328-
329-
- `@opentelemetry/exporter-otlp-http` => `@opentelemetry/exporter-trace-otlp-http` and `@opentelemetry/exporter-metrics-otlp-http`
330-
- `@opentelemetry/exporter-otlp-grpc` => `@opentelemetry/exporter-trace-otlp-grpc` and `@opentelemetry/exporter-metrics-otlp-grpc`
331-
- `@opentelemetry/exporter-otlp-proto` => `@opentelemetry/exporter-trace-otlp-proto` and `@opentelemetry/exporter-metrics-otlp-proto`
332-
333-
Metric types are renamed:
334-
335-
- `@openetelemetry/api-metrics`
336-
- `Meter`
337-
- `createValueRecorder` => `createHistogram`
338-
- `createValueObserver` => `createObservableGauge`
339-
- `createSumObserver` => `createObservableCounter`
340-
- `createUpDownSumObserver` => `createObservableUpDownCounter`
341-
- `ValueRecorder` => `Histogram`
342-
- `ValueObserver` => `ObservableGauge`
343-
- `SumObserver` => `ObservableCounter`
344-
- `UpDownSumObserver` => `ObservableUpDownCounter`
345-
- `ObserverResult` => `ObservableResult`
346-
- `Observation.observer` => `Observation.observable`
347-
- `@opentelemetry/sdk-metrics-base`
348-
- `MetricKind`
349-
- `VALUE_RECORDER` => `HISTOGRAM`
350-
- `SUM_OBSERVER` => `OBSERVABLE_COUNTER`
351-
- `UP_DOWN_SUM_OBSERVER` => `OBSERVABLE_UP_DOWN_COUNTER`
352-
- `VALUE_OBSERVER` => `OBSERVABLE_GAUGE`
353-
354-
### 0.25.x to 1.x.y
355-
356-
Collector exporter packages and types are renamed:
357-
358-
- `@opentelemetry/exporter-collector` => `@opentelemetry/exporter-otlp-http`
359-
- `CollectorExporterBase` => `OTLPExporterBase`
360-
- `CollectorTraceExporter` => `OTLPTraceExporter`
361-
- `CollectorMetricExporter` => `OTLPMetricExporter`
362-
- `CollectorExporterBrowserBase` => `OTLPExporterBrowserBase`
363-
- `CollectorExporterNodeBase` => `OTLPExporterNodeBase`
364-
- `CollectorExporterConfigBase` => `OTLPExporterConfigBase`
365-
- `CollectorExporterError` => `OTLPExporterError`
366-
- `COLLECTOR_SPAN_KIND_MAPPING` => `OTLP_SPAN_KIND_MAPPING`
367-
- `collectorTypes` => `otlpTypes`
368-
- `@opentelemetry/exporter-collector-grpc` => `@opentelemetry/exporter-otlp-grpc`
369-
- `CollectorTraceExporter` => `OTLPTraceExporter`
370-
- `CollectorMetricExporter` => `OTLPMetricExporter`
371-
- `CollectorExporterConfigNode` => `OTLPExporterConfigNode`
372-
- `@opentelemetry/exporter-collector-proto` => `@opentelemetry/exporter-otlp-proto`
373-
- `CollectorExporterNodeBase` => `OTLPExporterNodeBase`
374-
- `CollectorMetricExporter` => `OTLPMetricExporter`
375-
- `CollectorTraceExporter` => `OTLPTraceExporter`
376-
- W3C propagators in @opentelemetry/core were renamed
377-
- `HttpTraceContextPropagator` -> `W3CTraceContextPropagator`
378-
- `HttpBaggagePropagator` -> `W3CBaggagePropagator`
379-
380-
### 0.24.x to 0.25.x
381-
382-
- SDKs packages for trace and metrics has been renamed to have a consistent naming schema:
383-
- @opentelemetry/tracing -> @opentelemetry/sdk-trace-base
384-
- @opentelemetry/node -> @opentelemetry/sdk-trace-node
385-
- @opentelemetry/web -> @opentelemetry/sdk-trace-web
386-
- @opentelemetry/metrics -> @opentelemetry/sdk-metrics-base
387-
- @opentelemetry/node-sdk -> @opentelemetry/sdk-node
388-
389-
### 0.23.x to 0.24.x
390-
391-
- `ResourceAttributes` renamed to `SemanticResourceAttributes` in the `@opentelemetry/semantic-conventions` package
392-
393-
### 0.19.x to 0.20.0
394-
395-
- `HttpBaggage` renamed to `HttpBaggagePropagator`
396-
397-
- `HttpTraceContext` renamed to `HttpTraceContextPropagator`
398-
399-
- `JaegerHttpTracePropagator` renamed to `JaegerPropagator`
400-
401-
- `serviceName` configuration removed from Collector exporters. Use `service.name` Resource attribute instead.
402-
403-
- Prometheus exporter added suffix `_total` to counter metrics.
404-
405-
### 0.18.x to 0.19.0
406-
407-
- API is now a peer dependency. This means that users will need to include `@opentelemetry/api` as a dependency of their project in order to use the SDK. NPM version 7+ (Node 15+) should do this automatically.
408-
409-
- All plugins have been removed in favor of instrumentations.
410-
411-
- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header endcoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [readme][otel-propagator-b3] for full details and usage.
412-
413-
- Sampling configuration via environment variable has changed. If you were using `OTEL_SAMPLING_PROBABILITY` then you should replace it with `OTEL_TRACES_SAMPLER=parentbased_traceidratio` and `OTEL_TRACES_SAMPLER_ARG=<number>` where `<number>` is a number in the [0..1] range, e.g. "0.25". Default is 1.0 if unset.
414-
415-
### 0.17.0 to 0.18.0
416-
417-
- `diag.setLogLevel` is removed and LogLevel can be set by an optional second parameter to `setLogger`
418-
419-
[PR-1975](https://github.com/open-telemetry/opentelemetry-js/pull/1975)
420-
421-
- Breaking change - The resulting resource MUST have all attributes that are on any of the two input resources. If a key exists on both the old and updating resource, the value of the updating resource MUST be picked - previously it was opposite.
422-
423-
### 0.16.0 to 0.17.0
424-
425-
[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
426-
427-
[PR-1925](https://github.com/open-telemetry/opentelemetry-js/pull/1925) feat(diag-logger): part 2 - breaking changes - remove api.Logger, api.NoopLogger, core.LogLevel, core.ConsoleLogger
428-
429-
- 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.
430-
431-
#### Setting the global diagnostic logger
432-
433-
The new global [`api.diag`](https://github.com/open-telemetry/opentelemetry-js/blob/main/api/src/api/diag.ts) 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.
434-
435-
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.
436-
437-
```javascript
438-
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
439-
// Setting the default Global logger to use the Console
440-
// And optionally change the logging level (Defaults to INFO)
441-
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR)
442-
```
443-
444-
#### Using the logger anywhere in the code
445-
446-
```typescript
447-
import { diag } from "@opentelemetry/api";
448-
449-
// Remove or make optional the parameter and don't use it.
450-
export function MyFunction() {
451-
diag.debug("...");
452-
diag.info("...");
453-
diag.warn("...");
454-
diag.error("...");
455-
diag.verbose("..");
456-
}
457-
458-
```
459-
460-
#### Setting the logger back to a noop
461-
462-
```typescript
463-
import { diag } from "@opentelemetry/api";
464-
diag.setLogger();
465-
466-
```
467-
468-
[PR-1855](https://github.com/open-telemetry/opentelemetry-js/pull/1855) Use instrumentation loader to load plugins and instrumentations
469-
470-
- Providers do no load the plugins anymore. Also PluginLoader has been removed from providers, use `registerInstrumentations` instead
471-
472-
```javascript
473-
//Previously in node
474-
const provider = new NodeTracerProvider({
475-
plugins: {
476-
'@grpc/grpc-js': {
477-
enabled: true,
478-
path: '@opentelemetry/plugin-grpc-js',
479-
},
480-
}
481-
});
482-
483-
// Now
484-
const provider = new NodeTracerProvider();
485-
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
486-
registerInstrumentations({
487-
instrumentations: [
488-
{
489-
plugins: {
490-
'@grpc/grpc-js': {
491-
enabled: true,
492-
path: '@opentelemetry/plugin-grpc-js',
493-
},
494-
}
495-
}
496-
],
497-
tracerProvider: provider,
498-
});
499-
500-
// or if you want to load only default instrumentations / plugins
501-
registerInstrumentations({
502-
tracerProvider: provider,
503-
});
504-
505-
//Previously in browser
506-
const provider = new WebTracerProvider({
507-
plugins: [
508-
new DocumentLoad()
509-
]
510-
});
511-
// Now
512-
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
513-
const provider = new WebTracerProvider();
514-
registerInstrumentations({
515-
instrumentations: [
516-
new DocumentLoad(),
517-
],
518-
});
519-
```
520-
521-
- `registerInstrumentations` supports loading old plugins and instrumentations together. It also supports setting tracer provider and meter provider on instrumentations
522-
523-
[PR-1874](https://github.com/open-telemetry/opentelemetry-js/pull/1874) More specific API type names
524-
525-
Some types exported from `"@opentelemetry/api"` have been changed to be more specific.
526-
527-
- `AttributeValue` renamed to `SpanAttributeValue`
528-
- `Attributes` renamed to `SpanAttributes`
529-
- `EntryTtl` renamed to `BaggageEntryTtl`
530-
- `EntryValue` renamed to `BaggageEntryValue`
531-
- `Status` renamed to `SpanStatus`
532-
- `StatusCode` renamed to `SpanStatusCode`
533-
534-
### 0.15.0 to 0.16.0
535-
536-
[PR-1863](https://github.com/open-telemetry/opentelemetry-js/pull/1863) removed public attributes `keepAlive` and `httpAgentOptions` from nodejs `CollectorTraceExporter` and `CollectorMetricExporter`
537-
538-
### 0.14.0 to 0.15.0
539-
540-
[PR-1764](https://github.com/open-telemetry/opentelemetry-js/pull/1764) removed some APIs from `Tracer`:
541-
542-
- `Tracer.getCurrentSpan()`: use `api.getSpan(api.context.active())`
543-
- `Tracer.withSpan(span)`: use `api.context.with(api.setSpan(api.context.active(), span))`
544-
- `Tracer.bind(target)`: use `api.context.bind(target)`
545-
546-
[PR-1797](https://github.com/open-telemetry/opentelemetry-js/pull/1797) chore!: split metrics into its own api package:
547-
548-
- Any references to `require("@opentelemetry/api").metrics` will need to be changed to `require("@opentelemetry/api-metrics").metrics`
549-
550-
[PR-1725](https://github.com/open-telemetry/opentelemetry-js/pull/1725) Use new gRPC default port
551-
552-
- The default port used by `@opentelemetry/exporter-collector-grpc` is changed from `55680` to `4317`
553-
554-
[PR-1749](https://github.com/open-telemetry/opentelemetry-js/pull/1749) chore: improve naming of span related context APIs
555-
556-
- Rename `[gs]etActiveSpan()` to `[gs]etSpan()`
557-
- Rename `setExtractedSpanContext()` to `setSpanContext()`
558-
- Rename `getParentSpanContext()` to `getSpanContext()`
559-
560311
## Useful links
561312

313+
- Upgrade guidelines: [Upgrade Guide](./doc/upgrade-guide.md)
562314
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
563315
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
564316

File renamed without changes.

doc/GUIDELINES.md renamed to doc/contributing/dependencies.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# OpenTelemetry JS Code Contribution Guide
2-
3-
This document outlines the essential guidelines for contributing code to the OpenTelemetry JS repository. These guidelines are designed to ensure consistency, stability, and the highest quality of code across the project.
4-
5-
## Dependencies
1+
# OpenTelemetry Dependencies
62

73
This section refers to `"dependencies"` and `"devDependencies"` entries in `package.json` file.
84
> [!IMPORTANT]
95
> Not all libraries follow [Semantic Versioning](https://semver.org/). Even those who do might occasionally introduce breaking changes due to human errors. Exceptions to the guidelines in this document MAY be granted by Approvers or Maintainers to work around this.
106
11-
### Development Dependencies
7+
## Development Dependencies
128

139
`"devDependencies"` SHOULD be pinned to reduce the risk of autobreaking the build. Since we cannot use the `package-lock.json` file (because the libraries are distributed without it), control over the version our contributors will get is limited. By using pinned versions, we prevent potential disruptions caused by unpinned versions.
1410

@@ -17,15 +13,15 @@ This section refers to `"dependencies"` and `"devDependencies"` entries in `pack
1713
> [!NOTE]
1814
> As this approach might leave our project with outdated tooling, we adopt `renovate-bot`. This automated dependency update tool proactively opens pull requests upon the release of new patch/minor/major versions. The complete configuration for renovate-bot can be found in [renovate.json](../renovate.json) file.
1915
20-
### @opentelemetry/* dependencies
16+
## @opentelemetry/* dependencies
2117

2218
All packages from the `@opentelemetry/` namespace MUST have the same pinned version, as these dependencies are automatically updated on each release by lerna.
2319

2420
**Example:** all packages under `packages/` should consistently maintain the same version, as should those under `experimental/packages/`.
2521

2622
An exception is granted for dependencies on `@opentelemetry/api`, which, if used by the package SHOULD NOT be included as a `dependency`. `@opentelemetry/api` SHOULD be included as a `peerDependency` instead. The version range of the `peerDependency` SHOULD reflect the minimum supported, and SHOULD NOT allow versions greater than the latest released minor version.
2723

28-
### Third-Party Library Dependencies
24+
## Third-Party Library Dependencies
2925

3026
Packages categorized as third-party and listed under the `"dependencies"` section (e.g., @grpc/grpc-js, @grpc/proto-loader, shimmer, etc.) should remain unpinned and utilize the caret (`^`) symbol. This approach offers several advantages:
3127

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)