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
exporters: | |
otlp: | |
endpoint: api.honeycomb.io:443 | |
headers: | |
x-honeycomb-team: ${HONEYCOMB_API_KEY} | |
otlp/logging: | |
endpoint: api.honeycomb.io:443 | |
headers: | |
x-honeycomb-dataset: all-the-logs | |
x-honeycomb-team: ${HONEYCOMB_API_KEY} |
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
{ ... | |
"dependencies": { | |
"@grpc/grpc-js": "^1.5.7", | |
"@opentelemetry/api": "^1.1.0", | |
"@opentelemetry/core": "^1.1.1", | |
"@opentelemetry/exporter-trace-otlp-grpc": "^0.27.0", | |
"@opentelemetry/instrumentation": "^0.27.0", | |
"@opentelemetry/instrumentation-express": "^0.28.0", | |
"@opentelemetry/instrumentation-http": "^0.27.0", | |
"@opentelemetry/resources": "^1.1.1", |
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
/* I read the docs on getting started with Jest and TypeScript, and fuck it, I just want to run some code */ | |
import { context, Context, propagation, Baggage, BaggageEntry } from "@opentelemetry/api"; | |
// I don't feel like getting TypeScript to realize it has the Node assert method in scope | |
function assert(test: boolean) { | |
if (!test) { | |
throw new Error(); | |
} | |
} |
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
{ | |
"resourceSpans": [ | |
{ | |
"resource": { | |
"attributes": [ | |
{ | |
"key": "service.name", | |
"value": { | |
"stringValue": "otel-test-pod" | |
} |
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
# This bucket is for putting ALB logs into | |
# If the bucket already exists, add it to your state like this: | |
# terraform import aws_s3_bucket.alb_log_bucket otel-demo-alb-access-logs | |
resource "aws_s3_bucket" "alb_log_bucket" { | |
bucket = "otel-demo-alb-access-logs" | |
tags = { | |
Notes = "debug 502s from the collector endpoint" | |
} | |
} |
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
import { onFID, onLCP, onCLS, onINP, onTTFB } from 'web-vitals'; // you'll need to install this | |
import { InstrumentationBase, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation'; | |
import { trace, context } from '@opentelemetry/api'; | |
import { hrTime } from '@opentelemetry/core'; | |
export class WebVitalsInstrumentation extends InstrumentationBase { | |
constructor() { | |
super('web-vitals-instrumentation', 'v0.1.0'); | |
} | |
protected init(): void | InstrumentationModuleDefinition<any> | InstrumentationModuleDefinition<any>[] { |
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
mode: deployment | |
config: | |
exporters: | |
otlp/honeycomb: | |
endpoint: api.honeycomb.io:443 | |
headers: | |
"x-honeycomb-team": YOUR-HONEYCOMB-API-KEY-HERE | |
logging: | |
loglevel: debug |
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
You're sitting there and | |
all the sudden something comes to you and everything stops | |
You look down at no point in particular | |
but then the music is thrumming in your ears and | |
you see these colors come at the edge of your vision | |
red and yellow and blue, focusing in on them | |
If you can't stop it because you don't want to lose it | |
and you know that there's something there | |
Your vision blurs a bit and it becomes | |
this blackness in front of you |
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
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match { | |
case null => Array() | |
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent) | |
case _ => urlses(cl.getParent) | |
} | |
val urls = urlses(getClass.getClassLoader) | |
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n") |
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
<# | |
.Synopsis | |
STDERR strings get wrapped in an ErrorRecord. Unwrap those back into strings. | |
#> | |
function Convert-StderrString { | |
# Why can this not be an advanced function with [CmdletBinding()] ? | |
# Somehow it doesn't work if I put that in. | |
NewerOlder