Skip to content

Instantly share code, notes, and snippets.

Chris Stockton cstockton

Block or report user

Report or block cstockton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View opentelemetry.md

TLDR, I want to propose / have a conversation around two things:

  1. Create a protocol / wire / some form of structural definition for distributed tracing. I urge the project owners to please reconsider having the libraries be the specification. I should not have to import an SDK to participate in distributed tracing, I should only need to be a cooperative client able to produce the data in the format agreed upon.
  2. The protocol / specification is designed to be 100% stateless. For lack of better words "eventual causality", I should know which set of spans are open and there should not be a consequence to a span which never was closed. Leave it to visualization and tooling to iron through the edge cases. Tracing is about observation across systems, a failed transaction, seg fault, crashing program, etc should not lose all the data that led up to that event as it does in the implementations I've used today (due to buffering log records and hanging onto unfinished spans in memory).

Where could I find more i

View logger.go
type contextKey struct{}
// FromContext returns the current zap logger from the given context, or
// the default global logger (by calling zap.L()) otherwise.
func FromContext(ctx context.Context) *zap.Logger {
if v, ok := ctx.Value(contextKey{}).(*zap.Logger); ok {
return v
}
return zap.L()
View slack-issue.md

Given a block with a static_select as declared below:

{
  "type": "section",
  "text": { ... },
  "accessory": {
    "type": "static_select",
    "placeholder": { "type": "plain_text", "text": "Group1 - Foo" },
    "option_groups": [
View format.go
package er
import (
"fmt"
"io"
"runtime"
"unicode/utf8"
"github.com/cstockton/er/internal/errutil"
"github.com/cstockton/er/internal/strutil"
View pyenv.sh
# Lang - Python (pyenv)
#
# $ git clone -C /ws/lang https://github.com/pyenv/pyenv
# $ # uncomment deb-src sources for python /etc/apt/sources.list
# $ apt-get update && apt-get build-dep python{2.7,3,3.7}
# $ pyenv install 2.7.15
# $ pyenv install 3.7.0
# $ pyenv versions
# > * system (set by /ws/lang/pyenv/version)
View del_add_get_test.go
package deletetest
import (
"bytes"
"context"
"io"
"net"
"testing"
"time"
View delete_traffic_swings_test.go
package deletetest
import (
"context"
"encoding/json"
"io"
"net"
"testing"
"time"
View deletetest_test.go
package deletetest
import (
"context"
"encoding/json"
"io"
"testing"
"time"
gobgpapi "github.com/osrg/gobgp/api"
View pltr-onering.md
.../github.com/pltr$ mkdir $GOPATH/src/github.com/pltr
.../github.com/pltr$ cd $GOPATH/src/github.com/pltr
.../github.com/pltr$ git clone git@github.com:pltr/onering.git
Cloning into 'onering'...
remote: Counting objects: 251, done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 251 (delta 158), reused 186 (delta 94), pack-reused 0
Receiving objects: 100% (251/251), 40.88 KiB | 0 bytes/s, done.
Resolving deltas: 100% (158/158), done.
View wgo.rc
function _alias_wgo() {
W_PROG=$1
W_ARGS="${@:2}"
W_WATCH="${W_WATCH:-.}"
W_EXT="${W_EXT:-py|go|tpl|sh|md|txt}"
W_IGNORE="${W_IGNORE:-vendor,envs,log,.git}"
# look for go package
go list >/dev/null 2>&1 && {
W_PROG="go"
You can’t perform that action at this time.