Skip to content

Conversation

@ishaish103
Copy link

Description

Link to tracking issue

Fixes

Testing

Documentation

Ron Korland and others added 30 commits May 30, 2025 15:03
…xporter

This commit introduces the KEDA Scaler Exporter, which implements a gRPC service compatible with KEDA's external scaler interface. The exporter allows KEDA to scale workloads based on custom metrics ingested via OpenTelemetry and provides HTTP endpoints for monitoring and querying metrics.

Key features include:
- gRPC API for external scaling
- PromQL-like query support for custom metrics
- Configurable retention and cleanup intervals
- Comprehensive configuration options

New files include configuration, factory, metrics handling, testing components, and a README for usage instructions.

Testing has been implemented to ensure the exporter's functionality and correctness.
This commit introduces a new Datadog log receiver for the OpenTelemetry Collector. The implementation includes configuration, factory methods, and a complete HTTP server for receiving logs. Key components include:

- `config.go`: Defines the configuration structure and validation for the receiver.
- `factory.go`: Implements the factory pattern for creating the receiver.
- `logsreceiver.go`: Contains the main logic for handling incoming log requests and processing them.
- `internal` package: Includes utility functions for parsing requests, handling log severity, and unmarshalling JSON data.
- Tests: Comprehensive unit tests for the receiver's functionality and internal logic.

Additionally, a README file is added to provide usage instructions and configuration details. The receiver is currently in beta status and supports logs with the `v2_api` version.
Add Datadog Log Receiver Implementation
…OTTL package

- Introduced new AST type aliases in `ast_export.go` for better code generation support.
- Implemented regex matching functionality in `compile.go` with a Matcher interface.
- Added `Contains`, `EndsWith`, `StartsWith`, and `IsInRange` functions in `sawmillsfuncs` with comprehensive unit tests to validate their behavior.
- Created a `DdStatusRemapper` function to map status levels and a `splitMetricByAttributes` function to handle metric splitting based on attributes.
- Enhanced testing coverage for all new functions to ensure reliability and correctness.
- Included error handling and validation in the new functions to improve robustness.
…mproved readability

- Simplified the status remapping logic by removing unnecessary variable checks and directly using the `stringValue`.
- Enhanced code clarity while maintaining the same functionality for mapping status levels.
- Ensured consistent handling of status strings to improve maintainability and readability.
- Improved validation logic to ensure that the minimum value is less than or equal to the maximum value using validation values.
- Updated runtime execution to re-evaluate the current min and max values from the context on each function call.
- Enhanced error handling for nil values in min, max, and target to ensure robustness and prevent runtime errors.
- Clarified comments to improve code readability and maintainability.
…ith.go`, and `func_startswith.go` for improved case sensitivity handling

- Introduced `processedPatterns`, `processedSuffixes`, and `processedPrefixes` to store case-normalized values based on the `caseSensitive` flag.
- Enhanced readability and maintainability by separating case handling logic from the main function logic.
- Ensured consistent behavior across all three functions while maintaining existing functionality.
…idation

- Introduced `Contains`, `StartsWith`, and `EndsWith` functions for string pattern matching.
- Added `IsInRange` function for numeric range validation.
- Implemented `FromContext` function for extracting data from OpenTelemetry context.
- Developed `DdStatusRemapper` function for remapping status values.
- Created `SplitMetricByAttributes` function for splitting metrics by attributes.
- Added public AST type aliases for code generation and regex compilation utilities with performance optimizations.

This enhancement improves the functionality and usability of the OTTL package, contributing to a better end-user experience and maintaining code quality standards.
…gLogReceiver

- Upgraded OpenTelemetry dependencies to version 1.40.0 for improved performance and features.
- Updated indirect dependencies to their latest versions, ensuring compatibility and security.
- Enhanced overall stability and maintainability of the project by aligning with the latest library standards.
- Upgraded Go version to 1.24 and toolchain to 1.24.5 for improved performance and compatibility.
- Updated various dependencies to their latest versions, including OpenTelemetry, Prometheus, and AWS SDK, enhancing stability and security.
- Ensured alignment with the latest library standards to maintain code quality and improve maintainability.
…dling in InMemoryQuerier

- Upgraded the Prometheus common library to version 0.65.0 for improved features and security.
- Refactored label handling in the InMemoryQuerier to utilize a more efficient range-based iteration, enhancing code readability and maintainability.
- Ensured alignment with the latest library standards to maintain code quality and improve overall stability.
- Introduced copyright and SPDX license headers to multiple files within the Datadog log receiver package to ensure compliance with licensing standards.
- Enhanced code clarity and maintainability by standardizing header information across the codebase.
…og receiver

- Introduced copyright and SPDX license headers to the metadata.yaml file to ensure compliance with licensing standards.
- Enhanced code clarity and maintainability by standardizing header information in the Datadog log receiver package.
- Introduced copyright and SPDX license headers to multiple files within the KedaScalerExporter package to ensure compliance with licensing standards.
- Enhanced code clarity and maintainability by standardizing header information across the codebase.
…package

- Introduced copyright and SPDX license headers to various files within the OTTL package to ensure compliance with licensing standards.
- Enhanced code clarity and maintainability by standardizing header information across the codebase.
…r and Datadog log receiver files

- Updated package declarations in multiple files within the KedaScalerExporter and Datadog log receiver packages to include import path comments for improved clarity and maintainability.
- This change enhances code readability by providing explicit context on the package's location within the project structure.
- Rearranged import statements in multiple files for improved organization and clarity.
- Updated error handling in the KedaScaler to use `errors.New` for better error messaging consistency.
- Enhanced the `Close` method signatures in various components to use pointer receivers, improving performance and clarity.
- These changes contribute to better code maintainability and readability across the KedaScalerExporter package.
- Corrected the variable assignment for the listener in the Start method of the KedaScalerExporter to ensure proper error handling and functionality.
- This change enhances code clarity and maintains consistency in error handling practices across the codebase.
- Upgraded various dependencies in the go.mod and go.sum files for the Datadog log receiver to their latest versions, including fsnotify, logr, and OpenTelemetry components, enhancing stability and security.
- Introduced new dependencies such as go-tpm-keyfiles and go-tpm, improving functionality and compatibility with TPM-related features.
- This update ensures alignment with the latest library standards, contributing to better code quality and maintainability across the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants