Skip to content

Instantly share code, notes, and snippets.

View ying-jeanne's full-sized avatar
🖤

Ying WANG ying-jeanne

🖤
View GitHub Profile
@@
var span, ctx identifier
@@
-span, ctx = opentracing.StartSpanFromContext(...)
+ctx, span = trace.Tracer("").Start(...)
@@
var ctx, span identifier
@@
@ying-jeanne
ying-jeanne / main.go
Created April 11, 2022 09:17
An example of swagger go-client
package main
import (
"context"
"encoding/json"
"log"
"os"
"path/filepath"
go_client "github.com/grafana/grafana/pkg/api/docs/clients/go"
#!/bin/bash
graphite_cpu() {
local date=$(date -v$1S +%s)
echo "apps.prod.application1.requests.count $2 ${date}" | nc localhost 2103
echo "apps.prod.application2.requests.count $3 ${date}" | nc localhost 2103
echo "apps.prod.application3.requests.count $4 ${date}" | nc localhost 2103
echo "apps.test.application1.requests.count $5 ${date}" | nc localhost 2103
echo "apps.test.application2.requests.count $6 ${date}" | nc localhost 2103