3 |
👋 Welcome! / 📚 README
4 |
5 | Thanks for taking the time to check out the project. If you feel the urge, please consider contributing to the
6 | project or sponsoring the developer.
7 |
8 |
9 |
10 | Don't see any data here?
11 | Check out the
12 | FAQ.
13 |
14 |
Demo
15 |
This dashboard is meant to serve as a basic demonstration of the kind of queries and visualizations you can make
16 | with some of the data you collect with the extension.
17 |
How to query the data
18 |
The data in this dashboard primarly leverages Quickwit. Quickwit supports a
19 | Lucene-like query
20 | language (and Elasticsearch-search compatible API) which
21 | you can learn
22 | more about here.
23 |
24 |
At the top of the dashboard you can also filter by log and trace attributes, which will automatically apply to
25 | the
26 | related dashboard visualizations.
27 |
--------------------------------------------------------------------------------
/generated/safari-xcode/Browser Ext for OpenTelemetry/Browser Ext for OpenTelemetry Extension/SafariWebExtensionHandler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SafariWebExtensionHandler.swift
3 | // Browser Ext for OpenTelemetry Extension
4 | //
5 | // Created by theodore brockman on 7/22/24.
6 | //
7 |
8 | import SafariServices
9 | import os.log
10 |
11 | class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
12 |
13 | func beginRequest(with context: NSExtensionContext) {
14 | let request = context.inputItems.first as? NSExtensionItem
15 |
16 | let profile: UUID?
17 | if #available(iOS 17.0, macOS 14.0, *) {
18 | profile = request?.userInfo?[SFExtensionProfileKey] as? UUID
19 | } else {
20 | profile = request?.userInfo?["profile"] as? UUID
21 | }
22 |
23 | let message: Any?
24 | if #available(iOS 15.0, macOS 11.0, *) {
25 | message = request?.userInfo?[SFExtensionMessageKey]
26 | } else {
27 | message = request?.userInfo?["message"]
28 | }
29 |
30 | os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@ (profile: %@)", String(describing: message), profile?.uuidString ?? "none")
31 |
32 | let response = NSExtensionItem()
33 | if #available(iOS 15.0, macOS 11.0, *) {
34 | response.userInfo = [ SFExtensionMessageKey: [ "echo": message ] ]
35 | } else {
36 | response.userInfo = [ "message": [ "echo": message ] ]
37 | }
38 |
39 | context.completeRequest(returningItems: [ response ], completionHandler: nil)
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/.github/workflows/tests.yml:
--------------------------------------------------------------------------------
1 | name: Unit tests
2 | on:
3 | pull_request:
4 | branches: [main]
5 |
6 | jobs:
7 | test:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 | with:
12 | submodules: recursive
13 | - uses: actions/setup-node@v4
14 | with:
15 | node-version: '20'
16 | - uses: pnpm/action-setup@v4
17 | name: Install pnpm
18 | with:
19 | run_install: false
20 | - name: Get pnpm store directory
21 | shell: bash
22 | run: |
23 | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
24 | - uses: actions/cache@v4
25 | name: Setup pnpm cache
26 | with:
27 | path: ${{ env.STORE_PATH }}
28 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29 | restore-keys: |
30 | ${{ runner.os }}-pnpm-store-
31 | - run: pnpm install
32 | - run: pnpm test:unit
33 | - run: pnpm build
34 | auto-approve:
35 | runs-on: ubuntu-latest
36 | needs: test
37 | permissions:
38 | contents: write
39 | pull-requests: write
40 | if: ${{ github.actor == 'dependabot[bot]' }}
41 | steps:
42 | - name: Dependabot metadata
43 | id: metadata
44 | uses: dependabot/fetch-metadata@v1
45 | with:
46 | github-token: '${{ secrets.GITHUB_TOKEN }}'
47 | - name: Enable auto-merge for Dependabot PRs
48 | run: |
49 | gh pr merge --auto --squash "$PR_URL"
50 | gh pr review --approve "$PR_URL"
51 | env:
52 | PR_URL: ${{github.event.pull_request.html_url}}
53 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
54 |
--------------------------------------------------------------------------------
/generated/safari-xcode/Browser Ext for OpenTelemetry/Browser Ext for OpenTelemetry/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "mac-icon-16@1x.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "mac-icon-16@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "mac-icon-32@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "mac-icon-32@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "mac-icon-128@1x.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "mac-icon-128@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "mac-icon-256@1x.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "mac-icon-256@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "mac-icon-512@1x.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "mac-icon-512@2x.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/src/scripts/injectpackage-env/main.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env -S pnpm tsx
2 |
3 | import { spawn } from 'child_process'
4 | import { readFileSync } from 'fs'
5 | import { parse as parseYaml } from 'yaml'
6 | import { join } from 'path'
7 | import packageJson from '../../../package.json'
8 |
9 | const lockfilePath = join(__dirname, '../../../pnpm-lock.yaml')
10 | const lockfileContent = readFileSync(lockfilePath, 'utf8')
11 | const lockfile = parseYaml(lockfileContent)
12 |
13 | // Parse pnpm-lock.yaml to get the resolved version of @opentelemetry/sdk-trace-web
14 | function getOtelSdkVersion(): string {
15 | try {
16 | // Look for the resolved version in the importers section
17 | const dependencies = lockfile?.importers?.['.']?.dependencies
18 | const otelSdkEntry = dependencies?.['@opentelemetry/sdk-trace-web']
19 |
20 | if (otelSdkEntry?.version) {
21 | return otelSdkEntry.version
22 | }
23 |
24 | // Fallback to hardcoded version if parsing fails
25 | console.warn('Could not parse @opentelemetry/sdk-trace-web version from pnpm-lock.yaml, using fallback')
26 | return '2.1.0'
27 | } catch (error) {
28 | console.warn('Error reading pnpm-lock.yaml:', error)
29 | return '2.1.0'
30 | }
31 | }
32 |
33 | process.env.PLASMO_PUBLIC_PACKAGE_VERSION = packageJson.version
34 | process.env.PLASMO_PUBLIC_PACKAGE_NAME = packageJson.name
35 | process.env.PLASMO_PUBLIC_OTEL_SDK_VERSION = getOtelSdkVersion()
36 |
37 | const cmd = spawn(process.argv.slice(2).join(" "), { shell: true });
38 |
39 | cmd.stdout.on('data', (data) => {
40 | process.stdout.write(`${data}`);
41 | });
42 |
43 | cmd.stderr.on('data', (data) => {
44 | process.stderr.write(`${data}`);
45 | });
46 |
--------------------------------------------------------------------------------
/src/storage/local/configuration/backend.ts:
--------------------------------------------------------------------------------
1 | import { assignPartial } from "~utils/generics"
2 |
3 | export type BackendConfigurationType = {
4 | matchPatterns: string[]
5 | traceCollectorUrl: string
6 | logCollectorUrl: string
7 | // metricsEnabled: boolean
8 | // metricCollectorUrl: string
9 | attributes: Map