@vercel/otel 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@vercel/otel.svg)](https://www.npmjs.com/package/@vercel/otel)
4
4
 
5
- > **Note:** This package is experimental. Updates can contain breaking changes.
5
+ > **Note:** This package is experimental. It doesn't follow semver yet. Minors can contain breaking changes.
6
6
 
7
- `vercel/otel` is a simple and easy-to-use package that sets up your trace provider and exporter.
7
+ `@vercel/otel` is a simple and easy-to-use package that sets up your trace provider and exporter.
8
8
 
9
9
  💡 Use this package to quickly instrument your applications and get started with OpenTelemetry!
10
10
 
11
11
  ## 📦 Installation
12
12
 
13
13
  ```sh
14
- npm install vercel/otel
14
+ npm install @vercel/otel
15
15
  ```
16
16
 
17
17
  ## 📚 Usage
@@ -20,7 +20,7 @@ npm install vercel/otel
20
20
  import { registerOTel } from "@vercel/otel";
21
21
  import { trace } from "@opentelemetry/api";
22
22
 
23
- // Register the OpenTelemetry provider with an HTTP exporter
23
+ // Register the OpenTelemetry provider with an GRPC exporter
24
24
  registerOTel("your-service-name");
25
25
 
26
26
  // Now you can use the OpenTelemetry APIs
@@ -31,8 +31,8 @@ const span = trace.getTracer("your-component").startSpan("your-operation");
31
31
 
32
32
  ### `registerOTel(serviceName: string)`
33
33
 
34
- Registers the OpenTelemetry provider with an HTTP exporter using the given service name.
35
- This is all that is needed to trace your app on Vercel.
34
+ Registers the OpenTelemetry provider with an OTLP exporter using the given service name.
35
+ This is all that is needed to trace your app on Vercel or any other platform exposing its own OpenTelemetry Collector.
36
36
 
37
37
  - `serviceName`: The name of your service, used as the app name in many OpenTelemetry backends.
38
38
 
@@ -1,5 +1,5 @@
1
1
  import { NodeSDK } from "@opentelemetry/sdk-node";
2
- import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
2
+ import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-grpc";
3
3
  import { Resource } from "@opentelemetry/resources";
4
4
  import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
5
5
  import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/otel",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Vercel wrapper around OpenTelemetry APIs",
5
5
  "type": "module",
6
6
  "files": [
@@ -46,12 +46,12 @@
46
46
  },
47
47
  "license": "MIT",
48
48
  "devDependencies": {
49
- "@types/node": "14.18.33",
50
- "typescript": "^4.9.5"
49
+ "@types/node": "18.16.1",
50
+ "typescript": "^5.0.4"
51
51
  },
52
52
  "dependencies": {
53
- "@opentelemetry/api": "^1.3.0",
54
- "@opentelemetry/exporter-trace-otlp-http": "^0.36.1",
53
+ "@opentelemetry/api": "^1.4.1",
54
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.38.0",
55
55
  "@opentelemetry/resources": "^1.12.0",
56
56
  "@opentelemetry/sdk-node": "^0.38.0",
57
57
  "@opentelemetry/sdk-trace-node": "^1.12.0",