Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apmbench: add protocol to loadgen config #52

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/apmbench/bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func newEventHandler(tb testing.TB, p string, l *rate.Limiter) *eventhandler.Han
RewriteIDs: loadgencfg.Config.RewriteIDs,
RewriteTimestamps: loadgencfg.Config.RewriteTimestamps,
Headers: loadgencfg.Config.Headers,
Protocol: loadgencfg.Config.Protocol,
})
if err != nil {
// panicing ensures that the error is reported
Expand Down
2 changes: 2 additions & 0 deletions internal/loadgen/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var Config struct {
RewriteTransactionNames bool
RewriteTransactionTypes bool
Headers map[string]string
Protocol string
}

type RateFlag struct {
Expand Down Expand Up @@ -112,6 +113,7 @@ func init() {
)
flag.Var(&Config.EventRate, "event-rate", "Event rate in format of {burst}/{interval}. For example, 200/5s, <= 0 values evaluate to Inf (default 0/s)")
flag.BoolVar(&Config.IgnoreErrors, "ignore-errors", false, "Ignore HTTP errors while sending events")
flag.StringVar(&Config.Protocol, "protocol", "apm/http", "One of: apm/http, otlp/http")

rewriteNames := map[string]*bool{
"service.name": &Config.RewriteServiceNames,
Expand Down
Loading