module
Version:
v0.7.1
Opens a new window with list of versions in this module.
Published: Jul 31, 2023
License: Apache-2.0
Opens a new window with license information.
README
¶
sdk
WIP SDK from go-faster for instrumentation.
Packages
Package |
Description |
autometer |
Automatic OpenTelemetry MeterProvider from environment |
autotracer |
Automatic OpenTelemetry TracerProvider from environment |
profiler |
Explicit pprof routes |
zctx |
context.Context and tracing support for zap |
gold |
Golden files in tests |
app |
Automatic setup observability and run daemon |
Environment variables
Name |
Description |
Example |
Default |
OTEL_RESOURCE_ATTRIBUTES |
OTEL Resource attributes |
service.name=app |
|
OTEL_SERVICE_NAME |
OTEL Service name |
app |
unknown_service |
OTEL_EXPORTER_OTLP_PROTOCOL |
OTLP protocol to use |
http |
grpc |
OTEL_PROPAGATORS |
OTEL Propagators |
none |
tracecontext,baggage |
PPROF_ROUTES |
List of enabled pprof routes |
cmdline,profile |
See below |
OTEL_LOG_LEVEL |
Log level |
debug |
info |
METRICS_ADDR |
Address with metrics and pprof |
localhost:9464 |
Prometheus addr |
OTEL_METRICS_EXPORTER |
Metrics exporter to use |
prometheus |
none |
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL |
Metrics OTLP protocol to use |
http |
grpc |
OTEL_EXPORTER_PROMETHEUS_HOST |
Host of prometheus addr |
0.0.0.0 |
localhost |
OTEL_EXPORTER_PROMETHEUS_PORT |
Port of prometheus addr |
9090 |
9464 |
OTEL_TRACES_EXPORTER |
Traces exporter to use |
jaeger |
none |
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL |
Traces OTLP protocol to use |
http |
grpc |
OTEL_EXPORTER_JAEGER_AGENT_HOST |
Jaeger exporter host |
jaeger.svc.local |
localhost |
OTEL_EXPORTER_JAEGER_AGENT_PORT |
Jaeger exporter port |
6831 |
6831 |
Routes for pprof
List of enabled pprof routes
Name: PPROF_ROUTES
Default: profile,symbol,trace,goroutine,heap,threadcreate,block
TODO
- Use slog
- Support for short-lived tasks
- Metric, trace push
- No need for http listeners for profiling
- Pyroscope compat
Code coverage
Directories
¶
Package app implements OTEL, prometheus, graceful shutdown and other common application features for go-faster projects.
|
Package app implements OTEL, prometheus, graceful shutdown and other common application features for go-faster projects. |
Package autometer provides an OpenTelemetry MeterProvider creation function.
|
Package autometer provides an OpenTelemetry MeterProvider creation function. |
Package autotracer provides an OpenTelemetry TracerProvider creation function.
|
Package autotracer provides an OpenTelemetry TracerProvider creation function. |
Package gold implements golden files.
|
Package gold implements golden files. |
Package otelenv provides helpers for working with OTEL_RESOURCE_ATTRIBUTES.
|
Package otelenv provides helpers for working with OTEL_RESOURCE_ATTRIBUTES. |
Package profiler implements pprof routes.
|
Package profiler implements pprof routes. |
Package zctx is a context-aware zap logger.
|
Package zctx is a context-aware zap logger. |
Click to show internal directories.
Click to hide internal directories.