@launchdarkly/observability 0.0.1 → 0.1.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +36 -16
  3. package/package.json +14 -13
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @launchdarkly/observability
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bcac87b: release initial public version
8
+
9
+ ## 0.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 26cc5f1: refactors highlight.run SDK into plugins consumed by new @launchdarkly packages
package/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # LaunchDarkly JavaScript Observability SDK for Browsers
2
2
 
3
- [![NPM][browser-sdk-npm-badge]][browser-sdk-npm-link]
4
- [![Actions Status][browser-sdk-ci-badge]][browser-sdk-ci]
5
- [![Documentation][browser-sdk-ghp-badge]][browser-sdk-ghp-link]
6
- [![NPM][browser-sdk-dm-badge]][browser-sdk-npm-link]
7
- [![NPM][browser-sdk-dt-badge]][browser-sdk-npm-link]
3
+ [![NPM][o11y-sdk-npm-badge]][o11y-sdk-npm-link]
4
+ [![Actions Status][o11y-sdk-ci-badge]][o11y-sdk-ci]
5
+ [![NPM][o11y-sdk-dm-badge]][o11y-sdk-npm-link]
6
+ [![NPM][o11y-sdk-dt-badge]][o11y-sdk-npm-link]
8
7
 
9
8
  # ⛔️⛔️⛔️⛔️
10
9
 
@@ -13,17 +12,39 @@
13
12
 
14
13
  # ☝️☝️☝️☝️☝️☝️
15
14
 
16
- <!--
17
15
  ## Install
18
16
 
17
+ Install the package
19
18
  ```shell
20
19
  # npm
21
20
  npm i @launchdarkly/observability
22
21
 
23
22
  # yarn
24
- yarn add -D @launchdarkly/observability
23
+ yarn add @launchdarkly/observability
24
+ ```
25
+
26
+ Update your web app entrypoint.
27
+ ```tsx
28
+ import { initialize } from 'launchdarkly-js-client-sdk'
29
+ import Observability, { LDObserve } from '@launchdarkly/observability'
30
+
31
+ const client = init3(
32
+ '<CLIENT_SIDE_ID>',
33
+ { key: 'authenticated-user@example.com' },
34
+ {
35
+ // Not including plugins at all would be equivalent to the current LaunchDarkly SDK.
36
+ plugins: [
37
+ new Observability('<OBSERVABILITY_PROJECT_ID>', {
38
+ networkRecording: {
39
+ enabled: true,
40
+ recordHeadersAndBody: true,
41
+ },
42
+ }),
43
+ ],
44
+ },
45
+ )
46
+
25
47
  ```
26
- -->
27
48
 
28
49
  ## Getting started
29
50
 
@@ -35,6 +56,7 @@ LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply
35
56
 
36
57
  ## About LaunchDarkly
37
58
 
59
+ - LaunchDarkly Observability provies a way to collect and send errors, logs, traces to LaunchDarkly. Correlate latency or exceptions with your releases to safely ship code.
38
60
  - LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
39
61
  - Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
40
62
  - Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
@@ -48,11 +70,9 @@ LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply
48
70
  - [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation
49
71
  - [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates
50
72
 
51
- [browser-sdk-ci-badge]: https://github.com/launchdarkly/observability-sdk/actions/workflows/browser.yml/badge.svg
52
- [browser-sdk-ci]: https://github.com/launchdarkly/observability-sdk/actions/workflows/browser.yml
53
- [browser-sdk-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/js-client-sdk.svg?style=flat-square
54
- [browser-sdk-npm-link]: https://www.npmjs.com/package/@launchdarkly/js-client-sdk
55
- [browser-sdk-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8
56
- [browser-sdk-ghp-link]: https://launchdarkly.github.io/js-core/packages/sdk/browser/docs/
57
- [browser-sdk-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/js-client-sdk.svg?style=flat-square
58
- [browser-sdk-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/js-client-sdk.svg?style=flat-square
73
+ [o11y-sdk-ci-badge]: https://github.com/launchdarkly/observability-sdk/actions/workflows/turbo.yml/badge.svg
74
+ [o11y-sdk-ci]: https://github.com/launchdarkly/observability-sdk/actions/workflows/turbo.yml
75
+ [o11y-sdk-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/observability.svg?style=flat-square
76
+ [o11y-sdk-npm-link]: https://www.npmjs.com/package/@launchdarkly/observability
77
+ [o11y-sdk-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/observability.svg?style=flat-square
78
+ [o11y-sdk-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/observability.svg?style=flat-square
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/observability",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "description": "Browser observability for your web app. Capture frontend metrics, errors, logs and traces.",
5
5
  "keywords": [
6
6
  "launchdarkly",
@@ -25,20 +25,21 @@
25
25
  "url": "https://github.com/launchdarkly/observability-sdk.git"
26
26
  }
27
27
  },
28
+ "scripts": {
29
+ "typegen": "tsc",
30
+ "build": "vite build"
31
+ },
32
+ "devDependencies": {
33
+ "highlight.run": "9.18.0",
34
+ "rollup-plugin-visualizer": "^5.14.0",
35
+ "typescript": "^5.8.3",
36
+ "vite": "^6.3.4",
37
+ "vitest": "^3.1.2"
38
+ },
28
39
  "type": "module",
29
- "main": "./dist/index.js",
30
- "module": "./dist/index.js",
31
- "unpkg": "./dist/index.umd.js",
32
- "jsdelivr": "./dist/index.umd.js",
40
+ "main": "./dist/observability.js",
41
+ "module": "./dist/observability.js",
33
42
  "types": "./dist/index.d.ts",
34
- "exports": {
35
- "types": "./dist/index.d.ts",
36
- "unpkg": "./dist/index.umd.js",
37
- "jsdelivr": "./dist/index.umd.js",
38
- "import": "./dist/index.js",
39
- "require": "./dist/index.js",
40
- "default": "./dist/index.js"
41
- },
42
43
  "files": [
43
44
  "dist"
44
45
  ],