8 |
9 | Venator is a application for recording, viewing, and filtering logs and spans
10 | from programs instrumented with the Rust tracing crate or using OpenTelemetry.
11 | It is purpose-built for rapid local development.
12 |
13 |
14 |
15 |
16 |
17 | ## Installation
18 |
19 | ### With Pre-built Binaries:
20 |
21 | Binaries are pre-built and available in the [releases page](https://github.com/kmdreko/venator/releases) for:
22 | - Windows (x64)
23 | - MacOS (Intel, Apple silicon)
24 |
25 | ### With Cargo:
26 |
27 | Compiling and installing `venator` from source with Cargo (requires Rust 1.76 or
28 | newer):
29 |
30 | ```
31 | cargo install venator-app
32 | ```
33 |
34 | ## Usage
35 |
36 | ### Using OpenTelemetry:
37 |
38 | Configure your program's OpenTelemetry SDK to export logs and traces to
39 | `127.0.0.1:8362` (Venator's default listening port) and to use `grpc` or
40 | `http/protobuf`.
41 |
42 | ### Using Rust Tracing:
43 |
44 | In your instrumented program:
45 |
46 | ```toml
47 | [dependencies]
48 | venator = "1.1.0"
49 | ```
50 |
51 | ```rust
52 | use venator::Venator;
53 |
54 | Venator::default().install();
55 | ```
56 |
57 | See the [documentation](https://docs.rs/venator/latest/venator/) for more.
58 |
59 | ## Features
60 |
61 | Events can be viewed narrowed by timespan and filtered by attributes, level, and
62 | other properties. The table of records can include columns of custom properties.
63 | The graph shows the counts by level at each bar.
64 |
65 |
66 |
67 |
68 |
69 | Spans can likewise be narrowed by timespan and filter. A detail pane can show
70 | all the properties of selected events and spans. The graph shows spans layered
71 | hierarchically.
72 |
73 |
74 |
75 |
76 |
77 | Traces can be viewed that show both events and spans within a single execution.
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/docs/filter-syntax.md:
--------------------------------------------------------------------------------
1 | # Venator Filter Syntax
2 |
3 | The filter is composed of `property: value` predicates that an event or span
4 | must satisfy to be shown.
5 |
6 | Properties come in two kinds:
7 |
8 | - *inherent* properties start with `#` and correspond to values built-in to
9 | the instrumentation and reporting of events and spans. The available
10 | inherent properties are:
11 | - `#level`:
12 | - `#parent`:
13 | - `#trace`:
14 | - `#target`:
15 | - `#file`:
16 |
17 | - *attribute* properties start with `@` and are user-defined structured logging
18 | fields that can be provided on events and spans. Nested events and spans
19 | inheret the attributes of their parent span(s) and root unless overridden.
20 |
21 | Values can take a few different forms:
22 |
23 | - if the value matches `true` and `false` it will match boolean values as well
24 | as literal strings with those exact characters.
25 | - if the value can be parsed as an integer like `42` it will match integer and
26 | float values that equal the value as well as literal strings with those
27 | exact characters.
28 | - if the value can be parsed as a float like `6.09` or `-2.44e9` it will match
29 | float values that equal it as well as literal strings with those exact
30 | characters.
31 | - if the value starts and ends with `/` like `/[0-9a-f]{32}/` it will be parsed
32 | as a regex and will match string values satifying that regex.
33 | - if the value contains a `*` it will be interpretted as a wildcard (unless
34 | escaped like `\*`) and will match strings where `*` can satisfy any number
35 | of characters.
36 | - if the value starts and ends with `"` then it is interpretted literally
37 | (except `*`s still mean a wildcard) and will not try to parse other symbols
38 |
39 | Values can also have operators applied to them:
40 |
41 | - `!value` will match values that do __not__ satisfy that value (can have other
42 | operators as well)
43 | - `value` will match values greater than that value (lexicographical comparison
46 | for strings; numerical comparison for integers, floats, and booleans)
47 | - `<=value` will match values less than or equal to that value (lexicographical
48 | comparison for strings; numerical comparison for integers, floats, and
49 | booleans)
50 | - `>=value` will match values greater than or equal to that value (lexicographical
51 | comparison for strings; numerical comparison for integers, floats, and
52 | booleans)
53 | - `(value1 AND value2 ...)` will match values only if all are satisfied
54 | - `(value1 OR value2 ...)` will match values if any are satisfied
55 |
56 |
57 | ## FAQ
58 |
59 |
60 | ### How to filter for a value with spaces?
61 |
62 | You can surround a value with quotes `"` to include characters that would
63 | otherwise be misinterpretted - like spaces, `:`, `!`, and other operators:
64 |
65 | ```
66 | @name: "John Titor" @category: "decor:lighting"
67 | ```
68 |
69 | Note that quotes may be automatically removed when its not warranted and may
70 | be automatically added if a value was able to be parsed but includes special
71 | characters out of an abundance of clarity.
72 |
73 | This goes for attributes as well:
74 |
75 | ```
76 | @"first name": John @"category:name": lighting
77 | ```
78 |
79 |
80 | ### How to exclude a value?
81 |
82 | You can use `!` to negate a filter which will work on values:
83 |
84 | ```
85 | @name: !John
86 | ```
87 |
88 | It is worth noting however that the results will also include events or spans
89 | that do not have that property. To only get results that have the property
90 | set but are *not* a particular value, you can combine it with an "exists"
91 | filter:
92 |
93 | ```
94 | @name: (* AND !John)
95 | ```
96 |
97 |
98 | ### How to filter for a property that exists?
99 |
100 | A wildcard will typically only filter for values that are strings, however a
101 | bare `*` will include any value, so it can serve as an "exists" filter:
102 |
103 | ```
104 | @name: *
105 | ```
106 |
107 |
108 | ### How to filter for a range?
109 |
110 | The best way is to use an `AND` group with `>`/`>=` and `<`/`<=` comparison
111 | operators:
112 |
113 | ```
114 | #duration: (>1s AND <10s)
115 | ```
116 |
117 |
118 | ### How to filter for value that starts or ends with something?
119 |
120 | You can use wildcards at the end or beginning of a string value to get "starts
121 | with" or "ends with" behavior:
122 |
123 | ```
124 | @name: "John *" @message: "* items were found"
125 | ```
126 |
127 |
128 | ### How to filter for value in different properties?
129 |
130 | You can use an `(... OR ...)` grouping around property-value pairs to find
131 | entities that may satisfy one predicate or another:
132 |
133 | ```
134 | (@name: John OR @legacy_name: John)
135 | ```
136 |
137 |
138 | ### How to filter for a specific type of value?
139 |
140 | Not supported currently.
141 |
--------------------------------------------------------------------------------
/docs/images/icon-dark.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/images/icon-light.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/images/screenshot-demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/docs/images/screenshot-demo.gif
--------------------------------------------------------------------------------
/docs/images/screenshot-events.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/docs/images/screenshot-events.png
--------------------------------------------------------------------------------
/docs/images/screenshot-spans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/docs/images/screenshot-spans.png
--------------------------------------------------------------------------------
/docs/images/screenshot-traces.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/docs/images/screenshot-traces.png
--------------------------------------------------------------------------------
/docs/interface.md:
--------------------------------------------------------------------------------
1 | # Venator Interface
2 |
3 | The user interface is split into three meta regions:
4 | - the tab bar
5 | - the main screen
6 | - the status bar
7 |
8 |
9 | ## Tab Bar
10 |
11 | The tabs should be self-explanatory but I'll explain regardless. The app can
12 | have multiple "screens" open simulaneouosly; the most lit one is what is being
13 | shown and the unlit ones are backgrounded. You can switch to a tab by clicking
14 | on it. You can open a new tab by clicking one of the buttons on the right (one
15 | for an events screen, one for a spans screen) or by using the shortcut `CTRL+T`.
16 | You can close a tab by clicking on `X` when its active, or by middle-clicking.
17 | Hovering over a tab will show the screen type and full filter. More options are
18 | available via `View` in the menu and right-clicking a tab.
19 |
20 |
21 | ## Status Bar
22 |
23 | The status bar at the bottom of the screen shows information of the application
24 | overall.
25 |
26 | The bottom left shows the database file that is open (or the "default dataset"
27 | if launched by default) as well as if it is listening for connections and if so
28 | what address and port.
29 |
30 | The bottom right shows the running metrics. The first metric is the bytes per
31 | second being received from established connections. The next metric shows the
32 | number of connections currently established. The last metric shows the load on
33 | the underlying engine that is handling incomming data and responding to queries.
34 |
35 |
36 | ## Main Screen
37 |
38 | The main screen is where you can view events, spans, and other entities based on
39 | timeframe and filter. It is composed of a few key components:
40 | - the time controls
41 | - the filter input
42 | - the graph
43 | - the table
44 | - the details panel (collapsable)
45 |
46 |
47 | ### Time Controls
48 |
49 | These controls affect the timeframe that affects the graph and table results of
50 | the screen. It is split between the starting point and the duration of the time
51 | frame with an additional button for listening to live events.
52 |
53 | The starting point controls shows the currently set starting point and has
54 | buttons for shifting the starting point before or after in time. The main field
55 | can also be edited manually to set a specific time.
56 |
57 | The duration controls shows the currently set duration and has buttons for
58 | reducing or expanding the duration. The main field can also be edited manually
59 | to set a specific duration.
60 |
61 |
62 | ### Filter Input
63 |
64 | The filter input is where you can specify `property: value` predicates for
65 | narrowing down the events, spans, etc that are being shown. See [filter syntax](./filter-syntax.md)
66 | for details.
67 |
68 | An empty event or span screen will include a permanent `#level` filter for only
69 | showing entities at or above the specified log level. You can also hover and
70 | scroll on this predicate to increase or decrease the level.
71 |
72 | When editing the filter, any non-permanent predicates are undecorated and shown
73 | as a single text input. When hitting `Enter` or clicking off, the filter will be
74 | parsed and applied to the graph and table results. The predicates will be
75 | decorated based on their type (white for attributes, gray for inherent fields).
76 | The predicates will be highlighted in red if the value was invalid or the whole
77 | input will be highlighted red if there was a syntax error that meant the filter
78 | couldn't be properly split into predicates. Individual predicates can be right-
79 | clicked to copy or remove, or middle-clicked to remove them.
80 |
81 | Options in the table or details panel can add predicates to the filter.
82 |
83 |
84 | ### Graph
85 |
86 | The graph can take a few different forms based on the type of main screen. For
87 | events it will show bars of aggregated counts by log level. For spans it will
88 | show them individually spread across their timeframe stacked on top of eachother
89 | (up to 10 high). For traces it will show all spans and events stacked on top of
90 | eachother (squished to accomodate them all).
91 |
92 | Hovering your cursor over the graph will show the hovered timestamp in the top.
93 | Clicking and dragging will highlight a timeframe and zoom to it when released.
94 | You can also scroll on the graph to zoom in and out. Middle-click dragging will
95 | allow you to pan the timeframe left and right.
96 |
97 |
98 | ### Table
99 |
100 | The table shows the actual events or spans being queried by the filter and
101 | timeframe. By default it will show columns for the level, when it occurred
102 | (`#timestamp` for events, `#created_at` for spans) and a default column
103 | (`@message` for events, `#name` for spans). The timing column also includes a
104 | toggle for controlling the sort order.
105 |
106 | Each of the non-fixed columns have a `+` button in the header to create a new
107 | column. The column header can be edited to change the property which uses the
108 | same `#` and `@` syntax as the filter. You can also right-click on the header to
109 | access various options or middle-click to remove it.
110 |
111 | The table cells contain the value for the entity and property of the row and
112 | column. If a value does not exist, it will show as `---`. Clicking on a row will
113 | show or hide the details panel for that entity. You can also right-click the
114 | cell to access various options for that value or property.
115 |
116 |
117 | ### Details Panel
118 |
119 | This panel opens alongside the table and shows all information about the entity
120 | selected. The top of the panel shows the inherent properties along with a
121 | `#stack` property that can be expanded or collapsed on-click to show parent
122 | spans.
123 |
124 | The highlighted section shows the primary data for the entity (`@message` for
125 | events and `#name` for spans).
126 |
127 | The bottom shows all the attributes and their values. The far left icon will
128 | indicate where that value came from (a missing icon means it is directly on the
129 | entity, a span icon means it came from a parent span, and a resource icon means
130 | it was provided by the root resource). You can hover over this icon for details
131 | or the right-click will include a `copy * id` option when available. The
132 | right-click menu shows many options for adding to the filter or even adding a
133 | column to the table. An attribute value that is too long will be cut off, but
134 | you can toggle the `-` after the attribute name to expand it.
135 |
--------------------------------------------------------------------------------
/docs/licenses/Inter-License.txt:
--------------------------------------------------------------------------------
1 | Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | https://openfontlicense.org
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/docs/licenses/NotoSansMono-License.txt:
--------------------------------------------------------------------------------
1 | Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | https://openfontlicense.org
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/venator-app/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
--------------------------------------------------------------------------------
/venator-app/README.md:
--------------------------------------------------------------------------------
1 | The Venator GUI is made with Tauri and a SolidJS + Typescript frontend.
2 |
3 | Development instructions (Rust 1.76 or newer, npm 10.7 or newer):
4 |
5 | - navigate to `venator-app/` (this directory)
6 | - `npm i`
7 | - `npm run tauri dev`
8 |
--------------------------------------------------------------------------------
/venator-app/app-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/venator-app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Venator
9 |
10 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/venator-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "venator-app",
3 | "version": "1.0.3",
4 | "description": "",
5 | "type": "module",
6 | "scripts": {
7 | "start": "vite",
8 | "dev": "vite",
9 | "build": "vite build",
10 | "serve": "vite preview",
11 | "tauri": "tauri"
12 | },
13 | "license": "MIT",
14 | "dependencies": {
15 | "@tanstack/solid-virtual": "^3.13.0",
16 | "@tauri-apps/api": "^2.0.1",
17 | "@tauri-apps/plugin-clipboard-manager": "^2.0.0",
18 | "@tauri-apps/plugin-dialog": "^2.0.0",
19 | "@tauri-apps/plugin-fs": "^2.0.0",
20 | "solid-js": "^1.7.8"
21 | },
22 | "devDependencies": {
23 | "@tauri-apps/cli": "^2.0.1",
24 | "typescript": "^5.2.2",
25 | "vite": "^5.3.1",
26 | "vite-plugin-solid": "^2.8.0"
27 | }
28 | }
--------------------------------------------------------------------------------
/venator-app/src-tauri/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by Cargo
2 | # will have compiled files and executables
3 | /target/
4 |
5 | # Generated by Tauri
6 | # will have schema files for capabilities auto-completion
7 | /gen/schemas
8 |
9 |
10 | local.*
11 |
--------------------------------------------------------------------------------
/venator-app/src-tauri/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "venator-app"
3 | version = "1.0.3"
4 | edition = "2021"
5 | description = "A log and trace viewer for Rust tracing and OpenTelemetry"
6 | readme = "README.md"
7 | repository = "https://github.com/kmdreko/venator"
8 | license = "MIT"
9 | keywords = ["logging", "tracing", "opentelemetry", "profiling"]
10 | include = ["/src", "/build.rs", "/tauri.conf.json", "/icons", "/gen", "/capabilities", "/dist"]
11 |
12 | [[bin]]
13 | name = "venator"
14 | path = "src/main.rs"
15 |
16 | [build-dependencies]
17 | tauri-build = { version = "2.0.1", features = [] }
18 |
19 | [dependencies]
20 | anyhow = "1.0.95"
21 | axum = { version = "0.7.9", default-features = false, features = ["http1", "http2", "tokio"] }
22 | bincode = { version = "1.3.3", default-features = false }
23 | clap = { version = "4.5.20", features = ["derive"] }
24 | directories = "5.0.1"
25 | futures = { version = "0.3.31", default-features = false }
26 | http-body = "1.0.1"
27 | open = "5.3.0"
28 | opentelemetry-proto = { version = "0.27.0", features = ["gen-tonic-messages", "logs", "metrics", "trace"] }
29 | prost = "0.13.3"
30 | tauri = { version = "2.0.1", features = [] }
31 | tauri-plugin-clipboard-manager = "2.0.1"
32 | tauri-plugin-dialog = "2.0.1"
33 | tauri-plugin-fs = "2.0.1"
34 | serde = { version = "1.0.159", default-features = false, features = ["std", "derive"] }
35 | serde_json = "1"
36 | tokio = { version = "1.38.0", features = ["rt-multi-thread", "macros", "net"] }
37 | tokio-util = { version = "0.7.13", features = ["io"] }
38 | tonic = "0.12.3"
39 | tracing = "0.1.41"
40 | tracing-subscriber = { version = "0.3.19", features = ["json"] }
41 |
42 | venator-engine = { version = "0.4.1", features = ["persist"] }
43 |
44 | [features]
45 | default = ["custom-protocol"]
46 | # This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
47 | custom-protocol = ["tauri/custom-protocol"]
48 |
--------------------------------------------------------------------------------
/venator-app/src-tauri/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | The Venator application capable of recording, viewing, and filtering logs and
4 | spans from either Rust programs instrumented with the tracing crate or from
5 | programs that export OpenTelemetry data.
6 |
7 | ## Install with Cargo:
8 |
9 | ```
10 | cargo install venator-app
11 | ```
12 |
13 | Run:
14 |
15 | ```
16 | venator
17 | ```
18 |
--------------------------------------------------------------------------------
/venator-app/src-tauri/build.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | tauri_build::build();
3 | }
4 |
--------------------------------------------------------------------------------
/venator-app/src-tauri/capabilities/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "identifier": "main-capability",
3 | "description": "Capability for the main window",
4 | "windows": [
5 | "main"
6 | ],
7 | "permissions": [
8 | "core:path:default",
9 | "core:event:default",
10 | "core:window:default",
11 | "core:app:default",
12 | "core:resources:default",
13 | "core:menu:default",
14 | "core:tray:default",
15 | "core:window:allow-set-title",
16 | "clipboard-manager:allow-write-text",
17 | "dialog:default",
18 | "fs:allow-write-text-file"
19 | ]
20 | }
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/128x128.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/128x128@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/32x32.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square107x107Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square107x107Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square142x142Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square142x142Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square150x150Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square150x150Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square284x284Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square284x284Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square30x30Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square30x30Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square310x310Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square310x310Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square44x44Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square44x44Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square71x71Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square71x71Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/Square89x89Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/Square89x89Logo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/StoreLogo.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/icon.icns
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/icon.ico
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/icon.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-20x20@1x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-20x20@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-20x20@2x-1.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-20x20@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-20x20@3x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-29x29@1x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-29x29@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-29x29@2x-1.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-29x29@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-29x29@3x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-40x40@1x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-40x40@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-40x40@2x-1.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-40x40@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-40x40@3x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-60x60@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-60x60@3x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-76x76@1x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-76x76@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmdreko/venator/cfaee42487d3d53bfd762088761e68da37720f82/venator-app/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/venator-app/src-tauri/src/ingress/mod.rs:
--------------------------------------------------------------------------------
1 | use std::collections::HashSet;
2 | use std::pin::Pin;
3 | use std::sync::atomic::{AtomicUsize, Ordering};
4 | use std::sync::{Arc, Mutex, OnceLock};
5 | use std::task::{Context, Poll};
6 | use std::time::Instant;
7 |
8 | use axum::body::{Body, Bytes, HttpBody};
9 | use axum::extract::{Request, State};
10 | use axum::middleware::{from_fn_with_state, Next};
11 | use axum::response::Response;
12 | use axum::routing::post;
13 | use axum::BoxError;
14 | use http_body::Frame;
15 | use tokio::net::TcpListener;
16 | use tonic::service::Routes;
17 |
18 | use venator_engine::engine::AsyncEngine;
19 |
20 | mod otel;
21 | mod tracing;
22 |
23 | pub(crate) struct IngressState {
24 | bind: String,
25 | error: OnceLock,
26 |
27 | engine: AsyncEngine,
28 |
29 | last_check: Mutex,
30 | num_bytes: AtomicUsize,
31 |
32 | // Only one tracing instance for a given ID is allowed at a time, so this
33 | // keeps track of those that are connected.
34 | tracing_instances: Mutex>,
35 | }
36 |
37 | impl IngressState {
38 | fn new(engine: AsyncEngine, bind: String) -> IngressState {
39 | IngressState {
40 | bind,
41 | error: OnceLock::new(),
42 | engine,
43 | last_check: Mutex::new(Instant::now()),
44 | num_bytes: AtomicUsize::new(0),
45 | tracing_instances: Mutex::new(HashSet::new()),
46 | }
47 | }
48 |
49 | fn set_error(&self, error: String) {
50 | let _ = self.error.set(error);
51 | }
52 |
53 | pub(crate) fn get_status(&self) -> (String, Option) {
54 | if let Some(err) = self.error.get() {
55 | let msg = format!("not listening on {}", self.bind);
56 | let err = err.to_string();
57 |
58 | (msg, Some(err))
59 | } else {
60 | let msg = format!("listening on {}", self.bind);
61 |
62 | (msg, None)
63 | }
64 | }
65 |
66 | pub(crate) fn get_and_reset_metrics(&self) -> (usize, f64) {
67 | let now = Instant::now();
68 | let last = std::mem::replace(
69 | &mut *self.last_check.lock().unwrap_or_else(|p| p.into_inner()),
70 | now,
71 | );
72 | let elapsed = (now - last).as_secs_f64();
73 |
74 | let num_bytes = self.num_bytes.swap(0, Ordering::Relaxed);
75 |
76 | (num_bytes, elapsed)
77 | }
78 | }
79 |
80 | struct IngressBody {
81 | state: Arc,
82 | inner: B,
83 | }
84 |
85 | impl IngressBody {
86 | fn wrap(state: Arc, inner: B) -> Body
87 | where
88 | B: HttpBody + Unpin + Send + 'static,
89 | B::Error: Into,
90 | {
91 | Body::new(IngressBody { state, inner })
92 | }
93 | }
94 |
95 | impl HttpBody for IngressBody
96 | where
97 | B: HttpBody + Unpin,
98 | {
99 | type Data = B::Data;
100 | type Error = B::Error;
101 |
102 | fn poll_frame(
103 | mut self: Pin<&mut Self>,
104 | ctx: &mut Context<'_>,
105 | ) -> Poll