Skip to content

Instantly share code, notes, and snippets.

View trevorwhitney's full-sized avatar

Trevor Whitney trevorwhitney

View GitHub Profile
@trevorwhitney
trevorwhitney / logs.txt
Created October 8, 2024 21:02
dap logs
[ DEBUG ] 2024-10-08T14:38:50Z-0600 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:1229 ] "Starting debug adapter server executable" {
args = { "dap", "-l", "127.0.0.1:51432", "--log", "--log-output=dap,debugger" },
command = "dlv",
detached = true
}
[ DEBUG ] 2024-10-08T14:38:50Z-0600 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:1362 ] "Debug adapter server executable started, listening on 51432"
[ DEBUG ] 2024-10-08T14:38:50Z-0600 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:1366 ] "Connecting to debug adapter" {
executable = {
args = { "dap", "-l", "127.0.0.1:51432", "--log", "--log-output=dap,debugger" },
command = "dlv",
@trevorwhitney
trevorwhitney / logs.txt
Last active October 8, 2024 21:02
nvim-dap logs
[debug-adapter stderr] 2024-10-08T14:38:50-06:00 debug layer=dap DAP connection 1 started
2024-10-08T14:38:50-06:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"neovim","clientName":"neovim","adapterID":"nvim-dap","locale":"en_US.UTF-8","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsRunInTerminalRequest":true,"supportsProgressReporting":true,"supportsStartDebuggingRequest":true}}
2024-10-08T14:38:50-06:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"suppo
@trevorwhitney
trevorwhitney / loki-nginx.conf
Created January 28, 2022 18:18
nginx conf for loki simple scalable deployment
server {
listen 8080;
location = / {
return 200 'OK';
auth_basic off;
}
location = /api/prom/push {
proxy_pass http://<WRITE_IP>:3100$request_uri;
@trevorwhitney
trevorwhitney / go.mod
Created April 19, 2021 16:20
coc.nvim refactor bug
module example.com/go
go 1.15
@trevorwhitney
trevorwhitney / shutup-maven.sh
Created April 13, 2020 14:18
settings needed to quiet maven down
export LOG_LEVEL=off │[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ core-model-db ---
export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.event.ExecutionEventLogger=info -Dorg.slf4j.simpleLogger.d│[INFO]
efaultLogLevel=warn"
@trevorwhitney
trevorwhitney / cloudwatch_logs.md
Created January 14, 2020 18:56
Comparison of options to get CloudWatch logs into Sumo logic
  • Set up a syslog endpoint and modify the logger in our lambdas with an additional appender
    • This will only work for executables we control (ie. we could get lambda logs but not API gateway logs)
    • We could publish to this syslog endpoint locally to test it
    • We could have different syslog endpoints for dev vs prod and could provide the correct address via env vars (I think)
  • Get logs using a collector script
    • Not recommended by sumo logic
    • Best for small data volumes
    • Does not compress logs before sending to sumo logic
    • I don't understand where this script will run, maybe an EC2 instance?
  • Get logs using an Amazon Kinesis stream
@trevorwhitney
trevorwhitney / regular-expressions.md
Created October 24, 2019 18:37
Regular expressions resources
@trevorwhitney
trevorwhitney / debugging-reactor-applications.md
Created October 11, 2019 16:27
Resources for debugging reactor applications
@trevorwhitney
trevorwhitney / build.gradle
Created September 11, 2019 15:50
abstracting gradle plugin version across multiple files
//https://medium.com/@StefMa/its-time-to-ditch-the-buildscript-block-a1ab12e0d9ce
pluginManagement {
repositories { ... }
eachPlugin {
if (requested.id.id.startsWith("com.android")) {
useModule("com.android.tools.build:gradle:3.1.1")
}
if (requested.id.id.startsWith("org.jetbrains.kotlin")) {
useVersion("1.2.31")
}