File tree Expand file tree Collapse file tree 3 files changed +20
-13
lines changed
charts/tinysystems-operator Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type: application
1313# This is the chart version. This version number should be incremented each time you make changes
1414# to the chart and its templates, including the app version.
1515# Versions are expected to follow Semantic Versioning (https://semver.org/)
16- version : 0.1.69
16+ version : 0.1.70
1717# This is the version number of the application being deployed. This version number should be
1818# incremented each time you make changes to the application. Versions are not expected to
1919# follow Semantic Versioning. They should reflect the version the application is using.
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ controllerManager:
99 - pre-delete
1010 installArgs :
1111 - pre-install
12- extraEnv : []
12+ extraEnv :
13+ - name : OTLP_DSN
14+ value : " http://token@tinysystems-otel-collector:2345"
1315 containerSecurityContext :
1416 allowPrivilegeEscalation : false
1517 capabilities :
Original file line number Diff line number Diff line change @@ -91,17 +91,22 @@ var runCmd = &cobra.Command{
9191
9292 // re-use zerolog
9393 l := zerologr .New (& log .Logger )
94- err := metrics .ConfigureOpenTelemetry (
95- metrics .WithDSN (os .Getenv ("OTLP_DSN" )),
96- metrics .WithBatchSpanProcessorOption (func (o * sdktrace.BatchSpanProcessorOptions ) {
97- o .BatchTimeout = 500 * time .Millisecond // Very responsive
98- // Optional: also reduce batch size for faster sends
99- o .MaxExportBatchSize = 10
100- }),
101- )
102- if err != nil {
103- l .Error (err , "configure opentelemetry error" )
104- os .Exit (1 )
94+ otlpDSN := os .Getenv ("OTLP_DSN" )
95+ if otlpDSN != "" {
96+ err := metrics .ConfigureOpenTelemetry (
97+ metrics .WithDSN (otlpDSN ),
98+ metrics .WithBatchSpanProcessorOption (func (o * sdktrace.BatchSpanProcessorOptions ) {
99+ o .BatchTimeout = 500 * time .Millisecond // Very responsive
100+ // Optional: also reduce batch size for faster sends
101+ o .MaxExportBatchSize = 10
102+ }),
103+ )
104+ if err != nil {
105+ l .Error (err , "configure opentelemetry error" )
106+ os .Exit (1 )
107+ }
108+ } else {
109+ l .Info ("OTLP_DSN not set, telemetry disabled" )
105110 }
106111
107112 // Send buffered spans and free resources.
You can’t perform that action at this time.
0 commit comments