goapm
is a toolkit for monitoring and observability of golang applications. It provides a set of libraries that are wrapped around opentelemetry
.
- Components support
opentelemetry
- sql.DB
- gorm.DB
- RedisV6
- RedisV9
- HTTP
- Gin
- GRPC Server
- GRPC Client
- Metrics
- AutoPProf
- APM
- RotateLog
processors:
batch:
tail_sampling:
decision_wait: 5s
num_traces: 50000
expected_new_traces_per_sec: 1
policies:
[
{
name: "pinned-always-sample",
type: boolean_attribute,
boolean_attribute: { key: pinned, value: true },
},
{
name: "error-always-sample",
type: boolean_attribute,
boolean_attribute: { key: error, value: true },
},
{
name: "slowsql-always-sample",
type: boolean_attribute,
boolean_attribute: { key: slowsql, value: true },
},
{
name: "longtx-always-sample",
type: boolean_attribute,
boolean_attribute: { key: longtx, value: true },
},
{
name: http-slow,
type: numeric_attribute,
numeric_attribute:
{
key: http.duration_ms,
min_value: 1000,
max_value: 9223372036854775807,
},
},
{
name: http-status-error,
type: numeric_attribute,
numeric_attribute:
{ key: http.status_code, min_value: 500, max_value: 599 },
},
{
name: grpc-slow,
type: numeric_attribute,
numeric_attribute:
{
key: grpc.duration_ms,
min_value: 1000,
max_value: 9223372036854775807,
},
},
]
filter/ottl:
error_mode: ignore
traces:
span:
- 'attributes["drop"] == true'