DevOpsDay
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 前端可觀測性 - Grafana 在下的一盤大棋 - 許宏翔 (Mike Hsu) {%hackmd @DevOpsDay/B1cnefOI0 %} #### 》[議程介紹](https://devopsdays.tw/2024/speaker-page/1493) #### 》[填寫議程滿意度問卷|回饋建言給辛苦的講者](https://forms.gle/vWV95UQ2e6ihdpah7) > 共筆從這開始 ## What is Frontend Observability 什麼是前端可觀測性? 幾乎大家都說是: == Grafana or ELK or Datadog === 監控 ## Why we need Frontend Observability humans are impatient, 任何造成延遲的原因都可能導致application失去潛在客戶 目的是什麼? 服務行為是什麼?,又串接到哪一個服務、如果出現系統的效能變慢,哪一個函數在作怪,錯誤在哪一個階段壞去? 請求時間變長,這些問題是在前端發生還是後端發生的? ……………… 以上都是可觀測性都是要解決的問題,目前都是後端。 必須延伸到前端, 真實體感時間是USER從前端按下按鈕開始 Performance Golden Rule 企業角度來看,人類很不耐煩,反應時間延遲和業務績效有絕對關係! 這些精確監控非常重要吧 前端效能是使用者體驗的一部分、甚至網頁畫出來的時間也要考量。 可能很難在本地發現錯誤,在 production 才出現問題 訂票那瞬間卡住情況,讓許多客戶都認為絕對買不到了,就是會卡。 Leverage Real User Monitoring (RUM 工具)監測使用者真實使用情況 RUM 工具用在 production 是**右移**測試的延伸。 (下一堂是測試**左移**) ## Grafana and Their Frontend Observability - Grafana 小知識 - 不只是做開源,還花錢請別人做開源 - Prometheus, OpenTelemetry - Grafana 的無限寶石 Labs - Logs - Visualizations - Traces - Metrics - Profiles - Collection 從資料搜集 -> 處理 -> 儲存 -> 進而萃取精華 依靠個服務資訊信號聚合出來的 Grafana, > Grafana 終極目標:可觀測性的基礎設施必須像水跟電一樣 ### Grafana Faro Web SDK - 為什麼使用 Grafana Faro? - 前端插入短短幾行即可用 - 擁有 Instrumentations 隨插即用 - 跟 React 高度整合 - 原生支援 OpenTelemetry ### Grafana Cloud: Application Performance ![image](https://hackmd.io/_uploads/H1e-9ClaDR.png) - 可以知道哪一個路徑,效能的表現如何 - 可以知道 Session view log 間的關係 - 可以從 logs 推測使用者的歷程 ### Grafana Faro RUM Architecture ![image](https://hackmd.io/_uploads/BydNRxTP0.png) - 解決成本問題,降低維運成本 ### Sentry RUM Architectiure - 比較 RUM 霸主 - Sentry 維運門檻高(多個資料庫) 結論: 太貴 ### Grafana Faro RUM RECAP - 總結 Faro 優缺點 - 優點 - 可以馬上點 error,連到 Github 找出這段 code 是誰寫的 ### Grafana Scenes source: https://github.com/grafana/scenes - 提供很直覺的聲明式 API ## Build highly interactive Grafana Apps ### Grafan Scenes Demo - 比較這個月和上個月使用區段,判斷是否正常 ### Log Volume Explore Demo - 哪些服務是最佔空間的 ###### tags: `DevOpsDays Taipei 2024` ===聊天區=== 講者兩個禮拜前去了瑞士,推薦去看冰河 可觀測性是

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully