-
Notifications
You must be signed in to change notification settings - Fork 5
Concurrency support on recorder and config specification #176
Conversation
ScopeInstrumentationDbStatementValues = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_DB_STATEMENT_VALUES") | ||
ScopeTracerDispatcherHealthcheckFrequency = newIntEnvVar(60000, "SCOPE_TRACER_DISPATCHER_HEALTHCHECK_FRECUENCY") | ||
ScopeTracerDispatcherHealthcheckFrequencyInTestMode = newIntEnvVar(1000, "SCOPE_TRACER_DISPATCHER_HEALTHCHECK_FRECUENCY_IN_TESTMODE") | ||
ScopeTracerDispatcherConcurrencyLevel = newIntEnvVar(1, "SCOPE_TRACER_DISPATCHER_CONCURRENCY_LEVEL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, we want "1" as concurrency level in Go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless we decide new defaults for this setting? that is the default in .NET too
r.url = agent.getUrl("api/agent/ingest") | ||
r.client = &http.Client{} | ||
r.stats = &RecorderStats{} | ||
r.s = semaphore.NewWeighted(int64(r.concurrencyLevel)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use a fixed pool of go routines that read from a channel? Like https://gobyexample.com/worker-pools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found easier to implement (less code modification) with a semaphore... But yeah we can do it also with two channels... Do you prefer with a channel implementation?
This PR was superseed by #199 |
Closes #173
This
PR
adds support for concurrency levels in the recorder, following the configuration specification, also adds some other missing keys from the configuration.Examples: