You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`Endpoint`|`string`|`""`|`host:port`. **Inherits**`OTEL.Endpoint` if empty. |
172
+
|`Interval`|`Duration`|`15s`| Push interval. Development mode uses `5s`. |
173
+
|`Temporality`|`string`|`"cumulative"`|`"cumulative"` (Prometheus-compatible) or `"delta"`. |
174
+
|`Protocol`|`string`|`"grpc"`|**Inherits**`OTEL.Protocol` if empty. |
175
+
|`Username`|`string`|`""`|**Inherits**`OTEL.Username` if empty. |
176
+
|`Password`|`string`|`""`|**Inherits**`OTEL.Password` if empty. |
177
+
165
178
---
166
179
167
180
## Detailed Initialization
@@ -482,27 +495,6 @@ Operators must understand how Ion behaves under stress:
482
495
483
496
---
484
497
485
-
## Globals & Dependency Injection
486
-
487
-
> **⚠️ WARNING**: Global state is strictly for migration and legacy support.
488
-
489
-
**Do not** use `ion.SetGlobal` in new libraries or microservices.
490
-
**Do** inject `ion.Logger` via struct constructors.
491
-
492
-
```go
493
-
// CORRECT: Dependency Injection
494
-
typeServerstruct {
495
-
log ion.Logger
496
-
}
497
-
498
-
// INCORRECT: Hidden dependency
499
-
func(s *Server) Handle() {
500
-
ion.Info(...) // Relies on global state
501
-
}
502
-
```
503
-
504
-
If `ion.GetGlobal()` is called without initialization, it returns a **safe no-op logger**. It will not panic, but your logs will be silently discarded to protect the runtime.
0 commit comments