generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(honeycomb-opentelemetry-web): Add data attributtes for LCP. (#309)
<!-- Thank you for contributing to the project! 💜 Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate. --> ## Which problem is this PR solving? Adds `data-` attributes to LCP web vitals and a configuration to specify which data attributes to collect. Closes #95 ## Short description of the changes ## How to verify that this has the expected result Add a `data-` to the LCP element and see it's value as an attribute span under `element.data-ATTRIBUTE_NAME` ![CleanShot 2024-09-26 at 16 38 09@2x](https://github.com/user-attachments/assets/43898db1-c113-469e-816e-96cc1b215a27)
- Loading branch information
1 parent
20e7aa9
commit c77fb9d
Showing
6 changed files
with
220 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 19 additions & 19 deletions
38
packages/honeycomb-opentelemetry-web/examples/hello-world-web/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Honeycomb OpenTelemetry Web Distro</title> | ||
</head> | ||
<body> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Honeycomb OpenTelemetry Web Distro</title> | ||
</head> | ||
<body> | ||
<ul id="spans-go-here"></ul> | ||
<section class="example-app"> | ||
<header class="header"> | ||
<h1>👋 Hello World</h1> | ||
</header> | ||
<section class="example-app"> | ||
<header class="header"> | ||
<h1 data-hello="hello" data-foo="42" data-bar-biz>👋 Hello World</h1> | ||
</header> | ||
|
||
<button id="loadDadJoke">Get A Random Dad Joke</button> | ||
<div> | ||
<span id="dadJokeText"></span> | ||
</div> | ||
</section> | ||
<!-- Scripts here. Don't remove ↓ --> | ||
<script type="module" src="build/bundle.js"></script> | ||
</body> | ||
<button id="loadDadJoke">Get A Random Dad Joke</button> | ||
<div> | ||
<span id="dadJokeText"></span> | ||
</div> | ||
</section> | ||
<!-- Scripts here. Don't remove ↓ --> | ||
<script type="module" src="build/bundle.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/honeycomb-opentelemetry-web/examples/hello-world-web/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.