Skip to content

Commit

Permalink
adjust telemtry
Browse files Browse the repository at this point in the history
  • Loading branch information
agrinman committed May 14, 2021
1 parent 4f94c99 commit c688277
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
./target
!./target/x86_64-unknown-linux-musl/release/tunnelto_server
!./target/release/tunnelto_server
.env
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
tunnelto_server
!tunnelto_server/
.env
tunnelto_proxy/
tunnelto_proxy/
.idea/
101 changes: 101 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'tunnelto_lib'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=tunnelto_lib"
],
"filter": {
"name": "tunnelto_lib",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'tunnelto'",
"cargo": {
"args": [
"build",
"--bin=tunnelto",
"--package=tunnelto"
],
"filter": {
"name": "tunnelto",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'tunnelto'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=tunnelto",
"--package=tunnelto"
],
"filter": {
"name": "tunnelto",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'tunnelto_server'",
"cargo": {
"args": [
"build",
"--bin=tunnelto_server",
"--package=tunnelto_server"
],
"filter": {
"name": "tunnelto_server",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'tunnelto_server'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=tunnelto_server",
"--package=tunnelto_server"
],
"filter": {
"name": "tunnelto_server",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
29 changes: 29 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cargo",
"command": "build",
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "cargo build"
},
{
"type": "cargo",
"command": "check",
"args": [
"--all"
],
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "cargo check"
}
]
}
2 changes: 1 addition & 1 deletion musl_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker run -v "cargo-cache:$HOME/.cargo" -v "$PWD:/volume" --rm -it clux/muslrust:stable cargo build --bin tunnelto_server --release
docker run -v "cargo-cache:$HOME/.cargo/" -v "$PWD:/volume" --rm -it clux/muslrust:stable cargo build --bin tunnelto_server --release

8 changes: 7 additions & 1 deletion tunnelto_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ async fn main() {
dataset: "t2-service".to_string(),
..libhoney::client::Options::default()
},
transmission_options: libhoney::transmission::Options::default(),
transmission_options: libhoney::transmission::Options {
max_batch_size: 50,
max_concurrent_batches: 10,
batch_timeout: std::time::Duration::from_millis(1000),
pending_work_capacity: 5_000,
user_agent_addition: None,
},
};

let telemetry_layer =
Expand Down

0 comments on commit c688277

Please sign in to comment.