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
#!/bin/bash | |
# Script to add cf.is_htp_dataset calculated field to all datasets in the environment. | |
# Sets to true for HTP datasets: beekeeper, opamp-supervisor, primary-collector | |
# Sets to false for all other datasets. | |
# | |
# The API key is scoped to a specific environment, so no environment parameter needed. | |
# | |
# Required API key permissions: | |
# - "Manage Queries and Columns" (to create derived columns/calculated fields) | |
# - "Create Datasets" (to read/list datasets) |
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
{ | |
"body": "lalala, look at me", | |
"severity": "warn", | |
"user.id": "jessitron", | |
"url.path": "/silly", | |
"key": "G", | |
"library.name": "hny-tricks", | |
"library.version": "0.0.11", | |
} |
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
{ | |
"body": "lalala, look at me", | |
"level": "warn", | |
"user.id": "jessitron", | |
"url.path": "/silly", | |
"library.name": "hny-tricks", | |
"library.version": "0.0.7", | |
} |
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
{ | |
"trace.trace_id": "TRACE_ID", | |
"trace.span_id": "SPAN_ID", | |
"name": "hello there", | |
"library.name": "hny-tricks", | |
"duration_ms": 43, | |
"library.version": "0.0.6", | |
} |
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
#!/bin/bash | |
# create a derived column called 'dc.dataset' in each dataset, containing the name of the dataset. | |
# Then, query in Honeycomb: all datasets, count, group by dc.dataset | |
# and find out where they are! | |
# set -x | |
# Check if HONEYCOMB_API_KEY is set | |
if [ -z "$HONEYCOMB_API_KEY" ]; then |
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
#!/bin/sh | |
# do something with a version number, and then increment the version number in this script. | |
# Is this a good idea? No claims made. | |
set -e # exit on fail | |
set -x # print what you're doing | |
me=$0 # name of this script |
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
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 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
/* 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 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
{ | |
"resourceSpans": [ | |
{ | |
"resource": { | |
"attributes": [ | |
{ | |
"key": "service.name", | |
"value": { | |
"stringValue": "otel-test-pod" | |
} |
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
# 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" | |
} | |
} |
NewerOlder