Closed mojtaba-esk closed 1 week ago
The changes in this pull request involve modifications to the observability_test.go
, otel.go
, helpers.go
, and obsy.go
files. In observability_test.go
, several constants and variables are updated for improved configurability, including the introduction of a new scrapeInterval
constant and a more dynamic command string. In otel.go
, a new LoggingExporter
struct is introduced, along with methods for handling logging exporters. Additionally, helpers.go
adds a method for setting the logging exporter, and obsy.go
introduces a new configuration field for the logging exporter log level.
File Path | Change Summary |
---|---|
e2e/basic/observability_test.go | - Updated TestObservabilityCollector with dynamic prometheusArgs and added scrapeInterval . - Modified targetStartCommand for dynamic otlpPort . - Changed scrape_interval to use scrapeInterval . - Updated target instance name format. - Reduced wait time from 60 seconds to 20 seconds. - Added TestObservabilityCollectorWithLogging for logging verification. |
pkg/sidecars/observability/otel.go | - Introduced LoggingExporter struct with LogLevel field. - Added createLoggingExporter method. - Updated methods to append logging exporter to metrics and traces pipelines. - Added logic to reset metrics and traces if no exporters are present. |
pkg/sidecars/observability/helpers.go | - Added SetLoggingExporter method to set logging exporter with validation and default handling. |
pkg/sidecars/observability/obsy.go | - Added loggingExporterLogLevel field to ObsyConfig struct for logging configuration. |
e2e/system/build_image_test.go | - Updated expectedData in TestBuildWithBuildArgs from "Hello, build arg!" to "Hello, World!" . |
sequenceDiagram
participant Test as TestObservabilityCollector
participant Prometheus as Prometheus Config
participant Service as Service
participant Telemetry as Telemetry Struct
participant Logging as LoggingExporter
Test->>Prometheus: Set prometheusArgs with dynamic config
Prometheus-->>Test: Return updated config
Test->>Service: Initialize Service with Telemetry
Service->>Telemetry: Set Address and Level
Telemetry-->>Service: Return initialized Telemetry
Service->>Test: Return Service with valid metrics and traces
Test->>Logging: Set LoggingExporter with log level
Logging-->>Test: Confirm LoggingExporter setup
π "In the code where changes abound,
New structures and constants are found.
With logging now in the mix,
Our observability gets its fix!
From waits that were long, now just a short hop,
Our tests are now ready, letβs make them pop!" π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
There was an issue with the obsy sidecar and the test which was blocking the celestia-node integration. This PR proposes a solution for it.
Thank you @smuu for helping in finding the bug.
Summary by CodeRabbit
New Features
Bug Fixes