Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
9 changes: 5 additions & 4 deletions instrumentation-loongsuite/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

| Instrumentation | Supported Packages | Metrics support | Semconv status |
| --------------- | ------------------ | --------------- | -------------- |
| [loongsuite-instrumentation-agentscope](./loongsuite-instrumentation-agentscope) | agentscope >= 0.1.5.dev0 | No | development
| [loongsuite-instrumentation-agno](./loongsuite-instrumentation-agno) | agno >= 1.5.0 | No | development
| [loongsuite-instrumentation-agentscope](./loongsuite-instrumentation-agentscope) | agentscope >= 1.0.0 | No | development
| [loongsuite-instrumentation-agno](./loongsuite-instrumentation-agno) | agno | No | development
| [loongsuite-instrumentation-dashscope](./loongsuite-instrumentation-dashscope) | dashscope >= 1.0.0 | No | development
| [loongsuite-instrumentation-dify](./loongsuite-instrumentation-dify) | dify | No | development
| [loongsuite-instrumentation-langchain](./loongsuite-instrumentation-langchain) | langchain_core >= 0.1.0 | Yes | development
| [loongsuite-instrumentation-mcp](./loongsuite-instrumentation-mcp) | mcp>=1.3.0 | Yes | development
| [loongsuite-instrumentation-langchain](./loongsuite-instrumentation-langchain) | langchain_core >= 0.1.0 | No | development
| [loongsuite-instrumentation-mcp](./loongsuite-instrumentation-mcp) | mcp >= 1.3.0, <= 1.13.1 | No | development
| [loongsuite-instrumentation-mem0](./loongsuite-instrumentation-mem0) | mem0ai >= 1.0.0 | No | development
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-instrumentation >= 0.58b0",
"opentelemetry-semantic-conventions >= 0.58b0",
"opentelemetry-util-genai",
"wrapt",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-instrumentation >= 0.58b0",
"opentelemetry-semantic-conventions >= 0.58b0",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-util-genai ~= 0.2b0",
"opentelemetry-instrumentation >= 0.58b0",
"opentelemetry-semantic-conventions >= 0.58b0",
"opentelemetry-util-genai > 0.2b0",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-instrumentation >= 0.58b0",
"opentelemetry-semantic-conventions >= 0.58b0",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-instrumentation >= 0.58b0",
"opentelemetry-semantic-conventions >= 0.58b0",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dynamic = ["version"]
description = "OpenTelemetry MCP (Model Context Protocol) instrumentation"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10, <=3.13"
requires-python = ">=3.10"
authors = [
{ name = "LoongSuite Python Agent Authors"},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ classifiers = [
dependencies = [
"wrapt >=1.17.3",
"opentelemetry-api ~=1.37",
"opentelemetry-instrumentation ~=0.58b0",
"opentelemetry-semantic-conventions ~=0.58b0",
"opentelemetry-util-genai ~= 0.2b0",
"opentelemetry-instrumentation >=0.58b0",
"opentelemetry-semantic-conventions >=0.58b0",
"opentelemetry-util-genai >= 0.2b0",
]

[project.optional-dependencies]
Expand Down
77 changes: 77 additions & 0 deletions loongsuite-distro/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
LoongSuite Distro
=================

LoongSuite Python Agent's Distro package, providing LoongSuite-specific configuration and tools.

Installation
------------

::

pip install loongsuite-distro

Optional dependencies:

::

# Install with baggage processor support
pip install loongsuite-distro[baggage]

# Install with OTLP exporter support
pip install loongsuite-distro[otlp]

# Install with both
pip install loongsuite-distro[baggage,otlp]

Features
--------

1. **LoongSuite Distro**: Provides LoongSuite-specific OpenTelemetry configuration
2. **LoongSuite Bootstrap**: Install all LoongSuite components from tar package
3. **Baggage Processor**: Optional baggage span processor with prefix matching and stripping support

Usage
-----

### Configure LoongSuite Distro

Specify using LoongSuite Distro via environment variable::

export OTEL_PYTHON_DISTRO=loongsuite

### Use LoongSuite Bootstrap

Install all components from tar package::

loongsuite-bootstrap -t loongsuite-python-agent-1.0.0.tar.gz

Install from GitHub Releases::

loongsuite-bootstrap -v 1.0.0

Install latest version::

loongsuite-bootstrap --latest

### Configure Baggage Processor

The baggage processor is automatically loaded if configured via environment variables.
First, install the optional dependency::

pip install loongsuite-distro[baggage]

Then configure via environment variables::

export LOONGSUITE_PROCESSOR_BAGGAGE_ALLOWED_PREFIXES="traffic.,app."
export LOONGSUITE_PROCESSOR_BAGGAGE_STRIP_PREFIXES="traffic."

The processor will only be loaded if ``LOONGSUITE_PROCESSOR_BAGGAGE_ALLOWED_PREFIXES`` is set.

For more usage, please refer to `LOONGSUITE_BOOTSTRAP_README.md`.

References
----------

* `LoongSuite Python Agent <https://github.com/alibaba/loongsuite-python-agent>`_


68 changes: 68 additions & 0 deletions loongsuite-distro/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "loongsuite-distro"
dynamic = ["version"]
description = "LoongSuite Python Agent Distro"
readme = "README.rst"
license = "Apache-2.0"
requires-python = ">=3.9"
authors = [
{ name = "LoongSuite Python Agent Authors", email = "qp467389@alibaba-inc.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-sdk ~= 1.13",
"opentelemetry-instrumentation >= 0.58b0",
]

[project.optional-dependencies]
otlp = [
"opentelemetry-exporter-otlp ~= 1.40",
]
baggage = [
"loongsuite-processor-baggage",
]

[project.entry-points.opentelemetry_configurator]
loongsuite = "loongsuite.distro:LoongSuiteConfigurator"

[project.entry-points.opentelemetry_distro]
loongsuite = "loongsuite.distro:LoongSuiteDistro"

[project.scripts]
loongsuite-bootstrap = "loongsuite.distro.bootstrap:main"
loongsuite-instrument = "opentelemetry.instrumentation.auto_instrumentation:run"

[project.urls]
Homepage = "https://github.com/alibaba/loongsuite-python-agent"
Repository = "https://github.com/alibaba/loongsuite-python-agent"

[tool.hatch.version]
path = "src/loongsuite/distro/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["src/loongsuite"]


15 changes: 15 additions & 0 deletions loongsuite-distro/src/loongsuite/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


Loading
Loading