Configurable Settings - .NET Distributed Applications on Linux
- Overview
- Configurable Settings
Overview
vFunction Distributed Applications use the .NET Auto-instrumentation OpenTelemetry Agent to generate traces sent to the vFunction Server for Analysis. The OpenTelemetry Agent accepts Environment Variables to set configurable settings for the Agent.
If sending OpenTelemetry Traces only to the vFunction Server, these Environment Variables can be used to define the vFunction Server as the Endpoint for Traces and to eliminate all other types of unneeded OpenTelemetry traffic. In this scenario, all OpenTelemetry configurable settings are defined alongside the running application.
Alternatively, vFunction can be one of multiple OpenTelemetry vendors that receive information from the OpenTelemetry Agent. In this scenario, an OpenTelemetry Collector can be used to define some OpenTelemetry configurable settings and there are very few configurable settings to set alongside the running application.
No OpenTelemetry Collector
- Required Agent Settings with no OpenTelemetry Collector
- Optional Agent Settings with no OpenTelemetry Collector
Required Agent Settings with no Collector
How to apply changes to the Required Agent Settings
Environment- or Process-level Environment Variables can be used for the Configurable Settings of the OpenTelemetry Agent. The addition of or changes to these Environment Variables will be picked up when the .NET Application is restarted.
Required Fields
Quick links to specific required fields:
Explanations of each required field:
|
Full path to OpenTelemetry.AutoInstrumentation.Native.so such as in /opt/otel/linux-glibc-x64/ |
|
|
{918728DD-259F-4A6A-AC2B-B85E1B658318} |
|
|
0 or 1 |
|
|
https://vfunction.mycompany.com/api/unauth/otlp |
|
|
X-VF-APP=e1e1b85d-0000-0000-0000-aeced0597832 |
|
Sample Environment Variables used during the Application’s Startup
export CORECLR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}"
export CORECLR_PROFILER_PATH="/opt/otel/linux-glibc-x64/OpenTelemetry.AutoInstrumentation.Native.so"
export CORECLR_ENABLE_PROFILING=1
export OTEL_EXPORTER_OTLP_ENDPOINT="https://vfunction.mycompany.com/api/unauth/otlp"
export OTEL_EXPORTER_OTLP_HEADERS="X-VF-APP=e1e1b85d-0000-0000-0000-aeced0597832"
dotnet run
Optional Agent Settings with no Collector
A full list of configurable settings can be accessed on the OpenTelemetry website. The list below pertain to how vFunction uses the OpenTelemetry Agent.
Quick links to all optional fields:
- DOTNET_ADDITIONAL_DEPS
- DOTNET_SHARED_STORE
- DOTNET_STARTUP_HOOKS
- OTEL_BSP_SCHEDULE_DELAY
- OTEL_BSP_EXPORT_TIMEOUT
- OTEL_BSP_MAX_QUEUE_SIZE
- OTEL_BSP_MAX_EXPORT_BATCH_SIZE
- OTEL_DOTNET_AUTO_HOME
- OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES
- OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED
- OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT
- OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT
- OTEL_EXPORTER_OTLP_CERTIFICATE
- OTEL_EXPORTER_OTLP_HEADERS
- OTEL_EXPORTER_OTLP_PROTOCOL
- OTEL_EXPORTER_OTLP_TIMEOUT
- OTEL_LOG_LEVEL
- OTEL_LOGS_EXPORTER
- OTEL_METRICS_EXPORTER
- OTEL_SERVICE_NAME
- OTEL_TRACES_EXPORTER
Explanations of each optional field:
|
$INSTALL_DIR/AdditionalDeps |
|
|
#INSTALL_DIR/store |
|
|
$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll |
|
|
2000 |
|
|
60000 |
|
|
4096 |
|
|
1024 |
|
|
$INSTALL_DIR |
|
|
/opt/app/reservedProcess |
|
|
true |
|
|
true |
|
|
true |
|
|
/opt/app/ca-cert.pem |
|
|
X-VF-TAG=qa |
|
|
http/protobuf |
|
|
5000 |
|
|
debug |
|
|
none |
|
|
none |
|
|
|
|
|
otlp |
|
Using an OpenTelemetry Collector
Required Agent Settings with an OpenTelemetry Collector
- How to apply changes to the Required Agent Settings
- Required Fields
- Sample Environment Variables used during the Application’s Startup
How to apply changes to the Required Agent Settings
Environment- or Process-level Environment Variables can be used for the Configurable Settings of the OpenTelemetry Agent. The addition of or changes to these Environment Variables will be picked up when the .NET Application is restarted.
Required Fields
Quick links to specific required fields:
Explanations of each required field:
|
Full path to OpenTelemetry.AutoInstrumentation.Native.so such as in /opt/otel/linux-glibc-x64/ |
|
|
{918728DD-259F-4A6A-AC2B-B85E1B658318} |
|
|
0 or 1 |
|
|
http://otelcollector.mycompany.com:4318 |
|
Sample Environment Variables used during the Application’s Startup
export CORECLR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}"
export CORECLR_PROFILER_PATH="/opt/otel/linux-glibc-x64/OpenTelemetry.AutoInstrumentation.Native.so"
export CORECLR_ENABLE_PROFILING=1
export OTEL_EXPORTER_OTLP_ENDPOINT="http://otelcollector.mycompany.com:4318"
dotnet run
Optional Agent Settings with an OpenTelemetry Collector
A full list of configurable settings can be accessed on the OpenTelemetry website. The list below pertain to how vFunction uses the OpenTelemetry Agent.
Quick links to all optional fields:
- DOTNET_ADDITIONAL_DEPS
- DOTNET_SHARED_STORE
- DOTNET_STARTUP_HOOKS
- OTEL_BSP_SCHEDULE_DELAY
- OTEL_BSP_EXPORT_TIMEOUT
- OTEL_BSP_MAX_QUEUE_SIZE
- OTEL_BSP_MAX_EXPORT_BATCH_SIZE
- OTEL_DOTNET_AUTO_HOME
- OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES
- OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED
- OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT
- OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT
- OTEL_EXPORTER_OTLP_CERTIFICATE
- OTEL_EXPORTER_OTLP_HEADERS
- OTEL_EXPORTER_OTLP_PROTOCOL
- OTEL_EXPORTER_OTLP_TIMEOUT
- OTEL_LOG_LEVEL
- OTEL_LOGS_EXPORTER
- OTEL_METRICS_EXPORTER
- OTEL_SERVICE_NAME
- OTEL_TRACES_EXPORTER
Explanations of each optional field:
|
$INSTALL_DIR/AdditionalDeps |
|
|
#INSTALL_DIR/store |
|
|
$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll |
|
|
2000 |
|
|
60000 |
|
|
4096 |
|
|
1024 |
|
|
$INSTALL_DIR |
|
|
/opt/app/reservedProcess |
|
|
true |
|
|
true |
|
|
true |
|
|
/opt/app/ca-cert.pem |
|
|
X-VF-TAG=qa |
|
|
http/protobuf |
|
|
5000 |
|
|
debug |
|
|
none |
|
|
none |
|
|
|
|
|
otlp |
|
Required Collector Settings with an OpenTelemetry Collector
Quick links to specific required fields:
Explanations of each required field:
exporters:otlphttp/vf:endpoint: https://vfunction.mycompany.com/api/unauth/otlpheaders: X-VF-APP: e1e1b85d-0000-0000-0000-aeced0597832
|
|
service:pipelines:exporters: [otlphttp/vf]
|
|
Optional Collector Settings with an OpenTelemetry Collector
A full list of configurable settings can be accessed on the OpenTelemetry website. The list below pertain to how vFunction uses the OpenTelemetry Agent.
Quick links to all optional fields:
Explanations of each optional field:
exporters:otlphttp/vf:retry_on_failure: initial_interval: 10max_interval: 60
|
|
exporters:otlphttp/vf:sending_queue: num_consumers: 20sizer: bytes
|
|
exporters:otlphttp/vf:tls: insecure_skip_verify: true
|
|
processors:probabilistic_sampling:sampling_percentage: 50mode: "proportional"
service:pipelines:traces: processors: [probabilistic_sampler]
|
|