aspecto.json
near your package.json
with the same options as above:options
objectdisableAspecto
DISABLE_ASPECTO
false
(aspecto enabled)env
NODE_ENV
process.env.NODE_ENV
aspectoAuth
ASPECTO_AUTH
aspecto.json
serviceName
OTEL_SERVICE_NAME
package.json
package.json
. For example: a service that runs in multiple "modes"serviceVersion
OTEL_SERVICE_VERSION
package.json
package.json
samplingRatio
ASPECTO_SAMPLING_RATIO
1.0
0.0
is no sampling, and 1.0
is sample all. Specific rules set via aspecto app takes precedence requireConfigForTraces
ASPECTO_REQUIRE_CONFIG_FOR_TRACES
false
true
, the SDK will not trace anything until remote sampling configuration arrives (few hundreds ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup.logger
logger: console
collectPayloads
ASPECTO_COLLECT_PAYLOADS
true
otlpCollectorEndpoint
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
https://otelcol-fast.aspecto.io/v1/trace
exportBatchSize
ASPECTO_EXPORT_BATCH_SIZE
100
exportBatchTimeoutMs
ASPECTO_EXPORT_BATCH_TIMEOUT_MS
1000
(1s)writeSystemLogs
false
true
, emit all log messages from Opentelemetry SDK to supplied logger if present, or to console if missingcustomZipkinEndpoint
sqsExtractContextPropagationFromPayload
ASPECTO_SQS_EXTRACT_CONTEXT_PROPAGATION_FROM_PAYLOAD
true
false
is a bit more performant as it turns off JSON parse on message payloadextractB3Context
ASPECTO_EXTRACT_B3_CONTEXT
false
true
when the service receives requests from another instrumented component that propagate context via B3 protocol multi or single header. For example: Envoy Proxy, Ambassador and IstioinjectB3ContextSingleHeader
ASPECTO_INJECT_B3_CONTEXT_SINGLE_HEADER
false
true
when the service send traffic to another instrumented component that propagate context via B3 single header protocolinjectB3ContextMultiHeader
ASPECTO_INJECT_B3_CONTEXT_MULTI_HEADER
false
true
when the service send traffic to another instrumented component that propagate context via B3 multi header protocol. For example: Envoy Proxy, IstioASPECTO_TRACE_EXPORT_JSON
to any value.DISABLE_ASPECTO
to any value, to disable Aspecto.
Affect lambda and GCF wrappers as well.
Useful when running unit tests, or as a simple kill switch.local
mode enabled. To activate live trace mode use local
option like so: