Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(frontend): adding instrumentation metrics #632

Merged
merged 9 commits into from
Jan 31, 2023

Conversation

xoscar
Copy link
Contributor

@xoscar xoscar commented Dec 12, 2022

Changes

This PR adds a set of changes to support instrumentation metrics from the frontend (server side), it also upgrades the open telemetry dependencies to the latest version.

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs folder

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

@xoscar xoscar requested a review from a team December 12, 2022 18:11
@fatsheep9146
Copy link
Contributor

please resolve the conflicts first. @xoscar

@cartersocha
Copy link
Contributor

Hey @pichlermarc if you get a chance would you mind giving this a quick review?

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 23, 2022
Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long to review this. 😬

Looks great! Just one comment about the temporality preference env var. 🙂
We may also need to update Metric Feature Coverage by Service.

The fix for the fs-instrumentation may only come around in the beginning of next year. 🙁 It is up to the author & approvers, but it may be worth keeping the workaround for now to get this merged and create a issue to remove the workaround in a follow up once the fix is released.

docker-compose.yml Show resolved Hide resolved
@puckpuck puckpuck added in-progress This issue is actively being worked on and removed Stale labels Dec 24, 2022
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@cartersocha
Copy link
Contributor

Hey @xoscar can you clean this up? I think we're mostly ready

@xoscar
Copy link
Contributor Author

xoscar commented Jan 23, 2023

Hey @cartersocha @puckpuck this one should be ready for its final review

Copy link
Member

@austinlparker austinlparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but can you update the docs as well?

@xoscar
Copy link
Contributor Author

xoscar commented Jan 23, 2023

Hey @austinlparker what docs update would you like to be added? or just the change log update?

@austinlparker
Copy link
Member

The feature matrix for metrics needs to be updated, right?

Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to build this PR.
I'm getting the following error:

=> ERROR [builder 8/8] RUN npm run build                                                                                                             45.7s
------
 > [builder 8/8] RUN npm run build:
#0 0.706
#0 0.706 > frontend@0.1.0 build
#0 0.706 > next build
#0 0.706
#0 1.141 warn  - SWC minify release candidate enabled. https://nextjs.org/docs/messages/swc-minify-enabled
#0 1.157 Attention: Next.js now collects completely anonymous telemetry regarding usage.
#0 1.158 This information is used to shape Next.js' roadmap and prioritize features.
#0 1.158 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
#0 1.158 https://nextjs.org/telemetry
#0 1.158
#0 1.309 info  - Linting and checking validity of types...
#0 4.289
#0 4.289 ./pages/_document.tsx
#0 4.289 46:11  Warning: Do not use `<title>` element with `<Head />` component from `next/document`. Titles should defined at the page-level using `<Head />` from `next/head` instead. See: https://nextjs.org/docs/messages/no-title-in-document-head  @next/next/no-title-in-document-head
#0 4.289
#0 4.289 ./components/CartDropdown/CartDropdown.tsx
#0 4.289 30:6  Warning: React Hook useEffect has a missing dependency: 'onClose'. Either include it or remove the dependency array. If 'onClose' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
#0 4.289
#0 4.289 info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
#0 9.018 info  - Creating an optimized production build...
#0 9.619 Browserslist: caniuse-lite is outdated. Please run:
#0 9.619   npx browserslist@latest --update-db
#0 9.619   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
#0 9.681 warn  - Found lockfile missing swc dependencies, patching...
#0 10.10 info  - Downloading WASM swc package...
#0 12.49 warn  - Lockfile was successfully patched, please run "npm install" to ensure @next/swc dependencies are downloaded
#0 14.33 info  - Using experimental wasm build of next-swc
#0 37.40 warn  - Attempted to load @next/swc-linux-x64-gnu, but it was not installed
#0 37.40 warn  - Attempted to load @next/swc-linux-x64-gnux32, but it was not installed
#0 37.40 warn  - Attempted to load @next/swc-linux-x64-musl, but it was not installed
#0 43.22 Browserslist: caniuse-lite is outdated. Please run:
#0 43.22   npx browserslist@latest --update-db
#0 43.22   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
#0 44.98 panicked at 'The global thread pool has not been initialized.: ThreadPoolBuildError { kind: IOError(Error { kind: Unsupported, message: "operation not supported on this platform" }) }', /Users/runner/.cargo/registry/src/github.mirror.nvdadr.com-1ecc6299db9ec823/rayon-core-1.9.1/src/registry.rs:170:10
#0 44.98
#0 44.98 Stack:
#0 44.98
#0 44.98 Error
#0 44.98     at module.exports.__wbg_new_693216e109162396 (/app/node_modules/next/wasm/@next/swc-wasm-nodejs/wasm.js:202:17)
#0 44.98     at wasm://wasm/059aa236:wasm-function[5445]:0xf90917
#0 44.98     at wasm://wasm/059aa236:wasm-function[13700]:0x11eca7b
#0 44.98     at wasm://wasm/059aa236:wasm-function[9995]:0x1186adc
#0 44.98     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 44.98     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 44.98     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 44.98     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 44.98     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 44.98     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 44.98
#0 44.98
#0 45.01 panicked at 'The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }', /Users/runner/.cargo/registry/src/github.mirror.nvdadr.com-1ecc6299db9ec823/rayon-core-1.9.1/src/registry.rs:170:10
#0 45.01
#0 45.01 Stack:
#0 45.01
#0 45.01 Error
#0 45.01     at module.exports.__wbg_new_693216e109162396 (/app/node_modules/next/wasm/@next/swc-wasm-nodejs/wasm.js:202:17)
#0 45.01     at wasm://wasm/059aa236:wasm-function[5445]:0xf90917
#0 45.01     at wasm://wasm/059aa236:wasm-function[13700]:0x11eca7b
#0 45.01     at wasm://wasm/059aa236:wasm-function[9995]:0x1186adc
#0 45.01     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 45.01     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 45.01     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 45.01     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 45.01     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 45.01     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 45.01
#0 45.01
#0 45.59 Failed to compile.
#0 45.59
#0 45.59 static/chunks/pages/_app-8407aef237a8638f.js from Terser
#0 45.59 unreachable
#0 45.59 RuntimeError: unreachable
#0 45.59     at wasm://wasm/059aa236:wasm-function[9995]:0x1186aff
#0 45.59     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 45.59     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 45.59     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 45.59     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x760098
#0 45.59     at wasm://wasm/059aa236:wasm-function[3154]:0xd6fe73
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f24f
#0 45.59
#0 45.59 static/chunks/pages/cart-30098418c1e82897.js from Terser
#0 45.59 unreachable
#0 45.59 RuntimeError: unreachable
#0 45.59     at wasm://wasm/059aa236:wasm-function[9995]:0x1186afd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 45.59     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 45.59     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 45.59     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x760098
#0 45.59     at wasm://wasm/059aa236:wasm-function[3154]:0xd6fe73
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f24f
#0 45.59
#0 45.59 static/chunks/framework-186861825da4f5ee.js from Terser
#0 45.59 unreachable
#0 45.59 RuntimeError: unreachable
#0 45.59     at wasm://wasm/059aa236:wasm-function[9995]:0x1186afd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 45.59     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 45.59     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 45.59     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x760098
#0 45.59     at wasm://wasm/059aa236:wasm-function[3154]:0xd6fe73
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f24f
#0 45.59
#0 45.59 static/chunks/764-bf797c6df7c4f464.js from Terser
#0 45.59 unreachable
#0 45.59 RuntimeError: unreachable
#0 45.59     at wasm://wasm/059aa236:wasm-function[9995]:0x1186afd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11009]:0x11b6862
#0 45.59     at wasm://wasm/059aa236:wasm-function[12785]:0x11e5cdd
#0 45.59     at wasm://wasm/059aa236:wasm-function[11383]:0x11c358f
#0 45.59     at wasm://wasm/059aa236:wasm-function[10017]:0x1187e72
#0 45.59     at wasm://wasm/059aa236:wasm-function[1151]:0x98decd
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f3f2
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x760098
#0 45.59     at wasm://wasm/059aa236:wasm-function[3154]:0xd6fe73
#0 45.59     at wasm://wasm/059aa236:wasm-function[654]:0x75f24f
#0 45.59
#0 45.59
#0 45.60 > Build failed because of webpack errors
------
failed to solve: executor failed running [/bin/sh -c npm run build]: exit code: 1

@julianocosta89
Copy link
Member

@xoscar would you have some time to take a look at this?
We would love to have that PR merged to do release 1.3.0.

@xoscar
Copy link
Contributor Author

xoscar commented Jan 30, 2023

Hey @julianocosta89 how are you trying to build the image? I did it using docker compose build frontend --no-cache and it worked.

@austinlparker I wonder if I should update the doc matrix, the current state of it seems to be quite outdated.

@austinlparker
Copy link
Member

@xoscar We can push the docs update out. Can you address any issues/comments today so that we can release?

Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just missing the suggestion from @pichlermarc

Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
@cartersocha
Copy link
Contributor

@puckpuck / @open-telemetry/demo-approvers everything addressed? Im on mobile until tonight but I think I see everything resolved

@puckpuck puckpuck added the helm-update-required Requires an update to the Helm chart when released label Jan 30, 2023
@puckpuck
Copy link
Contributor

I will test this all end-end in a few hours, and report back.

@cartersocha cartersocha removed the in-progress This issue is actively being worked on label Jan 30, 2023
@austinlparker
Copy link
Member

Thanks @puckpuck ping me on slack when it's good

@puckpuck puckpuck merged commit f5c59ea into open-telemetry:main Jan 31, 2023
mat-rumian added a commit to SumoLogic/opentelemetry-demo that referenced this pull request Feb 20, 2023
* Fixes open-telemetry#696, Downgrades OTP (open-telemetry#698)

