Skip to content

Commit 7960615

Browse files
committed
refactor: clean up legacy comments and add OpenInference acknowledgment
1 parent f964b7e commit 7960615

File tree

6 files changed

+4
-5
lines changed

6 files changed

+4
-5
lines changed

instrumentation-genai/opentelemetry-instrumentation-langchain/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ opentelemetry-instrument <your_run_command>
118118

119119
Contributions are welcome! Please feel free to submit a Pull Request.
120120

121+
## Acknowledgments
122+
123+
This instrumentation was inspired by and builds upon the excellent work done by the [OpenInference](https://github.com/Arize-ai/openinference) project. We acknowledge their contributions to the OpenTelemetry instrumentation ecosystem for AI/ML frameworks.
124+
121125
## License
122126

123127
This project is licensed under the Apache License 2.0.

instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class _BaseCallbackManagerInit:
4343
__slots__ = ("_tracer_instance",)
4444

4545
def __init__(self, tracer: trace_api.Tracer, meter: Meter, cls: Type["LoongsuiteTracer"]):
46-
# 直接创建实例,就像OpenInference一样
4746
self._tracer_instance = cls(tracer=tracer, meter=meter)
4847

4948
def __call__(

instrumentation-genai/opentelemetry-instrumentation-langchain/tests/instrumentation/langchain/test_message_parsing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
ChatMessage
1010
)
1111

12-
# 定义常量以替代aliyun.semconv.trace中的引用
1312
class MessageAttributes:
1413
MESSAGE_ROLE = "role"
1514
MESSAGE_CONTENT = "content"

instrumentation-genai/opentelemetry-instrumentation-langchain/tests/instrumentation/langchain/test_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from unittest.mock import Mock
44
from opentelemetry.instrumentation.langchain.internal._tracer import _metadata
55

6-
# 定义常量以替代aliyun.semconv.trace中的引用
76
LLM_SESSION_ID = "gen_ai.session.id"
87
LLM_USER_ID = "gen_ai.user.id"
98
METADATA = "metadata"

instrumentation-genai/opentelemetry-instrumentation-langchain/tests/instrumentation/langchain/test_prompts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22
from opentelemetry.instrumentation.langchain.internal._tracer import _prompts
33

4-
# 定义常量以替代aliyun.semconv.trace中的引用
54
class SpanAttributes:
65
GEN_AI_PROMPT = "gen_ai.prompt"
76
CONTENT = "content"

instrumentation-genai/opentelemetry-instrumentation-langchain/tests/instrumentation/langchain/test_token_counts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from langchain_core.outputs import Generation, ChatGeneration
66
from langchain_core.messages import AIMessage
77

8-
# Define constants to replace the aliyun version
98
LLM_USAGE_PROMPT_TOKENS = "gen_ai.usage.prompt_tokens"
109
LLM_USAGE_COMPLETION_TOKENS = "gen_ai.usage.completion_tokens"
1110
LLM_USAGE_TOTAL_TOKENS = "gen_ai.usage.total_tokens"

0 commit comments

Comments
 (0)