This file contains 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 | |
// writing repros is occasionally handy because in the course of doing | |
// so I discovered the bug in my own code that looked like a bug in | |
// gvisor | |
import ( | |
"encoding/hex" | |
"log" | |
"net" |
This file contains 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
#!/bin/bash | |
svc="SRECon" | |
# turns out the date doesn't matter much for this exercise since | |
# we don't show it | |
# but it is important for /finding/ these spans once you've sent them | |
# so pick a date/time earlier today while testing :) | |
talk_start="2022-03-14T20:00:00.00000Z" | |
talk_end="2022-03-14T20:40:00.00000Z" |
This file contains 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
receivers: | |
otlp: | |
protocols: | |
grpc: | |
endpoint: "0.0.0.0:4317" | |
# opentelemetry-ruby only supports http for now | |
http: | |
endpoint: "0.0.0.0:55681" | |
processors: |
This file contains 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
from opentelemetry import trace | |
from opentelemetry.sdk.trace import TracerProvider | |
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter | |
from opentelemetry.sdk.trace.export import BatchSpanProcessor | |
from opentelemetry import context | |
from opentelemetry.instrumentation.requests import RequestsInstrumentor | |
from opentelemetry.instrumentation.grpc import GrpcInstrumentorClient | |
from opentelemetry import propagate |
This file contains 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
otel-collector_1 | Span #2 | |
otel-collector_1 | Trace ID : f84421f9695c1cd40dd54239a39687a5 | |
otel-collector_1 | Parent ID : | |
otel-collector_1 | ID : aec1f44bad81b207 | |
otel-collector_1 | Name : dhcp.request | |
otel-collector_1 | Kind : SPAN_KIND_INTERNAL | |
otel-collector_1 | Start time : 2021-08-11 21:49:09.117334915 +0000 UTC | |
otel-collector_1 | End time : 2021-08-11 21:49:09.117486739 +0000 UTC | |
otel-collector_1 | Status code : STATUS_CODE_OK | |
otel-collector_1 | Status message : |
This file contains 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
#!/bin/bash | |
# start up my Arch machine | |
# root disk: | |
# dd if=/dev/zero of=root.img bs=1000000 count=4000 conv=sparse | |
# scratch disk is for moving data in and out without networking | |
# e.g. tar -xzvf /dev/vdb | |
# dd if=/dev/zero of=scratchdisk.img bs=1000000 count=2500 conv=sparse | |
data=$HOME/archbox |
This file contains 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
#!/bin/bash | |
# otel-cli-ideas.sh - some ideas I'm playing with for otel-cli to cover some | |
# use cases where manual spans or exec don't quite do the trick | |
# | |
# another cool outcome is you could run this without the collector in some | |
# cases without spamming your OTLP endpoint... | |
# | |
# I hope to OSS otel-cli under Apache 2 in early April 2021. | |
# maybe it could background itself and wait for events on a unix socket? |
This file contains 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
receivers: | |
otlp: | |
protocols: | |
grpc: | |
endpoint: "127.0.0.1:55680" | |
# opentelemetry-ruby only supports http for now | |
http: | |
endpoint: "127.0.0.1:55681" | |
processors: |
This file contains 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
#!/usr/bin/env ruby | |
# run the otel collector with otlp/http enabled and turn on debug logging | |
# so you can see it print spans as they go through... | |
# | |
# configuration: | |
# export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:55681 | |
# | |
# first iteration I thought I had an easy repro because I had set | |
# OTEL_RUBY_BSP_START_THREAD_ON_BOOT=false | |
# so don't do that :) It's almost never what you want. |
This file contains 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
#!/bin/bash | |
# start up my Arch machine | |
# for this to work I had to extract kernel & initramfs from the ISO | |
# which is a surprisingly a pain in the butt on OSX but easy enough | |
# to find on Google, tldr add 2K of zeroes to the front of the ISO | |
# then it'll mount just fine | |
# to make root disk: | |
# dd if=/dev/zero of=root.img conv=sparse bs=1000000 count=20000 |
NewerOlder