This repository was archived by the owner on Aug 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Concurrency support on recorder and config specification #176
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b1d0195
scope specification support, initial
tonyredondo dd102f5
Adds concurrency support
tonyredondo 3c7719c
comments
tonyredondo 403fb8c
Fixes spans counters
tonyredondo 514deb7
fix span counters
tonyredondo 958e9f8
mod changes
tonyredondo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,24 +3,27 @@ package env | |
| import "go.undefinedlabs.com/scopeagent/tags" | ||
|
|
||
| var ( | ||
| ScopeDsn = newStringEnvVar("", "SCOPE_DSN") | ||
| ScopeApiKey = newStringEnvVar("", "SCOPE_APIKEY") | ||
| ScopeApiEndpoint = newStringEnvVar("https://app.scope.dev", "SCOPE_API_ENDPOINT") | ||
| ScopeService = newStringEnvVar("default", "SCOPE_SERVICE") | ||
| ScopeRepository = newStringEnvVar("", "SCOPE_REPOSITORY") | ||
| ScopeCommitSha = newStringEnvVar("", "SCOPE_COMMIT_SHA") | ||
| ScopeBranch = newStringEnvVar("", "SCOPE_BRANCH") | ||
| ScopeSourceRoot = newStringEnvVar("", "SCOPE_SOURCE_ROOT") | ||
| ScopeLoggerRoot = newStringEnvVar("", "SCOPE_LOGGER_ROOT", "SCOPE_LOG_ROOT_PATH") | ||
| ScopeDebug = newBooleanEnvVar(false, "SCOPE_DEBUG") | ||
| ScopeTracerGlobal = newBooleanEnvVar(false, "SCOPE_TRACER_GLOBAL", "SCOPE_SET_GLOBAL_TRACER") | ||
| ScopeTestingMode = newBooleanEnvVar(false, "SCOPE_TESTING_MODE") | ||
| ScopeTestingFailRetries = newIntEnvVar(0, "SCOPE_TESTING_FAIL_RETRIES") | ||
| ScopeTestingPanicAsFail = newBooleanEnvVar(false, "SCOPE_TESTING_PANIC_AS_FAIL") | ||
| ScopeConfiguration = newSliceEnvVar([]string{tags.PlatformName, tags.PlatformArchitecture, tags.GoVersion}, "SCOPE_CONFIGURATION") | ||
| ScopeMetadata = newMapEnvVar(nil, "SCOPE_METADATA") | ||
| ScopeInstrumentationHttpPayloads = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_HTTP_PAYLOADS") | ||
| ScopeInstrumentationHttpStacktrace = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_HTTP_STACKTRACE") | ||
| ScopeInstrumentationDbStatementValues = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_DB_STATEMENT_VALUES") | ||
| ScopeInstrumentationDbStacktrace = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_DB_STACKTRACE") | ||
| ScopeDsn = newStringEnvVar("", "SCOPE_DSN") | ||
| ScopeApiKey = newStringEnvVar("", "SCOPE_APIKEY") | ||
| ScopeApiEndpoint = newStringEnvVar("https://app.scope.dev", "SCOPE_API_ENDPOINT") | ||
| ScopeService = newStringEnvVar("default", "SCOPE_SERVICE") | ||
| ScopeRepository = newStringEnvVar("", "SCOPE_REPOSITORY") | ||
| ScopeCommitSha = newStringEnvVar("", "SCOPE_COMMIT_SHA") | ||
| ScopeBranch = newStringEnvVar("", "SCOPE_BRANCH") | ||
| ScopeSourceRoot = newStringEnvVar("", "SCOPE_SOURCE_ROOT") | ||
| ScopeLoggerRoot = newStringEnvVar("", "SCOPE_LOGGER_ROOT", "SCOPE_LOG_ROOT_PATH") | ||
| ScopeDebug = newBooleanEnvVar(false, "SCOPE_DEBUG") | ||
| ScopeTracerGlobal = newBooleanEnvVar(false, "SCOPE_TRACER_GLOBAL", "SCOPE_SET_GLOBAL_TRACER") | ||
| ScopeTestingMode = newBooleanEnvVar(false, "SCOPE_TESTING_MODE") | ||
| ScopeTestingFailRetries = newIntEnvVar(0, "SCOPE_INSTRUMENTATION_TESTS_FRAMEWORKS_FAIL_RETRIES", "SCOPE_TESTING_FAIL_RETRIES") | ||
| ScopeTestingPanicAsFail = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_TESTS_FRAMEWORKS_PANIC_AS_FAIL", "SCOPE_TESTING_PANIC_AS_FAIL") | ||
| ScopeConfiguration = newSliceEnvVar([]string{tags.PlatformName, tags.PlatformArchitecture, tags.GoVersion}, "SCOPE_CONFIGURATION") | ||
| ScopeMetadata = newMapEnvVar(nil, "SCOPE_METADATA") | ||
| ScopeInstrumentationHttpPayloads = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_HTTP_PAYLOADS") | ||
| ScopeInstrumentationHttpStacktrace = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_HTTP_STACKTRACE") | ||
| ScopeInstrumentationDbStatementValues = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_DB_STATEMENT_VALUES") | ||
| ScopeInstrumentationDbStacktrace = newBooleanEnvVar(false, "SCOPE_INSTRUMENTATION_DB_STACKTRACE") | ||
| 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") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, we want "1" as concurrency level in Go?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?