This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "encoding/base64" | |
| "encoding/json" | |
| "log" | |
| "net/http" | |
| "os" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // go:build go1.20 | |
| package httpmetrics | |
| import ( | |
| "net/http" | |
| "strconv" | |
| "strings" | |
| "time" | |
| "github.com/DataDog/datadog-go/v5/statsd" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "HTTP Golden Signals - Gin API", | |
| "description": "Golden Signals (latência, tráfego, erros, saturação, apdex) para serviços HTTP instrumentados com Gin + Datadog (dd-trace-go v2 + datadog-go v5).", | |
| "layout_type": "ordered", | |
| "is_read_only": false, | |
| "notify_list": [], | |
| "reflow_type": "auto", | |
| "template_variables": [ | |
| { "name": "service", "prefix": "service", "default": "my-gin-api" }, | |
| { "name": "env", "prefix": "env", "default": "perf" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "os" | |
| "strconv" | |
| "strings" | |
| "sync/atomic" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hourglass | |
| import "math" | |
| func Sum(arr [][]int) int { | |
| a, b, c, d, bigger := -1, 0, 1, 0, math.MinInt32 | |
| for h := 0; h < 4; h++ { | |
| for v := 0; v < 4; v++ { | |
| a, b, c, d = a+1, b+1, c+1, d+1 |