Skip to content

Commit dcb7e5f

Browse files
kinyoklionmmrj
andauthored
chore: Issue template + readme updates. (#771)
Add issue templates and update the readme. --------- Co-authored-by: Molly <[email protected]>
1 parent 2c51838 commit dcb7e5f

File tree

3 files changed

+107
-3
lines changed

3 files changed

+107
-3
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: '@launchdarkly/browser-telemetry Bug Report'
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: telemetry/browser-telemerty, bug'
6+
assignees: ''
7+
---
8+
9+
**Is this a support request?**
10+
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected].
11+
12+
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
13+
14+
**Describe the bug**
15+
A clear and concise description of what the bug is.
16+
17+
**To reproduce**
18+
Steps to reproduce the behavior.
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Logs**
24+
If applicable, add any log output related to your problem.
25+
26+
**SDK version**
27+
The version of this SDK that you are using.
28+
29+
**Language version, developer tools**
30+
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.
31+
32+
**OS/platform**
33+
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
34+
35+
**Additional context**
36+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: '@launchdarkly/browser-telemetry Feature Request'
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: telemetry/browser-telemetry, feature'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context about the feature request here.

packages/telemetry/browser-telemetry/README.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
> [!WARNING]
66
> This is an alpha version. The API is not stabilized and will introduce breaking changes.
77
8-
TODO Add badges
8+
[![NPM][browser-telemetry-npm-badge]][browser-telemetry-npm-link]
9+
[![Actions Status][browser-telemetry-ci-badge]][browser-telemetry-ci]
10+
[![Documentation][browser-telemetry-ghp-badge]][browser-telemetry-ghp-link]
11+
[![NPM][browser-telemetry-dm-badge]][browser-telemetry-npm-link]
12+
[![NPM][browser-telemetry-dt-badge]][browser-telemetry-npm-link]
913

1014
## LaunchDarkly overview
1115

@@ -15,11 +19,47 @@ TODO Add badges
1519

1620
## Compatibility
1721

18-
TODO
22+
This package is compatible with the `launchdarkly-js-client-sdk` version 3.4.0 and later.
1923

2024
## Setup
2125

22-
TODO
26+
### For error metric collection only
27+
28+
```
29+
import { initialize } from "launchdarkly-js-client-sdk";
30+
import { initTelemetry, register } from "@launchdarkly/browser-telemetry";
31+
32+
// Initialize the telemetry as early as possible in your application.
33+
// Errors will be missed if they occur before the telemetry is initialized.
34+
// For metrics only, breadcrumbs and stack traces are not required.
35+
initTelemetry({breadcrumbs: false, stack: false});
36+
37+
// Initialize the LaunchDarkly client.
38+
const client = initialize('sdk-key', context);
39+
40+
// Register the client with the telemetry instance.
41+
register(client);
42+
```
43+
44+
### For error monitoring + metric collection
45+
46+
```
47+
import { initialize } from "launchdarkly-js-client-sdk";
48+
import { initTelemetry, register, inspectors } from "@launchdarkly/browser-telemetry";
49+
50+
// Initialize the telemetry as early as possible in your application.
51+
// Errors will be missed if they occur before the telemetry is initialized.
52+
initTelemetry();
53+
54+
// Initialize the LaunchDarkly client.
55+
const client = initialize('sdk-key', context, {
56+
// Inspectors allows the telemetry SDK to capture feature flag information.
57+
inspectors: inspectors(),
58+
});
59+
60+
// Register the client with the telemetry instance.
61+
register(client);
62+
```
2363

2464
## Contributing
2565

@@ -39,3 +79,12 @@ We encourage pull requests and other contributions from the community. Check out
3979
- [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides
4080
- [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation
4181
- [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates
82+
83+
[browser-telemetry-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/browser-telemetry.yml/badge.svg
84+
[browser-telemetry-ci]: https://github.com/launchdarkly/js-core/actions/workflows/browser-telemetry.yml
85+
[browser-telemetry-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/browser-telemetry.svg?style=flat-square
86+
[browser-telemetry-npm-link]: https://www.npmjs.com/package/@launchdarkly/browser-telemetry
87+
[browser-telemetry-ghp-badge]: https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8
88+
[browser-telemetry-ghp-link]: https://launchdarkly.github.io/js-core/packages/telemetry/browser-telemetry/docs/
89+
[browser-telemetry-dm-badge]: https://img.shields.io/npm/dm/@launchdarkly/browser-telemetry.svg?style=flat-square
90+
[browser-telemetry-dt-badge]: https://img.shields.io/npm/dt/@launchdarkly/browser-telemetry.svg?style=flat-square

0 commit comments

Comments
 (0)