Configure the infrastack.ai Javascript SDK to suit your needs
@infrastack/otel
apiKey
option in the Infrastack.init
function or set the INFRASTACK_API_KEY
environment variable.
serviceName
option in the Infrastack.init
function or set the OTEL_SERVICE_NAME
environment variable.
If you do not provide a service name from either of the options, it will generate a random service name.
0.0.1
.
To set the service version, you can set the serviceVersion
option in the Infrastack.init
function or set the OTEL_SERVICE_VERSION
environment variable.
BatchSpanProcessor
for span exports.
Visit the Documentation OpenTelemetry - Picking the right span processor for more information.
To toggle development mode, you can set the developmentMode
option to true
in the Infrastack.init
function or set the INFRASTACK_DEVELOPMENT_MODE
environment variable to true
.
logsEnabled
option to false
in the Infrastack.init
function or set the INFRASTACK_LOGS_ENABLED
environment variable to false
.
tags
option in the Infrastack.init
function or set the INFRASTACK_TAGS
environment variable.
infrastack.ai
collector endpoint. However, it can be overriden to use a different endpoint.
To set the endpoint, you can set the endpoint
option in the Infrastack.init
function or set the OTEL_EXPORTER_OTLP_ENDPOINT
environment variable.
grpc
protocol. However, it can be overriden to use a different protocol.
To set the protocol, you can set the protocol
option in the Infrastack.init
function or set the OTEL_EXPORTER_OTLP_PROTOCOL
environment variable.
http
protocol to export the spans to the collector.
disabledInstrumentations
option in the Infrastack.init
function or set the INFRASTACK_DISABLED_INSTRUMENTATIONS
environment variable.
List of instrumentations can be found here.