Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions confluent_platform/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

[[envs.default.matrix]]
python = ["3.12"]
version = ["5.4", "6.2"]
version = ["6.2"]

[envs.default.overrides]
matrix.version.env-vars = [
{ key = "CONFLUENT_VERSION", value = "5.4.0", if = ["5.4"] },
{ key = "CONFLUENT_VERSION_CONNECT", value = "0.2.0-5.4.0", if = ["5.4"] },
{ key = "CONFLUENT_KSQLDB_NAME", value = "ksql", if = ["5.4"] },

{ key = "CONFLUENT_VERSION", value = "6.2.0", if = ["6.2"] },
{ key = "CONFLUENT_VERSION_CONNECT", value = "0.5.0-6.2.0", if = ["6.2"] },
{ key = "CONFLUENT_KSQLDB_NAME", value = "ksqldb", if = ["6.2"] },
Expand Down
1 change: 1 addition & 0 deletions ddev/changelog.d/20967.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Skip E2E test execution for packages that do not define them.
9 changes: 8 additions & 1 deletion ddev/src/ddev/cli/env/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@ def test_command(
from ddev.config.constants import AppEnvVars
from ddev.e2e.config import EnvDataStorage
from ddev.e2e.constants import E2EMetadata
from ddev.repo.constants import NOT_E2E_TESTABLE
from ddev.utils.ci import running_in_ci
from ddev.utils.structures import EnvVars

app: Application = ctx.obj
storage = EnvDataStorage(app.data_dir)
integration = app.repo.integrations.get(intg_name)

if integration.name in NOT_E2E_TESTABLE:
app.display_info(f"Selected target {integration.name!r} does not have E2E tests to run. Skipping.")
return

storage = EnvDataStorage(app.data_dir)
active_envs = storage.get_environments(integration.name)

if environment is None:
Expand All @@ -109,6 +115,7 @@ def test_command(
and (not data.get('platforms') or app.platform.name in data['platforms'])
and (python_filter is None or data.get('python') == python_filter)
]

elif environment == 'active':
env_names = active_envs
else:
Expand Down
1 change: 1 addition & 0 deletions ddev/src/ddev/repo/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
CONFIG_DIRECTORY = '.ddev'
NOT_SHIPPABLE = frozenset(['datadog_checks_dev', 'datadog_checks_tests_helper', 'ddev'])
NOT_E2E_TESTABLE = frozenset(['datadog_checks_dev', 'datadog_checks_base', 'datadog_checks_tests_helper', 'ddev'])
FULL_NAMES = {
'core': 'integrations-core',
'extras': 'integrations-extras',
Expand Down
24 changes: 24 additions & 0 deletions ddev/tests/cli/env/test_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# (C) Datadog, Inc. 2024-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from contextlib import nullcontext

import mock
import pytest

from tests.helpers.mocks import MockPopen

Expand All @@ -23,3 +26,24 @@ def test_env_vars_repo(ddev, helpers, data_dir, write_result_file, mocker):
with mock.patch('ddev.utils.structures.EnvVars', side_effect=MockEnvVars):
result = ddev('env', 'test', 'postgres', 'py3.12')
assert result.exit_code == 0, result.output
# Ensure test was not skipped
assert "does not have E2E tests to run" not in result.output


@pytest.mark.parametrize(
'target, expectation',
[
('datadog_checks_dev', nullcontext()),
('datadog_checks_base', nullcontext()),
# This will raise an OSError because the package is not a valid integration
('datadog_checks_tests_helper', pytest.raises(OSError)),
('ddev', nullcontext()),
],
ids=['datadog_checks_dev', 'datadog_checks_base', 'datadog_checks_tests_helper', 'ddev'],
)
@pytest.mark.parametrize('env', ['py3.12', 'all', ''], ids=['py3.12', 'all', 'no-env'])
def test_env_test_not_e2e_testable(ddev, target: str, env: str, expectation):
with expectation:
result = ddev('env', 'test', target, env)
assert result.exit_code == 0, result.output
assert "does not have E2E tests to run" in result.output
28 changes: 19 additions & 9 deletions litellm/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# Agent Check: LiteLLM
# LiteLLM

## Overview

[LiteLLM][1] is a lightweight, open-source proxy and analytics layer for large language model (LLM) APIs. It enables unified access, observability, and cost control across multiple LLM providers.
Monitor, troubleshoot, and evaluate your LLM-powered applications built using [LiteLLM][1]: a lightweight, open-source proxy and analytics layer for large language model (LLM) APIs. It enables unified access, observability, and cost control across multiple LLM providers.

This integration provides real-time monitoring, alerting, and analytics for all LLM API usage through LiteLLM, helping customers optimize performance, manage costs, and ensure reliability across their AI-powered applications.
Use LLM Observability to investigate the root cause of issues, monitor operational performance, and evaluate the quality, privacy, and safety of your LLM applications.

See the [LLM Observability tracing view video](https://imgix.datadoghq.com/video/products/llm-observability/expedite-troubleshooting.mp4?fm=webm&fit=max) for an example of how you can investigate a trace.

Get cost estimation, prompt and completion sampling, error tracking, performance metrics, and more out of [LiteLLM][1] Python library requests using Datadog metrics and APM.

Key metrics such as request/response counts, latency, error rates, token usage, and spend per provider or deployment are monitored. This data enables customers to track usage patterns, detect anomalies, control costs, and troubleshoot issues quickly, ensuring efficient and reliable LLM operations through LiteLLM's health check and Prometheus endpoints.

## Setup

### LLM Observability: Get end-to-end visibility into your LLM application using LiteLLM
See the [LiteLLM integration docs][12] for details on how to get started with LLM Observability for LiteLLM.


### Agent Check: LiteLLM
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions.

### Installation
#### Installation

Starting from Agent 7.68.0, the LiteLLM check is included in the [Datadog Agent][2] package. No additional installation is needed on your server.

### Configuration
#### Configuration

This integration collects metrics through the Prometheus endpoint exposed by the LiteLLM Proxy. This feature is only available for enterprise users of LiteLLM. By default, the metrics are exposed on the `/metrics` endpoint. If connecting locally, the default port is 4000. For more information, see the [LiteLLM Prometheus documentation][10].

Note: The listed metrics can only be collected if they are available. Some metrics are generated only when certain actions are performed. For example, the `litellm.auth.failed_requests.count` metric might only be exposed after an authentication failed request has occurred.

#### Host-based
##### Host-based

1. Edit the `litellm.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your LiteLLM performance data. See the [sample litellm.d/conf.yaml][4] for all available configuration options. Example config:

Expand All @@ -38,7 +47,7 @@ instances:

2. [Restart the Agent][5].

#### Kubernetes-based
##### Kubernetes-based

For LiteLLM Proxy running on Kubernetes, configuration can be easily done via pod annotations. See the example below:

Expand Down Expand Up @@ -69,11 +78,11 @@ spec:

For more information and alternative ways to configure the check in Kubernetes-based environments, see the [Kubernetes Integration Setup documentation][3].

#### Logs
##### Logs

LiteLLM can send logs to Datadog through its callback system. You can configure various logging settings in LiteLLM to customize log formatting and delivery to Datadog for ingestion. For detailed configuration options and setup instructions, refer to the [LiteLLM Logging Documentation][11].

### Validation
#### Validation

Run the Agent's status subcommand ([see documentation][6]) and look for `litellm` under the Checks section.

Expand Down Expand Up @@ -109,3 +118,4 @@ Need help? Contact [Datadog support][9].
[9]: https://docs.datadoghq.com/help/
[10]: https://docs.litellm.ai/docs/proxy/prometheus
[11]: https://docs.litellm.ai/docs/proxy/logging
[12]: https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#litellm
Loading