Build instrumentation-genai/README.md (#3400)

* scripts: build a README also for instrumentation-genai

* opentelemetry-instrumentation-openai-v2: add supports_metrics to package

* opentelemetry-instrumentation-google-genai: add missing package.py

* Build instrumentation-genai/README.md
This commit is contained in:
Riccardo Magliocchetti
2025-04-02 11:45:56 +02:00
committed by GitHub
parent 78373353f5
commit ff18e7c18b
4 changed files with 31 additions and 5 deletions

View File

@ -0,0 +1,6 @@
| Instrumentation | Supported Packages | Metrics support | Semconv status |
| --------------- | ------------------ | --------------- | -------------- |
| [opentelemetry-instrumentation-google-genai](./opentelemetry-instrumentation-google-genai) | google-genai >= 1.0.0 | No | development
| [opentelemetry-instrumentation-openai-v2](./opentelemetry-instrumentation-openai-v2) | openai >= 1.26.0 | Yes | development
| [opentelemetry-instrumentation-vertexai](./opentelemetry-instrumentation-vertexai) | google-cloud-aiplatform >= 1.64 | No | development

View File

@ -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.
_instruments = ("google-genai >= 1.0.0",)

View File

@ -14,3 +14,5 @@
_instruments = ("openai >= 1.26.0",) _instruments = ("openai >= 1.26.0",)
_supports_metrics = True

View File

@ -27,10 +27,7 @@ header = """
| --------------- | ------------------ | --------------- | -------------- |""" | --------------- | ------------------ | --------------- | -------------- |"""
def main(): def main(base_instrumentation_path):
root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
base_instrumentation_path = os.path.join(root_path, "instrumentation")
table = [header] table = [header]
for instrumentation in sorted(os.listdir(base_instrumentation_path)): for instrumentation in sorted(os.listdir(base_instrumentation_path)):
instrumentation_path = os.path.join( instrumentation_path = os.path.join(
@ -85,4 +82,10 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
main() root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
instrumentation_path = os.path.join(root_path, "instrumentation")
main(instrumentation_path)
genai_instrumentation_path = os.path.join(
root_path, "instrumentation-genai"
)
main(genai_instrumentation_path)