* Use different base images for frauddetectionservice (open-telemetry#691)

* Use different docker base images for frauddetection service

Signed-off-by: svrnm <neumanns@cisco.com>

* Add entry in CHANGELOG

Signed-off-by: svrnm <neumanns@cisco.com>

* update changelog

Signed-off-by: svrnm <neumanns@cisco.com>

* Remove extra blank line

Signed-off-by: svrnm <neumanns@cisco.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>

* fix(paymentservice): respect temporality env var (open-telemetry#693)

* fix(paymentservice): update dependencies so that temporality env var is respected

* fix(changelog): add changelog entry

* Add healthcheck to featureflagservice (open-telemetry#661)

* Add healthcheck to featureflagservice

In order to assess the health of this central service, compose should perform a check on the service.

* Add changelog entry

Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>

* bot is broken (open-telemetry#699)

Co-authored-by: Juliano Costa <julianocosta89@outlook.com>

* Fix link to the docs (open-telemetry#701)

* reduce quoteservice spans (open-telemetry#702)

* fixing container name nit - quote service (open-telemetry#706)

* [recommendationservice] - base image, licensing and diagram update (open-telemetry#700)

* update service metric requirement table (open-telemetry#707)

* update service metric requirement table

* add feature table

* Update emailservice Dockerfile to use alpine and multistage build (open-telemetry#703)

* Update emailservice Dockerfile

Signed-off-by: svrnm <neumanns@cisco.com>

* Use alpine

Signed-off-by: svrnm <neumanns@cisco.com>

* Add changelog

Signed-off-by: svrnm <neumanns@cisco.com>

* newline

Signed-off-by: svrnm <neumanns@cisco.com>

* Update CHANGELOG.md

* Update .dockerignore

Signed-off-by: svrnm <neumanns@cisco.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>

* Update dockerfile for adservice to use different base images (open-telemetry#705)

* Enable exemplar export/display support (open-telemetry#704)

* Enable exemplar export/display support

Ensure the collector's prometheus endpoint produces exemplars
Ensure that prometheus collects and stores exemplar data
Ensure that grafana will display links to exemplars from dashboards/the explore tab

* Enable exemplars for latency histogram in demo dashboard

* update contributing guide (open-telemetry#711)

* update contributing guide

* fix lint

Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>

* Add random errors in AdService (open-telemetry#694)

* feature(frontend): adding instrumentation metrics (open-telemetry#632)

* feature(frontend): adding instrumentation metrics

* feature(frontend): adding instrumentation metrics

* updating package-lock.json

* Update docker-compose.yml

Co-authored-by: Marc Pichler <marcpi@edu.aau.at>

---------

Co-authored-by: Marc Pichler <marcpi@edu.aau.at>

* Update CONTRIBUTING.md (open-telemetry#720)

* fix metrics import (open-telemetry#721)

Signed-off-by: Pierre Tessier <pierre@pierretessier.com>

* Update .env (open-telemetry#722)

* Updated demo link for Sumo Logic (open-telemetry#718)

* Add build for arm64 arch (open-telemetry#657)

* Add build for arm64 arch

* Add change to changelog

* enable build on PR

* remove build on pr

---------

Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
Co-authored-by: Austin Parker <austin@ap2.io>

* [chore] - fix image version (open-telemetry#726)

Remove the `v` prefix from the image version. We now publish images without this prefix.

* Adds caveats to current exemplar support in the demo architecture (open-telemetry#725)

Also, updates collector version: exemplars for the latency histogram produced by the span  metrics processor are now getting exported for all services and endpoints, not just the first one in the metric family.

Co-authored-by: Pierre Tessier <pierre@pierretessier.com>

* Add Sentry (sentry.io) demo to README (open-telemetry#724)

* Add Sentry (sentry.io) demo to README

* use alpha order

---------

Co-authored-by: Pierre Tessier <pierre@pierretessier.com>

* Drop docs folder and adjust links (open-telemetry#730)

* Drop docs folder and adjust links

* Update PULL_REQUEST_TEMPLATE.md

* Add entry to CHANGELOG.md

* README: drop unused logo reference

* add reflection for grpcurl (open-telemetry#735)

* Add cross-compilation for shipping service (open-telemetry#715)

* Add cross-compilation for shipping service

Signed-off-by: svrnm <neumanns@cisco.com>

* Update CHANGELOG.md

* Update Dockerfile

---------

Signed-off-by: svrnm <neumanns@cisco.com>

* Ensure all http.server.duration metrics have the same description (open-telemetry#738)

* Add OTel logo to README (open-telemetry#744)

* rename proto package from hipstershop to oteldemo (open-telemetry#740)

* prometheus: honor_labels to have the right job and instance (open-telemetry#743)

Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>

* Nit fix contributing guide (open-telemetry#747)

---------

Signed-off-by: svrnm <neumanns@cisco.com>
Signed-off-by: Pierre Tessier <pierre@pierretessier.com>
Co-authored-by: Josh Lee <joshleecreates@users.noreply.github.com>
Co-authored-by: Severin Neumann <neumanns@cisco.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Cedric Ziel <cedric.ziel@grafana.com>
Co-authored-by: Brett McBride <brett@deakin.edu.au>
Co-authored-by: James Lawrie <james.lawrie@nytimes.com>
Co-authored-by: Austin Parker <austin@ap2.io>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com>
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
Co-authored-by: Pierre Tessier <pierre@pierretessier.com>
Co-authored-by: Pawel Brzoska <53935084+pbrzoska-sumo@users.noreply.github.com>
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Co-authored-by: Jared Tan <jian.tan@daocloud.io>
Co-authored-by: Alex Boten <alex@boten.ca>
Co-authored-by: Goutham Veeramachaneni <gouthamve+github@gmail.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
* feature(frontend): adding instrumentation metrics

* feature(frontend): adding instrumentation metrics

* updating package-lock.json

* Update docker-compose.yml

Co-authored-by: Marc Pichler <marcpi@edu.aau.at>

---------

Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helm-update-required Requires an update to the Helm chart when released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants