https://github.com/mterhar/otel-go-batch ( https://www.honeycomb.io/blog/exotic-trace-shapes )
https://blog.bitdrift.io/post/observability-3-0
https://jeremymorrell.dev/blog/a-practitioners-guide-to-wide-events/
All events can be represented as structured logs, but not all structured logs are events. An event contains information about what it took for a service to perform a "unit of work". Treating an event as a "unit of work" lets you adjust what it means depending on the goals of the observer. An event is a conceptual abstraction and a structured log is one possible representation of that abstraction. I like the idea of a "Arbitrarily wide structured events" / "canonical log line" collecting all possibly relevant key-values like a lint roller collects dust. Putting all the important telemetry data in a single log line makes it easy for everyone to query for answers, without the need for complex joins or manual piecing of things together with request IDs, especially during production outages. Arbitrarily wide structured events that describe the request and its context, one event per request per service
-
https://www.honeycomb.io/blog/structured-events-basis-observability
-
An event is a conceptual abstraction and a structured log is one possible representation of that abstraction. The interesting part of the conversation is where to draw the lines around that abstraction; the technical implementation part is how to represent that event.
-
Explicit propagation requires explicitly passing the active context from function to function as an argument (Go).
For distributed context propagation, OpenTelemetry supports several protocols that define how to serialize and pass context data:
-
W3C trace context in
traceparent
header, for example,traceparent=00-84b54e9330faae5350f0dd8673c98146-279fa73bc935cc05-01
. -
https://github.com/AndrosHQ/lib-go canonical log lines with log/slog
-
https://github.com/uptrace/uptrace-go/blob/master/example/metrics/main.go
-
https://github.com/StevenACoffman/sesc-backend/tree/main/pkg/event
-
https://github.com/rushsteve1/fp/blob/2284460bcfe9729b4a3052eaf6e234310c6dd131/wide/wide.go#L24
-
https://github.com/instana/go-sensor/blob/main/w3ctrace/version.go#L156
-
https://web.archive.org/web/20190213162559/https://lightstep.com/blog/three-pillars-zero-answers-towards-new-scorecard-observability/ They’re a dead simple concept. In addition to normal logging made during a request, emit one, big, unified log line at the end that glues together all the key vitals together into one place:
canonical_log_line http_method=GET http_path=/v1/clusters duration=0.050 db_duration=0.045 db_num_queries=3 user=usr_123 status=200
-
https://github.com/smallstep/logging/blob/master/tracing/traceparent.go
-
https://codelabs.developers.google.com/codelabs/otel-cloudtrace#0
-
https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzap
-
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
https://signoz.io/guides/zap-logger/
https://github.com/GoogleCloudPlatform/microservices-demo
https://github.com/uptrace/opentelemetry-go-extra/tree/main/otelzap
Logging systems can’t afford to store data about every transaction anymore because the cost of those transactional logs is proportional to the number of microservices touched by an average transaction. Not to mention that the logs themselves are less useful (independent of cost) due to the analytical need to understand concurrency and causality in microservice transactions. So conventional logging isn’t sufficient in our brave new architectural world.
- name: End Docker Buildx
run: |
time_end=$(date +%Y-%m-%dT%H:%M:%S.%NZ)
if [ "$GITHUB_EVENT_NAME" = "repository_dispatch" ]; then
otel-cli span create \
--endpoint=${{ secrets.DYNATRACE_ENDPOINT }}/api/v2/otlp/v1/traces \
--otlp-headers="Authorization=Api-Token ${{ secrets.DYNATRACE_TOKEN}}" \
--service=workflow \
--name="Docker Build" \
--force-parent-span-id=${{ env.parent_span_id }} \
--start=${{ env.docker_time_start }} \
--end=$time_end \
--kind=internal \
--force-trace-id=${{ env.trace_id }} \
--status-code="ok" \
--status-description="Docker Built Successfully" \
--verbose
fi
echo "deploy_time_start=$(date +%Y-%m-%dT%H:%M:%S.%NZ)" >> $GITHUB_ENV