Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

[Feat]: Typescript/Node SDK For LLM Observability with OpenTelemetry (#352)

Aman Agarwala79a47d9c76a
diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml
new file mode 100644
index 00000000..740b137e
--- /dev/null
+++ b/.github/workflows/npm-release.yml
@@ -0,0 +1,34 @@
+name: Publish Package to npmjs
+on:
+ workflow_dispatch:
+ push:
+ tags: [ 'ts-*.*.*' ]
+
+permissions:
+ contents: write
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: read
+ id-token: write
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup .npmrc file to publish to npm
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20.x'
+ cache: 'npm'
+ registry-url: 'https://registry.npmjs.org'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Publish package
+ run: npm publish --provenance --access public
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/docs/latest/integrations/anthropic.mdx b/docs/latest/integrations/anthropic.mdx
index fa062866..38854ff6 100644
--- a/docs/latest/integrations/anthropic.mdx
+++ b/docs/latest/integrations/anthropic.mdx
@@ -13,15 +13,25 @@ Auto-instrumentation means you don't have to set up monitoring manually for diff
The integration is compatible with
- Anthropic Python SDK client `>= 0.21.0`
+- Anthropic Typescript SDK client `>= 0.21.0`
## Get Started
<Steps>
<Step title="Install OpenLIT">
Open your command line or terminal and run:
- ```shell
- pip install openlit
- ```
+ <Tabs>
+ <Tab title="Python">
+ ```shell
+ pip install openlit
+ ```
+ </Tab>
+ <Tab title="Typescript">
+ ```shell
+ npm install @openlit/ts
+ ```
+ </Tab>
+ </Tabs>
</Step>
<Step title="Initialize OpenLIT in your Application">
You can set up OpenLIT in your application using either function arguments directly in your code or by using environment variables.
@@ -30,7 +40,9 @@ The integration is compatible with
Add the following two lines to your application code:
- ```python
+ <Tabs>
+ <Tab title="Python">
+ ```python
import openlit
openlit.init(
@@ -38,6 +50,18 @@ The integration is compatible with
)
```
+ </Tab>
+ <Tab title="Typescript">
+ <Warning>Typescript sdk for anthropic doesn't support metrics tracking for now!</Warning>
+
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init({ otlpEndpoint: "YOUR_OTEL_ENDPOINT" })
+ ```
+ </Tab>
+ </Tabs>
+
Replace:
1. `YOUR_OTEL_ENDPOINT` with the URL of your OpenTelemetry backend, such as `http://127.0.0.1:4318` if you are using OpenLIT and a local OTel Collector.
</Tab>
@@ -45,12 +69,24 @@ The integration is compatible with
Add the following two lines to your application code:
- ```python
+ <Tabs>
+ <Tab title="Python">
+ ```python
import openlit
openlit.init()
```
+ </Tab>
+ <Tab title="Typescript">
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init()
+ ```
+ </Tab>
+ </Tabs>
+
Then, configure the your OTLP endpoint using environment variable:
```shell
export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT"
@@ -62,7 +98,7 @@ The integration is compatible with
</Tabs>
To send metrics and traces to other Observability tools, refer to the [Connections Guide](/latest/connections/intro).
- For more advanced configurations and application use cases, visit the [OpenLIT Python repository](https://github.com/openlit/openlit/tree/main/sdk/python).
+ For more advanced configurations and application use cases, visit the [OpenLIT Python repository](https://github.com/openlit/openlit/tree/main/sdk/python) or [OpenLIT Typescript repository](https://github.com/openlit/openlit/tree/main/sdk/typescript).
</Step>
</Steps>
diff --git a/docs/latest/integrations/introduction.mdx b/docs/latest/integrations/introduction.mdx
index 6fcfc575..e28d5133 100644
--- a/docs/latest/integrations/introduction.mdx
+++ b/docs/latest/integrations/introduction.mdx
@@ -900,6 +900,35 @@ Start integrating and monitoring your applications with OpenLIT effortlessly. Ch
</CardGroup>
---
+| Integration | Type | Python SDK | Typescript SDK |
+|--------|--------------|---------------------------|--------------------------|
+| OpenAI | LLM | ✔️ | ✔️ |
+| Anthropic | LLM | ✔️ | ✔️ |
+| Ollama | LLM | ✔️ | ❌ |
+| Cohere | LLM | ✔️ | ❌ |
+| GPT4All | LLM | ✔️ | ❌ |
+| vLLM | LLM | ✔️ | ❌ |
+| Azure OpenAI | LLM | ✔️ | ❌ |
+| Mistral | LLM | ✔️ | ❌ |
+| HuggingFace | LLM | ✔️ | ❌ |
+| Amazon Bedrock | LLM | ✔️ | ❌ |
+| Vertex AI | LLM | ✔️ | ❌ |
+| Groq | LLM | ✔️ | ❌ |
+| ElevenLabs | LLM | ✔️ | ❌ |
+| OLA Krutrim | LLM | ✔️ | ❌ |
+| ChromaDB | VectorDB | ✔️ | ❌ |
+| Pinecone | VectorDB | ✔️ | ❌ |
+| Qdrant | VectorDB | ✔️ | ❌ |
+| Milvus | VectorDB | ✔️ | ❌ |
+| LangChain | Framework | ✔️ | ❌ |
+| LiteLLM | Framework | ✔️ | ❌ |
+| LlamaIndex | Framework | ✔️ | ❌ |
+| Haystack | Framework | ✔️ | ❌ |
+| EmbedChain | Framework | ✔️ | ❌ |
+| NVIDIA GPUs | GPU | ✔️ | ❌ |
+
+---
+
<CardGroup cols={2}>
<Card title="Quickstart" href="/latest/quickstart" icon='bolt'>
Get Started with monitoring your LLM Applications in 2 simple steps
diff --git a/docs/latest/integrations/openai.mdx b/docs/latest/integrations/openai.mdx
index 0b6a413d..984a4ece 100644
--- a/docs/latest/integrations/openai.mdx
+++ b/docs/latest/integrations/openai.mdx
@@ -13,24 +13,35 @@ Auto-instrumentation means you don't have to set up monitoring manually for diff
The integration is compatible with
- OpenAI Python SDK client `>=1.13.0`
+- OpenAI Typescript SDK client `>=1.13.0`
## Get Started
<Steps>
<Step title="Install OpenLIT">
- Open your command line or terminal and run:
- ```shell
- pip install openlit
- ```
+ Open your command line or terminal and run:
+ <Tabs>
+ <Tab title="Python">
+ ```shell
+ pip install openlit
+ ```
+ </Tab>
+ <Tab title="Typescript">
+ ```shell
+ npm install @openlit/ts
+ ```
+ </Tab>
+ </Tabs>
+
</Step>
<Step title="Initialize OpenLIT in your Application">
You can set up OpenLIT in your application using either function arguments directly in your code or by using environment variables.
<Tabs>
<Tab title="Setup using function arguments">
-
Add the following two lines to your application code:
-
- ```python
+ <Tabs>
+ <Tab title="Python">
+ ```python
import openlit
openlit.init(
@@ -38,19 +49,45 @@ The integration is compatible with
)
```
+ </Tab>
+ <Tab title="Typescript">
+ <Warning>Typescript sdk for openai doesn't support metrics tracking for now!</Warning>
+
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init({ otlpEndpoint: "YOUR_OTEL_ENDPOINT" })
+ ```
+ </Tab>
+ </Tabs>
+
+
Replace:
1. `YOUR_OTEL_ENDPOINT` with the URL of your OpenTelemetry backend, such as `http://127.0.0.1:4318` if you are using OpenLIT and a local OTel Collector.
+
</Tab>
<Tab title="Setup using Environment Variables">
Add the following two lines to your application code:
- ```python
+ <Tabs>
+ <Tab title="Python">
+ ```python
import openlit
openlit.init()
```
+ </Tab>
+ <Tab title="Typescript">
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init()
+ ```
+ </Tab>
+ </Tabs>
+
Then, configure the your OTLP endpoint using environment variable:
```shell
export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT"
@@ -62,7 +99,7 @@ The integration is compatible with
</Tabs>
To send metrics and traces to other Observability tools, refer to the [Connections Guide](/latest/connections/intro).
- For more advanced configurations and application use cases, visit the [OpenLIT Python repository](https://github.com/openlit/openlit/tree/main/sdk/python).
+ For more advanced configurations and application use cases, visit the [OpenLIT Python repository](https://github.com/openlit/openlit/tree/main/sdk/python) or [OpenLIT Typescript repository](https://github.com/openlit/openlit/tree/main/sdk/typescript).
</Step>
</Steps>
diff --git a/docs/latest/quickstart.mdx b/docs/latest/quickstart.mdx
index d09e9ef8..5381d9ac 100644
--- a/docs/latest/quickstart.mdx
+++ b/docs/latest/quickstart.mdx
@@ -1,10 +1,10 @@
---
-title: 'Quickstart'
-description: 'Quickly start monitoring your LLM Applications in just a single line of code'
-icon: 'bolt'
+title: "Quickstart"
+description: "Quickly start monitoring your LLM Applications in just a single line of code"
+icon: "bolt"
---
-This guide will walk you through setting up OpenTelemetry Auto Instrumentation for monitoring your LLM Application using OpenLIT. In just a few steps, you'll be able to track and analyze the performance and usage of your LLM Applications.
+This guide will walk you through setting up OpenTelemetry Auto Instrumentation for monitoring your LLM Application using OpenLIT. In just a few steps, you'll be able to track and analyze the performance and usage of your LLM Applications.
In this guide, we'll show how you can send OpenTelemetry traces and metrics from your LLM Applications to Grafana Cloud
```mermaid
@@ -40,15 +40,27 @@ flowchart TB;
</Steps>
</Step>
<Step title="Install OpenLIT SDK">
- ```shell
- pip install openlit
- ```
+ <Tabs>
+ <Tab title="Python">
+ ```shell
+ pip install openlit
+ ```
+ </Tab>
+ <Tab title="Typescript">
+ ```shell
+ npm install @openlit/ts
+ ```
+ </Tab>
+ </Tabs>
+
</Step>
<Step title="Initialize OpenLIT in Your Application">
Add the following two lines to your application code:
<Tabs>
<Tab title="Setup using function arguments">
- ```python
+ <Tabs>
+ <Tab title="Python">
+ ```python
import openlit
openlit.init(otlp_endpoint="http://127.0.0.1:4318")
@@ -76,10 +88,69 @@ flowchart TB;
model="gpt-3.5-turbo",
)
```
+ </Tab>
+ <Tab title="Typescript">
+ ```typescript
+ import Openlit from "@openlit/ts"
+
+ Openlit.init({ otlpEndpoint: "http://127.0.0.1:4318/v1/traces" })
+ ```
+
+ Example Usage for monitoring `OpenAI` Usage:
+
+ ```typescript
+ import Openlit from "@openlit/ts"
+
+ Openlit.init({ otlpEndpoint: "http://127.0.0.1:4318/v1/traces" })
+
+ async function main() {
+ const OpenAI = await import("openai").then((e) => e.default);
+ const openai = new OpenAI({
+ apiKey: YOUR_OPENAI_KEY,
+ });
+ const completion = await openai.chat.completions.create({
+ messages: [{ role: "system", content: "Who are you ?" }],
+ });
+
+ console.log(completion?.choices?.[0]);
+ }
+
+ main();
+ ```
+ OR
+ ```typescript
+ import openlit from "@openlit/ts"
+ import OpenAI from "openai"
+
+ openlit.init({
+ otlpEndpoint: "http://127.0.0.1:4318/v1/traces",
+ instrumentations: {
+ openai: OpenAI,
+ }
+ })
+
+ async function main() {
+ const openai = new OpenAI({
+ apiKey: YOUR_OPENAI_KEY,
+ });
+ const completion = await openai.chat.completions.create({
+ messages: [{ role: "system", content: "Who are you ?" }],
+ });
+
+ console.log(completion?.choices?.[0]);
+ }
+
+ main();
+ ```
+ </Tab>
+ </Tabs>
+
</Tab>
<Tab title="Setup using Environment Variables">
-
- Add the following two lines to your application code:
+
+ <Tabs>
+ <Tab title="Python">
+ Add the following two lines to your application code:
```python
import openlit
@@ -113,9 +184,72 @@ flowchart TB;
model="gpt-3.5-turbo",
)
```
+ </Tab>
+ <Tab title="Typescript">
+ Add the following two lines to your application code:
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init()
+ ```
+
+ Run the following command to configure the OTEL export endpoint:
+ ```shell
+ export OTEL_EXPORTER_OTLP_ENDPOINT = "http://127.0.0.1:4318"
+ ```
+
+ Example Usage for monitoring `OpenAI` Usage:
+
+ ```typescript
+ import openlit from "@openlit/ts"
+
+ openlit.init()
+
+ async function main() {
+ const OpenAI = await import("openai").then((e) => e.default);
+ const openai = new OpenAI({
+ apiKey: YOUR_OPENAI_KEY,
+ });
+ const completion = await openai.chat.completions.create({
+ messages: [{ role: "system", content: "Who are you ?" }],
+ });
+
+ console.log(completion?.choices?.[0]);
+ }
+
+ main();
+ ```
+ OR
+ ```typescript
+ import openlit from "@openlit/ts"
+ import OpenAI from "openai"
+
+ openlit.init({
+ instrumentations: {
+ openai: OpenAI,
+ }
+ })
+
+ async function main() {
+ const openai = new OpenAI({
+ apiKey: YOUR_OPENAI_KEY,
+ });
+ const completion = await openai.chat.completions.create({
+ messages: [{ role: "system", content: "Who are you ?" }],
+ });
+
+ console.log(completion?.choices?.[0]);
+ }
+
+ main();
+ ```
+ </Tab>
+ </Tabs>
+
+
</Tab>
</Tabs>
- Refer to OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more advanced configurations and use cases.
+ Refer to OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) or [Typescript SDK repository](https://github.com/openlit/openlit/tree/main/sdk/typescript) for more advanced configurations and use cases.
</Step>
<Step title="Visualize and Analyze">
With the LLM Observability data now being collected and sent to OpenLIT, the next step is to visualize and analyze this data to get insights into your LLM application's performance, behavior, and identify areas of improvement.
@@ -128,19 +262,24 @@ flowchart TB;
<img src="https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-2.png?raw=true" />
</Frame>
</Step>
+
</Steps>
-You're all set! Following these steps should have you on your way to effectively monitoring your LLM applications with OpenTelemetry. If you wish to send telemetry to any other backend, Refer to our [Connections](./connections/intro).
+You're all set! Following these steps should have you on your way to effectively monitoring your LLM applications with OpenTelemetry. If you wish to send telemetry to any other backend, Refer to our [Connections](./connections/intro).
If you have any questions or need support, reach out to our [community](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ).
---
<CardGroup cols={2}>
-<Card title="Integrations" href="/latest/integrations/introduction" icon='circle-nodes'>
-Integrate your LLM Stack with OpenLIT
-</Card>
-<Card title="Connections" href="/latest/connections/intro" icon='link'>
-Connect to your existing Observablity Stack
-</Card>
-</CardGroup>
\ No newline at end of file
+ <Card
+ title="Integrations"
+ href="/latest/integrations/introduction"
+ icon="circle-nodes"
+ >
+ Integrate your LLM Stack with OpenLIT
+ </Card>
+ <Card title="Connections" href="/latest/connections/intro" icon="link">
+ Connect to your existing Observablity Stack
+ </Card>
+</CardGroup>
diff --git a/docs/latest/sdk-configuration.mdx b/docs/latest/sdk-configuration.mdx
index 21e60284..4bcab3a8 100644
--- a/docs/latest/sdk-configuration.mdx
+++ b/docs/latest/sdk-configuration.mdx
@@ -6,7 +6,9 @@ icon: 'file-code'
Below is a detailed overview of the configuration options available, allowing you to adjust OpenLIT's behavior and functionality to align with your specific observability needs:
-| Argument | Description | Default Value |
+<Tabs>
+ <Tab title="Python">
+ | Argument | Description | Default Value |
|-------------------------|-----------------------------------------------------------------------------------------------|----------------|
| `environment` | The deployment environment of the application. | `"default"` |
| `application_name` | Identifies the name of your application. | `"default"` |
@@ -19,4 +21,20 @@ Below is a detailed overview of the configuration options available, allowing yo
| `disabled_instrumentors`| List of instrumentors to disable. | `None` |
| `disable_metrics` | If set, disables the collection of metrics. | `False` |
| `pricing_json` | URL or file path of the pricing JSON file. | `https://github.com/openlit/openlit/blob/main/assets/pricing.json` |
-| `collect_gpu_stats` | Flag to enable or disable GPU metrics collection. | `False` |
\ No newline at end of file
+| `collect_gpu_stats` | Flag to enable or disable GPU metrics collection. | `False` |
+ </Tab>
+ <Tab title="Typescript">
+| Argument | Description | Default Value |
+|-------------------------|-------------------------------|----------------|
+| `environment` | The deployment environment of the application. | `"default"` |
+| `application_name` | Identifies the name of your application. | `"default"` |
+| `tracer` | An instance of OpenTelemetry Tracer for tracing operations. | `undefined` |
+| `otlpEndpoint` | Specifies the OTLP endpoint for transmitting telemetry data. | `undefined` |
+| `otlp_headers` | Defines headers for the OTLP exporter, useful for backends requiring authentication. | {} |
+| `disable_batch` | A flag to disable batch span processing, favoring immediate dispatch. | `false` |
+| `trace_content` | Enables tracing of content for deeper insights. | `true` |
+| `disabled_instrumentors`| List of instrumentors to disable. | `undefined` |
+| `pricing_json` | URL or file path of the pricing JSON file. | `https://github.com/openlit/openlit/blob/main/assets/pricing.json` |
+ </Tab>
+ </Tabs>
+
diff --git a/sdk/typescript/.gitignore b/sdk/typescript/.gitignore
new file mode 100644
index 00000000..76add878
--- /dev/null
+++ b/sdk/typescript/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+dist
\ No newline at end of file
diff --git a/sdk/typescript/.prettierrc.json b/sdk/typescript/.prettierrc.json
new file mode 100644
index 00000000..a48b0567
--- /dev/null
+++ b/sdk/typescript/.prettierrc.json
@@ -0,0 +1,7 @@
+{
+ "printWidth": 100,
+ "tabWidth": 2,
+ "singleQuote": true,
+ "jsxBracketSameLine": true,
+ "trailingComma": "es5"
+}
\ No newline at end of file
diff --git a/sdk/typescript/LICENSE b/sdk/typescript/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/sdk/typescript/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md
new file mode 100644
index 00000000..798f4e37
--- /dev/null
+++ b/sdk/typescript/README.md
@@ -0,0 +1,175 @@
+<div align="center">
+<img src="https://github.com/openlit/.github/blob/main/profile/assets/wide-logo-no-bg.png?raw=true" alt="OpenLIT Logo" width="30%"><h1>
+OpenTelemetry Auto-Instrumentation for GenAI & LLM Applications</h1>
+
+**[Documentation](https://docs.openlit.io/) | [Quickstart](#-getting-started) | [Typescript SDK](https://github.com/openlit/openlit/tree/main/sdk/typescript)**
+
+[![OpenLIT](https://img.shields.io/badge/OpenLIT-orange)](https://github.com/openlit/openlit)
+[![License](https://img.shields.io/github/license/openlit/openlit?label=License&logo=github&color=f80&logoColor=white)](https://github.com/openlit/openlit/blob/main/LICENSE)
+[![Downloads](https://img.shields.io/npm/dm/%40openlit%2Fts)](https://www.npmjs.com/package/@openlit/ts)
+[![GitHub Last Commit](https://img.shields.io/github/last-commit/openlit/openlit)](https://github.com/openlit/openlit/pulse)
+[![GitHub Contributors](https://img.shields.io/github/contributors/openlit/openlit)](https://github.com/openlit/openlit/graphs/contributors)
+
+[![Slack](https://img.shields.io/badge/Slack-4A154B?logo=slack&logoColor=white)](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ)
+[![Discord](https://img.shields.io/badge/Discord-7289DA?logo=discord&logoColor=white)](https://discord.gg/CQnXwNT3)
+[![X](https://img.shields.io/badge/follow-%40openlit__io-1DA1F2?logo=x&style=social)](https://twitter.com/openlit_io)
+
+![OpenLIT Connections Banner](https://github.com/openlit/.github/blob/main/profile/assets/github-readme-connections-banner.png?raw=true)
+
+</div>
+
+OpenLIT Typescript SDK is an **OpenTelemetry-native** Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects. Designed with simplicity and efficiency, OpenLIT offers the ability to embed observability into your GenAI-driven projects effortlessly using just **a single line of code**.
+
+Whether you're directly using LLM Libraries like OpenAI or Anthropic, OpenLIT seamlessly integrates observability into your applications, ensuring enhanced performance and reliability across diverse scenarios.
+
+This project adheres to the [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/docs/gen-ai) proposed by the OpenTelemetry community. You can check out the current definitions [here](src/semantic-convention.ts).
+
+## Auto Instrumentation Capabilities
+
+| LLMs |
+| --------------------------------------------------------------------- |
+| [✅ OpenAI](https://docs.openlit.io/latest/integrations/openai) | [✅ ChromaDB](https://docs.openlit.io/latest/integrations/chromadb) | [✅ LiteLLM](https://docs.openlit.io/latest/integrations/litellm) | |
+| [✅ Anthropic](https://docs.openlit.io/latest/integrations/anthropic) |
+
+## Supported Destinations
+
+- [✅ OpenTelemetry Collector](https://docs.openlit.io/latest/connections/otelcol)
+- [✅ Prometheus + Tempo](https://docs.openlit.io/latest/connections/prometheus-tempo)
+- [✅ Prometheus + Jaeger](https://docs.openlit.io/latest/connections/prometheus-jaeger)
+- [✅ Grafana Cloud](https://docs.openlit.io/latest/connections/grafanacloud)
+- [✅ New Relic](https://docs.openlit.io/latest/connections/new-relic)
+- [✅ Elastic](https://docs.openlit.io/latest/connections/elastic)
+- [✅ HyperDX](https://docs.openlit.io/latest/connections/hyperdx)
+- [✅ DataDog](https://docs.openlit.io/latest/connections/datadog)
+- [✅ SigNoz](https://docs.openlit.io/latest/connections/signoz)
+- [✅ OneUptime](https://docs.openlit.io/latest/connections/oneuptime)
+- [✅ Dynatrace](https://docs.openlit.io/latest/connections/dynatrace)
+- [✅ OpenObserve](https://docs.openlit.io/latest/connections/openobserve)
+- [✅ Highlight.io](https://docs.openlit.io/latest/connections/highlight)
+
+## 💿 Installation
+
+```bash
+npm install @openlit/ts
+```
+
+## 🚀 Getting Started
+
+### Step 1: Install OpenLIT
+
+Open your command line or terminal and run:
+
+```bash
+npm install @openlit/ts
+```
+
+### Step 2: Initialize OpenLIT in your Application
+
+Integrating the OpenLIT into LLM applications is straightforward. Start monitoring for your LLM Application with just **two lines of code**:
+
+```typescript
+import Openlit from '@openlit/ts';
+
+Openlit.init();
+```
+
+To forward telemetry data to an HTTP OTLP endpoint, such as the OpenTelemetry Collector, set the `otlpEndpoint` parameter with the desired endpoint. Alternatively, you can configure the endpoint by setting the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable as recommended in the OpenTelemetry documentation.
+
+> 💡 Info: If you dont provide `otlpEndpoint` function argument or set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable, OpenLIT directs the trace directly to your console, which can be useful during development.
+
+To send telemetry to OpenTelemetry backends requiring authentication, set the `otlpHeaders` parameter with its desired value. Alternatively, you can configure the endpoint by setting the `OTEL_EXPORTER_OTLP_HEADERS` environment variable as recommended in the OpenTelemetry documentation.
+
+#### Example
+
+---
+
+<details>
+ <summary>Initialize using Function Arguments</summary>
+
+ ---
+
+Add the following two lines to your application code:
+
+```typescript
+import Openlit from '@openlit/ts';
+
+Openlit.init({
+ otlpEndpoint: 'YOUR_OTEL_ENDPOINT',
+ otlpHeaders: 'YOUR_OTEL_ENDPOINT_AUTH'
+});
+```
+
+</details>
+
+---
+
+<details>
+
+ <summary>Initialize using Environment Variables</summary>
+
+---
+
+Add the following two lines to your application code:
+
+```typescript
+import Openlit from "@openlit/ts"
+
+Openlit.init()
+```
+
+Then, configure the your OTLP endpoint using environment variable:
+
+```env
+export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT"
+export OTEL_EXPORTER_OTLP_HEADERS = "YOUR_OTEL_ENDPOINT_AUTH"
+```
+
+</details>
+
+---
+
+### Step 3: Visualize and Optimize!
+
+With the LLM Observability data now being collected and sent to OpenLIT, the next step is to visualize and analyze this data to get insights into your LLM application’s performance, behavior, and identify areas of improvement.
+
+To begin exploring your LLM Application's performance data within the OpenLIT UI, please see the [Quickstart Guide](https://docs.openlit.io/latest/quickstart).
+
+If you want to integrate and send metrics and traces to your existing observability tools, refer to our [Connections Guide](https://docs.openlit.io/latest/connections/intro) for detailed instructions.
+
+![](https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-1.png?raw=true)
+
+### Configuration
+
+Below is a detailed overview of the configuration options available, allowing you to adjust OpenLIT's behavior and functionality to align with your specific observability needs:
+
+| Argument | Description | Default Value | Required |
+| ------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | -------- |
+| `environment` | The deployment environment of the application. | `"default"` | No |
+| `applicationName` | Identifies the name of your application. | `"default"` | No |
+| `tracer` | An instance of OpenTelemetry Tracer for tracing operations. | `undefined` | No |
+| `otlpEndpoint` | Specifies the OTLP endpoint for transmitting telemetry data. | `undefined` | No |
+| `otlpHeaders` | Defines headers for the OTLP exporter, useful for backends requiring authentication. | `undefined` | No |
+| `disableBatch` | A flag to disable batch span processing, favoring immediate dispatch. | `true` | No |
+| `traceContent` | Enables tracing of content for deeper insights. | `true` | No |
+| `disabledInstrumentations` | List of instrumentations to disable. | `undefined` | No |
+| `instrumentations` | Object of instrumentation modules for manual patching | `undefined` | No |
+| `pricing_json` | URL or file path of the pricing JSON file. | `https://github.com/openlit/openlit/blob/main/assets/pricing.json` | No |
+
+## 🌱 Contributing
+
+Whether it's big or small, we love contributions 💚. Check out our [Contribution guide](../../CONTRIBUTING.md) to get started
+
+Unsure where to start? Here are a few ways to get involved:
+
+- Join our [Slack](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ) or [Discord](https://discord.gg/rjvTm6zd) community to discuss ideas, share feedback, and connect with both our team and the wider OpenLIT community.
+
+Your input helps us grow and improve, and we're here to support you every step of the way.
+
+## 💚 Community & Support
+
+Connect with the OpenLIT community and maintainers for support, discussions, and updates:
+
+- 🌟 If you like it, Leave a star on our [GitHub](https://github.com/openlit/openlit/)
+- 🌍 Join our [Slack](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ) or [Discord](https://discord.gg/CQnXwNT3) community for live interactions and questions.
+- 🐞 Report bugs on our [GitHub Issues](https://github.com/openlit/openlit/issues) to help us improve OpenLIT.
+- 𝕏 Follow us on [X](https://x.com/openlit_io) for the latest updates and news.
diff --git a/sdk/typescript/eslint.config.mjs b/sdk/typescript/eslint.config.mjs
new file mode 100644
index 00000000..67c6a340
--- /dev/null
+++ b/sdk/typescript/eslint.config.mjs
@@ -0,0 +1,10 @@
+import globals from "globals";
+import pluginJs from "@eslint/js";
+import tseslint from "typescript-eslint";
+
+
+export default [
+ {languageOptions: { globals: globals.browser }},
+ pluginJs.configs.recommended,
+ ...tseslint.configs.recommended,
+];
\ No newline at end of file
diff --git a/sdk/typescript/package-lock.json b/sdk/typescript/package-lock.json
new file mode 100644
index 00000000..32d2ace6
--- /dev/null
+++ b/sdk/typescript/package-lock.json
@@ -0,0 +1,3815 @@
+{
+ "name": "@openlit/ts",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@openlit/ts",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@anthropic-ai/sdk": "^0.25.0",
+ "@opentelemetry/api": "^1.8.0",
+ "@opentelemetry/auto-instrumentations-node": "^0.46.1",
+ "@opentelemetry/exporter-jaeger": "^1.24.1",
+ "@opentelemetry/exporter-otlp-http": "^0.26.0",
+ "@opentelemetry/instrumentation": "^0.51.1",
+ "@opentelemetry/resources": "^1.24.1",
+ "@opentelemetry/sdk-metrics": "^1.24.1",
+ "@opentelemetry/sdk-trace-base": "^1.24.1",
+ "@opentelemetry/sdk-trace-node": "^1.24.1",
+ "@opentelemetry/semantic-conventions": "^1.24.1",
+ "js-tiktoken": "^1.0.12",
+ "openai": "^4.47.1",
+ "tiktoken": "^1.0.15"
+ },
+ "devDependencies": {
+ "@eslint/js": "^9.2.0",
+ "eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.1.3",
+ "globals": "^15.1.0",
+ "prettier": "^3.2.5",
+ "typescript": "^5.4.5",
+ "typescript-eslint": "^7.8.0"
+ }
+ },
+ "../../../opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-openai": {
+ "name": "@opentelemetry/instrumentation-openai",
+ "version": "0.1.0",
+ "extraneous": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.52.0",
+ "openai": "^4.47.1"
+ },
+ "devDependencies": {
+ "@opentelemetry/api": "^1.3.0",
+ "@types/node": "18.6.5",
+ "typescript": "^5.5.4"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@anthropic-ai/sdk": {
+ "version": "0.25.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "^18.11.18",
+ "@types/node-fetch": "^2.6.4",
+ "abort-controller": "^3.0.0",
+ "agentkeepalive": "^4.2.1",
+ "form-data-encoder": "1.7.2",
+ "formdata-node": "^4.3.2",
+ "node-fetch": "^2.6.7"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.10.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "2.1.4",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/globals": {
+ "version": "13.24.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "9.2.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@grpc/grpc-js": {
+ "version": "1.10.8",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/proto-loader": "^0.7.13",
+ "@js-sdsl/ordered-map": "^4.4.2"
+ },
+ "engines": {
+ "node": ">=12.10.0"
+ }
+ },
+ "node_modules/@grpc/proto-loader": {
+ "version": "0.7.13",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "lodash.camelcase": "^4.3.0",
+ "long": "^5.0.0",
+ "protobufjs": "^7.2.5",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array": {
+ "version": "0.11.14",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanwhocodes/object-schema": "^2.0.2",
+ "debug": "^4.3.1",
+ "minimatch": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=10.10.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/object-schema": {
+ "version": "2.0.3",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@js-sdsl/ordered-map": {
+ "version": "4.4.2",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/js-sdsl"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@opentelemetry/api": {
+ "version": "1.8.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/api-logs": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@opentelemetry/api-metrics": {
+ "version": "0.26.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node": {
+ "version": "0.46.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/instrumentation-amqplib": "^0.37.0",
+ "@opentelemetry/instrumentation-aws-lambda": "^0.41.1",
+ "@opentelemetry/instrumentation-aws-sdk": "^0.41.0",
+ "@opentelemetry/instrumentation-bunyan": "^0.38.0",
+ "@opentelemetry/instrumentation-cassandra-driver": "^0.38.0",
+ "@opentelemetry/instrumentation-connect": "^0.36.1",
+ "@opentelemetry/instrumentation-cucumber": "^0.6.0",
+ "@opentelemetry/instrumentation-dataloader": "^0.9.0",
+ "@opentelemetry/instrumentation-dns": "^0.36.1",
+ "@opentelemetry/instrumentation-express": "^0.39.0",
+ "@opentelemetry/instrumentation-fastify": "^0.36.1",
+ "@opentelemetry/instrumentation-fs": "^0.12.0",
+ "@opentelemetry/instrumentation-generic-pool": "^0.36.0",
+ "@opentelemetry/instrumentation-graphql": "^0.40.0",
+ "@opentelemetry/instrumentation-grpc": "^0.51.0",
+ "@opentelemetry/instrumentation-hapi": "^0.38.0",
+ "@opentelemetry/instrumentation-http": "^0.51.0",
+ "@opentelemetry/instrumentation-ioredis": "^0.40.0",
+ "@opentelemetry/instrumentation-knex": "^0.36.1",
+ "@opentelemetry/instrumentation-koa": "^0.40.0",
+ "@opentelemetry/instrumentation-lru-memoizer": "^0.37.0",
+ "@opentelemetry/instrumentation-memcached": "^0.36.0",
+ "@opentelemetry/instrumentation-mongodb": "^0.43.0",
+ "@opentelemetry/instrumentation-mongoose": "^0.38.1",
+ "@opentelemetry/instrumentation-mysql": "^0.38.1",
+ "@opentelemetry/instrumentation-mysql2": "^0.38.1",
+ "@opentelemetry/instrumentation-nestjs-core": "^0.37.1",
+ "@opentelemetry/instrumentation-net": "^0.36.0",
+ "@opentelemetry/instrumentation-pg": "^0.41.0",
+ "@opentelemetry/instrumentation-pino": "^0.39.0",
+ "@opentelemetry/instrumentation-redis": "^0.39.1",
+ "@opentelemetry/instrumentation-redis-4": "^0.39.0",
+ "@opentelemetry/instrumentation-restify": "^0.38.0",
+ "@opentelemetry/instrumentation-router": "^0.37.0",
+ "@opentelemetry/instrumentation-socket.io": "^0.39.0",
+ "@opentelemetry/instrumentation-tedious": "^0.10.1",
+ "@opentelemetry/instrumentation-undici": "^0.2.0",
+ "@opentelemetry/instrumentation-winston": "^0.37.0",
+ "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.9",
+ "@opentelemetry/resource-detector-aws": "^1.5.0",
+ "@opentelemetry/resource-detector-azure": "^0.2.6",
+ "@opentelemetry/resource-detector-container": "^0.3.9",
+ "@opentelemetry/resource-detector-gcp": "^0.29.9",
+ "@opentelemetry/resources": "^1.24.0",
+ "@opentelemetry/sdk-node": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.4.1"
+ }
+ },
+ "node_modules/@opentelemetry/context-async-hooks": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/core": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-jaeger": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1",
+ "@opentelemetry/semantic-conventions": "1.24.1",
+ "jaeger-client": "^3.15.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-otlp-http": {
+ "version": "0.26.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-metrics": "0.26.0",
+ "@opentelemetry/core": "1.0.0",
+ "@opentelemetry/resources": "1.0.0",
+ "@opentelemetry/sdk-metrics-base": "0.26.0",
+ "@opentelemetry/sdk-trace-base": "1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-otlp-http/node_modules/@opentelemetry/core": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "1.0.0",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=8.5.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-otlp-http/node_modules/@opentelemetry/resources": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.0.0",
+ "@opentelemetry/semantic-conventions": "1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-otlp-http/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.0.0",
+ "@opentelemetry/resources": "1.0.0",
+ "@opentelemetry/semantic-conventions": "1.0.0",
+ "lodash.merge": "^4.6.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-otlp-http/node_modules/@opentelemetry/semantic-conventions": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.7.1",
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.51.1",
+ "@opentelemetry/otlp-transformer": "0.51.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-http": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/otlp-exporter-base": "0.51.1",
+ "@opentelemetry/otlp-transformer": "0.51.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/otlp-exporter-base": "0.51.1",
+ "@opentelemetry/otlp-proto-exporter-base": "0.51.1",
+ "@opentelemetry/otlp-transformer": "0.51.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-zipkin": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1",
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.51.1",
+ "@types/shimmer": "^1.0.2",
+ "import-in-the-middle": "1.7.4",
+ "require-in-the-middle": "^7.1.1",
+ "semver": "^7.5.2",
+ "shimmer": "^1.2.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib": {
+ "version": "0.37.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda": {
+ "version": "0.41.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/propagator-aws-xray": "^1.3.1",
+ "@opentelemetry/resources": "^1.8.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@types/aws-lambda": "8.10.122"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk": {
+ "version": "0.41.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/propagation-utils": "^0.30.9",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan": {
+ "version": "0.38.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.51.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@types/bunyan": "1.8.9"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver": {
+ "version": "0.38.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect": {
+ "version": "0.36.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@types/connect": "3.4.36"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber": {
+ "version": "0.6.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader": {
+ "version": "0.9.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns": {
+ "version": "0.36.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express": {
+ "version": "0.39.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fastify": {
+ "version": "0.36.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs": {
+ "version": "0.12.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool": {
+ "version": "0.36.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql": {
+ "version": "0.40.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "0.51.1",
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi": {
+ "version": "0.38.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/instrumentation": "0.51.1",
+ "@opentelemetry/semantic-conventions": "1.24.1",
+ "semver": "^7.5.2"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis": {
+ "version": "0.40.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/redis-common": "^0.36.2",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex": {
+ "version": "0.36.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa": {
+ "version": "0.40.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@types/koa": "2.14.0",
+ "@types/koa__router": "12.0.3"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer": {
+ "version": "0.37.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached": {
+ "version": "0.36.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0",
+ "@types/memcached": "^2.2.6"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb": {
+ "version": "0.43.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/sdk-metrics": "^1.9.1",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose": {
+ "version": "0.38.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql": {
+ "version": "0.38.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@types/mysql": "2.15.22"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2": {
+ "version": "0.38.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@opentelemetry/sql-common": "^0.40.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core": {
+ "version": "0.37.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net": {
+ "version": "0.36.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg": {
+ "version": "0.41.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@opentelemetry/sql-common": "^0.40.1",
+ "@types/pg": "8.6.1",
+ "@types/pg-pool": "2.0.4"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino": {
+ "version": "0.39.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis": {
+ "version": "0.39.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/redis-common": "^0.36.2",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis-4": {
+ "version": "0.39.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/redis-common": "^0.36.2",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify": {
+ "version": "0.38.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router": {
+ "version": "0.37.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io": {
+ "version": "0.39.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious": {
+ "version": "0.10.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.51.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "@types/tedious": "^4.0.10"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici": {
+ "version": "0.2.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.8.0",
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.7.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston": {
+ "version": "0.37.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.51.0",
+ "@opentelemetry/instrumentation": "^0.51.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.7.1",
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/otlp-exporter-base": "0.51.1",
+ "protobufjs": "^7.2.3"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-proto-exporter-base": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/otlp-exporter-base": "0.51.1",
+ "protobufjs": "^7.2.3"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.51.1",
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-logs": "0.51.1",
+ "@opentelemetry/sdk-metrics": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagation-utils": {
+ "version": "0.30.9",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-aws-xray": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-b3": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-jaeger": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/redis-common": {
+ "version": "0.36.2",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-alibaba-cloud": {
+ "version": "0.28.9",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/resources": "^1.0.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-aws": {
+ "version": "1.5.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.0.0",
+ "@opentelemetry/resources": "^1.0.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-azure": {
+ "version": "0.2.7",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/resources": "^1.10.1",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-container": {
+ "version": "0.3.9",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/resources": "^1.0.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-gcp": {
+ "version": "0.29.9",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.0.0",
+ "@opentelemetry/resources": "^1.0.0",
+ "@opentelemetry/semantic-conventions": "^1.22.0",
+ "gcp-metadata": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resources": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/resources": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.9.0",
+ "@opentelemetry/api-logs": ">=0.39.1"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/resources": "1.24.1",
+ "lodash.merge": "^4.6.2"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics-base": {
+ "version": "0.26.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-metrics": "0.26.0",
+ "@opentelemetry/core": "1.0.0",
+ "@opentelemetry/resources": "1.0.0",
+ "lodash.merge": "^4.6.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics-base/node_modules/@opentelemetry/core": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "1.0.0",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=8.5.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics-base/node_modules/@opentelemetry/resources": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.0.0",
+ "@opentelemetry/semantic-conventions": "1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.2"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics-base/node_modules/@opentelemetry/semantic-conventions": {
+ "version": "1.0.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node": {
+ "version": "0.51.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.51.1",
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1",
+ "@opentelemetry/exporter-trace-otlp-http": "0.51.1",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.51.1",
+ "@opentelemetry/exporter-zipkin": "1.24.1",
+ "@opentelemetry/instrumentation": "0.51.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/sdk-logs": "0.51.1",
+ "@opentelemetry/sdk-metrics": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1",
+ "@opentelemetry/sdk-trace-node": "1.24.1",
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/resources": "1.24.1",
+ "@opentelemetry/semantic-conventions": "1.24.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-trace-node": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/context-async-hooks": "1.24.1",
+ "@opentelemetry/core": "1.24.1",
+ "@opentelemetry/propagator-b3": "1.24.1",
+ "@opentelemetry/propagator-jaeger": "1.24.1",
+ "@opentelemetry/sdk-trace-base": "1.24.1",
+ "semver": "^7.5.2"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/semantic-conventions": {
+ "version": "1.24.1",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@opentelemetry/sql-common": {
+ "version": "0.40.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.1.0"
+ }
+ },
+ "node_modules/@pkgr/core": {
+ "version": "0.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
+ "node_modules/@protobufjs/aspromise": {
+ "version": "1.1.2",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/base64": {
+ "version": "1.1.2",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/codegen": {
+ "version": "2.0.4",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/eventemitter": {
+ "version": "1.1.0",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/fetch": {
+ "version": "1.1.0",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@protobufjs/aspromise": "^1.1.1",
+ "@protobufjs/inquire": "^1.1.0"
+ }
+ },
+ "node_modules/@protobufjs/float": {
+ "version": "1.0.2",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/inquire": {
+ "version": "1.1.0",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/path": {
+ "version": "1.1.2",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/pool": {
+ "version": "1.1.0",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/utf8": {
+ "version": "1.1.0",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@types/accepts": {
+ "version": "1.3.7",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/aws-lambda": {
+ "version": "8.10.122",
+ "license": "MIT"
+ },
+ "node_modules/@types/body-parser": {
+ "version": "1.19.5",
+ "license": "MIT",
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/bunyan": {
+ "version": "1.8.9",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/connect": {
+ "version": "3.4.36",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/content-disposition": {
+ "version": "0.5.8",
+ "license": "MIT"
+ },
+ "node_modules/@types/cookies": {
+ "version": "0.9.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/express": "*",
+ "@types/keygrip": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/express": {
+ "version": "4.17.21",
+ "license": "MIT",
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.33",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "node_modules/@types/express-serve-static-core": {
+ "version": "4.19.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/http-assert": {
+ "version": "1.5.5",
+ "license": "MIT"
+ },
+ "node_modules/@types/http-errors": {
+ "version": "2.0.4",
+ "license": "MIT"
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/keygrip": {
+ "version": "1.0.6",
+ "license": "MIT"
+ },
+ "node_modules/@types/koa": {
+ "version": "2.14.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/accepts": "*",
+ "@types/content-disposition": "*",
+ "@types/cookies": "*",
+ "@types/http-assert": "*",
+ "@types/http-errors": "*",
+ "@types/keygrip": "*",
+ "@types/koa-compose": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/koa__router": {
+ "version": "12.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "@types/koa": "*"
+ }
+ },
+ "node_modules/@types/koa-compose": {
+ "version": "3.2.8",
+ "license": "MIT",
+ "dependencies": {
+ "@types/koa": "*"
+ }
+ },
+ "node_modules/@types/memcached": {
+ "version": "2.2.10",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/mime": {
+ "version": "1.3.5",
+ "license": "MIT"
+ },
+ "node_modules/@types/mysql": {
+ "version": "2.15.22",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "18.19.33",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/node-fetch": {
+ "version": "2.6.11",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "form-data": "^4.0.0"
+ }
+ },
+ "node_modules/@types/pg": {
+ "version": "8.6.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "pg-protocol": "*",
+ "pg-types": "^2.2.0"
+ }
+ },
+ "node_modules/@types/pg-pool": {
+ "version": "2.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "@types/pg": "*"
+ }
+ },
+ "node_modules/@types/qs": {
+ "version": "6.9.15",
+ "license": "MIT"
+ },
+ "node_modules/@types/range-parser": {
+ "version": "1.2.7",
+ "license": "MIT"
+ },
+ "node_modules/@types/semver": {
+ "version": "7.5.8",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/send": {
+ "version": "0.17.4",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mime": "^1",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/serve-static": {
+ "version": "1.15.7",
+ "license": "MIT",
+ "dependencies": {
+ "@types/http-errors": "*",
+ "@types/node": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/shimmer": {
+ "version": "1.0.5",
+ "license": "MIT"
+ },
+ "node_modules/@types/tedious": {
+ "version": "4.0.14",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.10.0",
+ "@typescript-eslint/scope-manager": "7.8.0",
+ "@typescript-eslint/type-utils": "7.8.0",
+ "@typescript-eslint/utils": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0",
+ "debug": "^4.3.4",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.3.1",
+ "natural-compare": "^1.4.0",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^1.3.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^7.0.0",
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "7.8.0",
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/typescript-estree": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/typescript-estree": "7.8.0",
+ "@typescript-eslint/utils": "7.8.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.3.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^1.3.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.4",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@types/json-schema": "^7.0.15",
+ "@types/semver": "^7.5.8",
+ "@typescript-eslint/scope-manager": "7.8.0",
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/typescript-estree": "7.8.0",
+ "semver": "^7.6.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "7.8.0",
+ "eslint-visitor-keys": "^3.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.2.0",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/abort-controller": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "event-target-shim": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=6.5"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.11.3",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-import-attributes": {
+ "version": "1.9.5",
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^8"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.1",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/agentkeepalive": {
+ "version": "4.5.0",
+ "license": "MIT",
+ "dependencies": {
+ "humanize-ms": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-color": {
+ "version": "0.2.1"
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "dev": true,
+ "license": "Python-2.0"
+ },
+ "node_modules/array-union": {
+ "version": "2.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "license": "MIT"
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/bignumber.js": {
+ "version": "9.1.2",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/bufrw": {
+ "version": "1.4.0",
+ "dependencies": {
+ "ansi-color": "^0.2.1",
+ "error": "^7.0.0",
+ "hexer": "^1.5.0",
+ "xtend": "^4.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10.x"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/cjs-module-lexer": {
+ "version": "1.3.1",
+ "license": "MIT"
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "license": "MIT"
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "license": "MIT"
+ },
+ "node_modules/error": {
+ "version": "7.0.2",
+ "dependencies": {
+ "string-template": "~0.2.1",
+ "xtend": "~4.0.0"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.1.2",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "8.57.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.4",
+ "@eslint/js": "8.57.0",
+ "@humanwhocodes/config-array": "^0.11.14",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "@ungap/structured-clone": "^1.2.0",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-config-prettier": {
+ "version": "9.1.0",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-prettier": {
+ "version": "5.1.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prettier-linter-helpers": "^1.0.0",
+ "synckit": "^0.8.6"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-plugin-prettier"
+ },
+ "peerDependencies": {
+ "@types/eslint": ">=8.0.0",
+ "eslint": ">=8.0.0",
+ "eslint-config-prettier": "*",
+ "prettier": ">=3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/eslint": {
+ "optional": true
+ },
+ "eslint-config-prettier": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "7.2.2",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/@eslint/js": {
+ "version": "8.57.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/eslint/node_modules/globals": {
+ "version": "13.24.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/espree": {
+ "version": "9.6.1",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.5.0",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/event-target-shim": {
+ "version": "5.0.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "license": "MIT"
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-diff": {
+ "version": "1.3.0",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fastq": {
+ "version": "1.17.1",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "6.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flat-cache": "^3.0.4"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "3.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.3.1",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/form-data": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/form-data-encoder": {
+ "version": "1.7.2",
+ "license": "MIT"
+ },
+ "node_modules/formdata-node": {
+ "version": "4.4.1",
+ "license": "MIT",
+ "dependencies": {
+ "node-domexception": "1.0.0",
+ "web-streams-polyfill": "4.0.0-beta.3"
+ },
+ "engines": {
+ "node": ">= 12.20"
+ }
+ },
+ "node_modules/formdata-node/node_modules/web-streams-polyfill": {
+ "version": "4.0.0-beta.3",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gaxios": {
+ "version": "6.6.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "extend": "^3.0.2",
+ "https-proxy-agent": "^7.0.1",
+ "is-stream": "^2.0.0",
+ "node-fetch": "^2.6.9",
+ "uuid": "^9.0.1"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/gcp-metadata": {
+ "version": "6.1.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "gaxios": "^6.0.0",
+ "json-bigint": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/globals": {
+ "version": "15.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globby": {
+ "version": "11.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.2.9",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/graphemer": {
+ "version": "1.4.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hexer": {
+ "version": "1.5.0",
+ "dependencies": {
+ "ansi-color": "^0.2.1",
+ "minimist": "^1.1.0",
+ "process": "^0.10.0",
+ "xtend": "^4.0.0"
+ },
+ "bin": {
+ "hexer": "cli.js"
+ },
+ "engines": {
+ "node": ">= 0.10.x"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/humanize-ms": {
+ "version": "1.2.1",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.0.0"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.3.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/import-in-the-middle": {
+ "version": "1.7.4",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.8.2",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^1.2.2",
+ "module-details-from-path": "^1.0.3"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/is-core-module": {
+ "version": "2.13.1",
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/jaeger-client": {
+ "version": "3.19.0",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "node-int64": "^0.4.0",
+ "opentracing": "^0.14.4",
+ "thriftrw": "^3.5.0",
+ "uuid": "^8.3.2",
+ "xorshift": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/jaeger-client/node_modules/uuid": {
+ "version": "8.3.2",
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/js-tiktoken": {
+ "version": "1.0.12",
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.5.1"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-bigint": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "bignumber.js": "^9.0.0"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.camelcase": {
+ "version": "4.3.0",
+ "license": "MIT"
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "license": "MIT"
+ },
+ "node_modules/long": {
+ "version": "5.2.3",
+ "license": "Apache-2.0"
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/module-details-from-path": {
+ "version": "1.0.3",
+ "license": "MIT"
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "license": "MIT"
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/node-int64": {
+ "version": "0.4.0",
+ "license": "MIT"
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/openai": {
+ "version": "4.47.1",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/node": "^18.11.18",
+ "@types/node-fetch": "^2.6.4",
+ "abort-controller": "^3.0.0",
+ "agentkeepalive": "^4.2.1",
+ "form-data-encoder": "1.7.2",
+ "formdata-node": "^4.3.2",
+ "node-fetch": "^2.6.7",
+ "web-streams-polyfill": "^3.2.1"
+ },
+ "bin": {
+ "openai": "bin/cli"
+ }
+ },
+ "node_modules/opentracing": {
+ "version": "0.14.7",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.4",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "license": "MIT"
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pg-int8": {
+ "version": "1.0.1",
+ "license": "ISC",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/pg-protocol": {
+ "version": "1.6.1",
+ "license": "MIT"
+ },
+ "node_modules/pg-types": {
+ "version": "2.2.0",
+ "license": "MIT",
+ "dependencies": {
+ "pg-int8": "1.0.1",
+ "postgres-array": "~2.0.0",
+ "postgres-bytea": "~1.0.0",
+ "postgres-date": "~1.0.4",
+ "postgres-interval": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postgres-array": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postgres-bytea": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-date": {
+ "version": "1.0.7",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-interval": {
+ "version": "1.2.0",
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.2.5",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prettier-linter-helpers": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-diff": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/process": {
+ "version": "0.10.1",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/protobufjs": {
+ "version": "7.3.0",
+ "hasInstallScript": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@protobufjs/aspromise": "^1.1.2",
+ "@protobufjs/base64": "^1.1.2",
+ "@protobufjs/codegen": "^2.0.4",
+ "@protobufjs/eventemitter": "^1.1.0",
+ "@protobufjs/fetch": "^1.1.0",
+ "@protobufjs/float": "^1.0.2",
+ "@protobufjs/inquire": "^1.1.0",
+ "@protobufjs/path": "^1.1.2",
+ "@protobufjs/pool": "^1.1.0",
+ "@protobufjs/utf8": "^1.1.0",
+ "@types/node": ">=13.7.0",
+ "long": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-in-the-middle": {
+ "version": "7.3.0",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "module-details-from-path": "^1.0.3",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.8",
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.6.1",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shimmer": {
+ "version": "1.2.1",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-template": {
+ "version": "0.2.1"
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/synckit": {
+ "version": "0.8.8",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@pkgr/core": "^0.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
+ "node_modules/text-table": {
+ "version": "0.2.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/thriftrw": {
+ "version": "3.11.4",
+ "dependencies": {
+ "bufrw": "^1.2.1",
+ "error": "7.0.2",
+ "long": "^2.4.0"
+ },
+ "bin": {
+ "thrift2json": "thrift2json.js"
+ },
+ "engines": {
+ "node": ">= 0.10.x"
+ }
+ },
+ "node_modules/thriftrw/node_modules/long": {
+ "version": "2.4.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tiktoken": {
+ "version": "1.0.15",
+ "license": "MIT"
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "0.0.3",
+ "license": "MIT"
+ },
+ "node_modules/ts-api-utils": {
+ "version": "1.3.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.2.0"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "dev": true,
+ "license": "0BSD"
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "dev": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.4.5",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-eslint": {
+ "version": "7.8.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "7.8.0",
+ "@typescript-eslint/parser": "7.8.0",
+ "@typescript-eslint/utils": "7.8.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "license": "MIT"
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "9.0.1",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/web-streams-polyfill": {
+ "version": "3.3.3",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/xorshift": {
+ "version": "1.2.0",
+ "license": "MIT"
+ },
+ "node_modules/xtend": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ }
+}
diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json
new file mode 100644
index 00000000..456aa7fa
--- /dev/null
+++ b/sdk/typescript/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "@openlit/ts",
+ "version": "1.0.0",
+ "homepage": "https://github.com/openlit/openlit#readme",
+ "bugs": {
+ "url": "https://github.com/openlit/openlit/issues",
+ "email": "[email protected]"
+ },
+ "description": "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects",
+ "main": "src/index.ts",
+ "keywords": [
+ "OpenTelemetry",
+ "otel",
+ "otlp",
+ "llm",
+ "tracing",
+ "openai",
+ "anthropic",
+ "claude",
+ "cohere",
+ "llm monitoring",
+ "observability",
+ "monitoring",
+ "gpt",
+ "Generative AI",
+ "chatGPT"
+ ],
+ "author": "Aman Agarwal <[email protected]>",
+ "license": "ISC",
+ "devDependencies": {
+ "@eslint/js": "^9.2.0",
+ "eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.1.3",
+ "globals": "^15.1.0",
+ "prettier": "^3.2.5",
+ "typescript": "^5.4.5",
+ "typescript-eslint": "^7.8.0"
+ },
+ "dependencies": {
+ "@anthropic-ai/sdk": "^0.25.0",
+ "@opentelemetry/api": "^1.8.0",
+ "@opentelemetry/auto-instrumentations-node": "^0.46.1",
+ "@opentelemetry/exporter-jaeger": "^1.24.1",
+ "@opentelemetry/exporter-otlp-http": "^0.26.0",
+ "@opentelemetry/instrumentation": "^0.51.1",
+ "@opentelemetry/resources": "^1.24.1",
+ "@opentelemetry/sdk-metrics": "^1.24.1",
+ "@opentelemetry/sdk-trace-base": "^1.24.1",
+ "@opentelemetry/sdk-trace-node": "^1.24.1",
+ "@opentelemetry/semantic-conventions": "^1.24.1",
+ "js-tiktoken": "^1.0.12",
+ "openai": "^4.47.1",
+ "tiktoken": "^1.0.15"
+ }
+}
diff --git a/sdk/typescript/src/config.ts b/sdk/typescript/src/config.ts
new file mode 100644
index 00000000..e69bd7d1
--- /dev/null
+++ b/sdk/typescript/src/config.ts
@@ -0,0 +1,45 @@
+import { Tracer } from '@opentelemetry/api';
+import OpenLitHelper from './helpers';
+import { OpenlitConfigInterface, PricingObject } from './types';
+
+export default class OpenlitConfig {
+ static environment: OpenlitConfigInterface['environment'];
+ static applicationName: OpenlitConfigInterface['applicationName'];
+ static pricingInfo: PricingObject;
+ static tracer: OpenlitConfigInterface['tracer'];
+ static otlpEndpoint?: OpenlitConfigInterface['otlpEndpoint'];
+ static otlpHeaders?: OpenlitConfigInterface['otlpHeaders'];
+ static disableBatch?: OpenlitConfigInterface['disableBatch'];
+ static traceContent?: OpenlitConfigInterface['traceContent'];
+ static pricing_json?: OpenlitConfigInterface['pricing_json'];
+
+ static async updatePricingJson(pricing_json: any) {
+ try {
+ const response = await OpenLitHelper.fetchPricingInfo(pricing_json);
+ this.pricingInfo = response;
+ } catch (e) {
+ this.pricingInfo = {};
+ }
+ return this.pricingInfo;
+ }
+
+ static updateConfig({
+ environment = 'default',
+ applicationName = 'default',
+ tracer,
+ otlpEndpoint,
+ otlpHeaders,
+ disableBatch = true,
+ traceContent = true,
+ pricing_json,
+ }: OpenlitConfigInterface) {
+ this.environment = environment;
+ this.applicationName = applicationName;
+ this.tracer = tracer;
+ this.otlpEndpoint = otlpEndpoint;
+ this.otlpHeaders = otlpHeaders;
+ this.disableBatch = disableBatch;
+ this.traceContent = traceContent;
+ this.pricing_json = pricing_json;
+ }
+}
diff --git a/sdk/typescript/src/constant.ts b/sdk/typescript/src/constant.ts
new file mode 100644
index 00000000..46dfbc7f
--- /dev/null
+++ b/sdk/typescript/src/constant.ts
@@ -0,0 +1,5 @@
+export const SDK_NAME = "openlit";
+export const DEFAULT_ENVIRONMENT = "default";
+export const DEFAULT_APPLICATION_NAME = "default";
+export const INSTRUMENTATION_PREFIX = "@openlit";
+export const TELEMETRY_SDK_NAME = 'opentelemetry';
\ No newline at end of file
diff --git a/sdk/typescript/src/helpers.ts b/sdk/typescript/src/helpers.ts
new file mode 100644
index 00000000..f1d91273
--- /dev/null
+++ b/sdk/typescript/src/helpers.ts
@@ -0,0 +1,122 @@
+import { encodingForModel, TiktokenModel } from 'js-tiktoken';
+import { Span, SpanStatusCode } from '@opentelemetry/api';
+
+export default class OpenLitHelper {
+ static readonly PROMPT_TOKEN_FACTOR = 1000;
+
+ static openaiTokens(text: string, model: string): number {
+ try {
+ const encoding = encodingForModel(model as TiktokenModel);
+ return encoding.encode(text).length;
+ } catch (error) {
+ console.error(`Error in openaiTokens: ${error}`);
+ throw error;
+ }
+ }
+
+ static generalTokens(text: string): number {
+ const encoding = encodingForModel('gpt2');
+ return encoding.encode(text).length;
+ }
+
+ static getChatModelCost(
+ model: string,
+ pricingInfo: any,
+ promptTokens: number,
+ completionTokens: number
+ ): number {
+ try {
+ return (
+ (promptTokens / OpenLitHelper.PROMPT_TOKEN_FACTOR) * pricingInfo.chat[model].promptPrice +
+ (completionTokens / OpenLitHelper.PROMPT_TOKEN_FACTOR) *
+ pricingInfo.chat[model].completionPrice
+ );
+ } catch (error) {
+ console.error(`Error in getChatModelCost: ${error}`);
+ return 0;
+ }
+ }
+
+ static getEmbedModelCost(model: string, pricingInfo: any, promptTokens: number): number {
+ try {
+ return (promptTokens / OpenLitHelper.PROMPT_TOKEN_FACTOR) * pricingInfo.embeddings[model];
+ } catch (error) {
+ console.error(`Error in getEmbedModelCost: ${error}`);
+ return 0;
+ }
+ }
+
+ static getImageModelCost(model: string, pricingInfo: any, size: string, quality: number): number {
+ try {
+ return pricingInfo.images[model][quality][size];
+ } catch (error) {
+ console.error(`Error in getImageModelCost: ${error}`);
+ return 0;
+ }
+ }
+
+ static getAudioModelCost(model: string, pricingInfo: any, prompt: string): number {
+ try {
+ return (prompt.length / OpenLitHelper.PROMPT_TOKEN_FACTOR) * pricingInfo.audio[model];
+ } catch (error) {
+ console.error(`Error in getAudioModelCost: ${error}`);
+ return 0;
+ }
+ }
+
+ static async fetchPricingInfo(pricingJson: any) {
+ let pricingUrl = 'https://raw.githubusercontent.com/openlit/openlit/main/assets/pricing.json';
+ if (pricingJson) {
+ let isUrl = false;
+ try {
+ isUrl = !!new URL(pricingJson);
+ } catch {
+ isUrl = false;
+ }
+
+ if (isUrl) {
+ pricingUrl = pricingJson;
+ } else {
+ try {
+ if (typeof pricingJson === 'string') {
+ const json = JSON.parse(pricingJson);
+ return json;
+ } else {
+ const json = JSON.parse(JSON.stringify(pricingJson));
+ return json;
+ }
+ } catch {
+ return {};
+ }
+ }
+ }
+
+ try {
+ const response = await fetch(pricingUrl);
+ if (response.ok) {
+ return response.json();
+ } else {
+ throw new Error(`HTTP error occurred while fetching pricing info: ${response.status}`);
+ }
+ } catch (error) {
+ console.error(`Unexpected error occurred while fetching pricing info: ${error}`);
+ return {};
+ }
+ }
+
+ static handleException(span: Span, error: Error): void {
+ span.recordException(error);
+ span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
+ }
+
+ static async createStreamProxy (stream: any, generatorFuncResponse: any): Promise<any> {
+ return new Proxy(stream, {
+ get (target, prop, receiver) {
+ if (prop === Symbol.asyncIterator) {
+ return () => generatorFuncResponse
+ }
+ return Reflect.get(target, prop, receiver)
+ }
+ })
+ }
+}
diff --git a/sdk/typescript/src/index.ts b/sdk/typescript/src/index.ts
new file mode 100644
index 00000000..c8320236
--- /dev/null
+++ b/sdk/typescript/src/index.ts
@@ -0,0 +1,72 @@
+import { Resource } from '@opentelemetry/resources';
+import {
+ SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,
+ SEMRESATTRS_SERVICE_NAME,
+ SEMRESATTRS_TELEMETRY_SDK_NAME,
+} from '@opentelemetry/semantic-conventions';
+import { NodeSDK } from '@opentelemetry/sdk-node';
+import { OpenlitOptions } from './types';
+import Tracing from './tracing';
+import { DEFAULT_APPLICATION_NAME, DEFAULT_ENVIRONMENT, SDK_NAME } from './constant';
+import { SpanExporter } from '@opentelemetry/sdk-trace-base';
+
+export default class Openlit {
+ static resource: Resource;
+ static options: OpenlitOptions;
+ static _sdk: NodeSDK;
+ static init(options?: OpenlitOptions) {
+ try {
+ const { environment = DEFAULT_ENVIRONMENT, applicationName = DEFAULT_APPLICATION_NAME } =
+ options || {};
+
+ const otlpEndpoint =
+ options?.otlpEndpoint || process.env.OTEL_EXPORTER_OTLP_ENDPOINT || undefined;
+ let otlpHeaders = options?.otlpHeaders;
+ if (!otlpHeaders) {
+ if (process.env.OTEL_EXPORTER_OTLP_HEADERS) {
+ otlpHeaders = process.env.OTEL_EXPORTER_OTLP_HEADERS.split(',').reduce(
+ (acc: Record<string, any>, items: string) => {
+ const keyVal: string[] = items.split('=');
+ acc[keyVal[0]] = keyVal[1];
+ return acc;
+ },
+ {}
+ );
+ } else {
+ otlpHeaders = {};
+ }
+ }
+
+ this.options = options || {};
+ this.options.otlpEndpoint = otlpEndpoint;
+ this.options.otlpHeaders = otlpHeaders;
+ this.options.disableBatch =
+ options?.disableBatch === undefined ? true : !!options.disableBatch;
+
+ this.resource = new Resource({
+ [SEMRESATTRS_SERVICE_NAME]: applicationName,
+ [SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: environment,
+ [SEMRESATTRS_TELEMETRY_SDK_NAME]: SDK_NAME,
+ });
+
+ Tracing.setup({
+ ...this.options,
+ environment,
+ applicationName,
+ otlpEndpoint,
+ otlpHeaders,
+ resource: this.resource,
+ });
+
+ this._sdk = new NodeSDK({
+ resource: this.resource,
+ traceExporter: Tracing.traceExporter as SpanExporter,
+ });
+
+ // This was causing the traceProvider initilization with multiple instances.
+ // this._sdk.start();
+ } catch (e) {
+ console.log('Connection time out', e);
+ }
+ }
+}
diff --git a/sdk/typescript/src/instrumentation/anthropic/index.ts b/sdk/typescript/src/instrumentation/anthropic/index.ts
new file mode 100644
index 00000000..dfe3d97e
--- /dev/null
+++ b/sdk/typescript/src/instrumentation/anthropic/index.ts
@@ -0,0 +1,59 @@
+import {
+ InstrumentationBase,
+ InstrumentationModuleDefinition,
+ InstrumentationNodeModuleDefinition,
+ isWrapped,
+} from '@opentelemetry/instrumentation';
+import { InstrumentationConfig } from '@opentelemetry/instrumentation';
+import { INSTRUMENTATION_PREFIX } from '../../constant';
+import Anthropic from '@anthropic-ai/sdk';
+import AnthropicWrapper from './wrapper';
+
+export interface AnthropicInstrumentationConfig extends InstrumentationConfig {}
+
+export default class OpenlitAnthropicInstrumentation extends InstrumentationBase {
+ constructor(config: AnthropicInstrumentationConfig = {}) {
+ super(`${INSTRUMENTATION_PREFIX}/instrumentation-anthropic`, '1.0.0', config);
+ }
+
+ protected init(): void | InstrumentationModuleDefinition | InstrumentationModuleDefinition[] {
+ const module = new InstrumentationNodeModuleDefinition(
+ '@anthropic-ai/sdk',
+ ['>= 0.21.0'],
+ (moduleExports) => {
+ this._patch(moduleExports);
+ return moduleExports;
+ },
+ (moduleExports) => {
+ if (moduleExports !== undefined) {
+ this._unpatch(moduleExports);
+ }
+ }
+ );
+ return [module];
+ }
+
+ public manualPatch(anthropic: any): void {
+ this._patch(anthropic);
+ }
+
+ protected _patch(moduleExports: typeof Anthropic) {
+ try {
+ if (isWrapped(moduleExports.Anthropic.Messages.prototype.create)) {
+ this._unwrap(moduleExports.Anthropic.Messages.prototype, 'create');
+ }
+
+ this._wrap(
+ moduleExports.Anthropic.Messages.prototype,
+ 'create',
+ AnthropicWrapper._patchMessageCreate(this.tracer)
+ );
+ } catch (e) {
+ console.error('Error in _patch method:', e);
+ }
+ }
+
+ protected _unpatch(moduleExports: typeof Anthropic) {
+ this._unwrap(moduleExports.Anthropic.Messages.prototype, 'create');
+ }
+}
diff --git a/sdk/typescript/src/instrumentation/anthropic/wrapper.ts b/sdk/typescript/src/instrumentation/anthropic/wrapper.ts
new file mode 100644
index 00000000..d37552c4
--- /dev/null
+++ b/sdk/typescript/src/instrumentation/anthropic/wrapper.ts
@@ -0,0 +1,276 @@
+import { Span, SpanKind, SpanStatusCode, Tracer, context, trace } from '@opentelemetry/api';
+import OpenlitConfig from '../../config';
+import OpenLitHelper from '../../helpers';
+import SemanticConvention from '../../semantic-convention';
+import { SDK_NAME, TELEMETRY_SDK_NAME } from '../../constant';
+
+export default class AnthropicWrapper {
+ static setBaseSpanAttributes(
+ span: any,
+ { genAIEndpoint, model, user, cost, environment, applicationName }: any
+ ) {
+ span.setAttributes({
+ [TELEMETRY_SDK_NAME]: SDK_NAME,
+ });
+
+ span.setAttribute(TELEMETRY_SDK_NAME, SDK_NAME);
+ span.setAttribute(SemanticConvention.GEN_AI_SYSTEM, SemanticConvention.GEN_AI_SYSTEM_ANTHROPIC);
+ span.setAttribute(SemanticConvention.GEN_AI_ENDPOINT, genAIEndpoint);
+ span.setAttribute(SemanticConvention.GEN_AI_ENVIRONMENT, environment);
+ span.setAttribute(SemanticConvention.GEN_AI_APPLICATION_NAME, applicationName);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_MODEL, model);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_USER, user);
+ if (cost !== undefined) span.setAttribute(SemanticConvention.GEN_AI_USAGE_COST, cost);
+
+ span.setStatus({ code: SpanStatusCode.OK });
+ }
+
+ static _patchMessageCreate(tracer: Tracer): any {
+ const genAIEndpoint = 'anthropic.resources.messages';
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ const { stream = false } = args[0];
+ return context
+ .with(trace.setSpan(context.active(), span), async () => {
+ return originalMethod.apply(this, args);
+ })
+ .then((response) => {
+ if (!!stream) {
+ return OpenLitHelper.createStreamProxy(
+ response,
+ AnthropicWrapper._messageCreateGenerator({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ })
+ );
+ }
+
+ return AnthropicWrapper._messageCreate({ args, genAIEndpoint, response, span });
+ })
+ .catch((e: any) => {
+ OpenLitHelper.handleException(span, e);
+ span.end();
+ throw e;
+ });
+ };
+ };
+ }
+
+ static async _messageCreate({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ response: any;
+ span: Span;
+ }) {
+ try {
+ await AnthropicWrapper._messageCreateCommonSetter({
+ args,
+ genAIEndpoint,
+ result: response,
+ span,
+ });
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ }
+
+ static async *_messageCreateGenerator({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ response: any;
+ span: Span;
+ }) {
+ try {
+ const result = {
+ id: '0',
+ model: '',
+ stop_reason: '',
+ content: [
+ {
+ text: '',
+ role: '',
+ },
+ ],
+ usage: {
+ input_tokens: 0,
+ output_tokens: 0,
+ total_tokens: 0,
+ },
+ };
+ for await (const chunk of response) {
+ switch (chunk.type) {
+ case 'content_block_delta':
+ result.content[0].text += chunk.delta?.text ?? '';
+ break;
+ case 'message_stop':
+ break;
+
+ case 'content_block_stop':
+ break;
+
+ case 'message_start':
+ if (chunk.message) {
+ result.id = chunk.message.id;
+ result.model = chunk.message.model;
+ result.content[0].role = chunk.message.role;
+ result.usage.input_tokens += Number(chunk.message.usage?.input_tokens) ?? 0;
+ result.usage.output_tokens += Number(chunk.message.usage?.output_tokens) ?? 0;
+ result.stop_reason = chunk.message?.stop_reason ?? '';
+ }
+ break;
+
+ case 'content_block_start':
+ result.content[0].text = chunk.content_block?.text ?? '';
+ break;
+ case 'message_delta':
+ result.stop_reason = chunk.delta?.stop_reason ?? '';
+ result.usage.output_tokens += Number(chunk.usage?.output_tokens) ?? 0;
+ break;
+ }
+
+ yield chunk;
+ }
+
+ result.usage.total_tokens = result.usage.output_tokens + result.usage.input_tokens;
+
+ await AnthropicWrapper._messageCreateCommonSetter({
+ args,
+ genAIEndpoint,
+ result,
+ span,
+ });
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ }
+
+ static async _messageCreateCommonSetter({
+ args,
+ genAIEndpoint,
+ result,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ result: any;
+ span: Span;
+ }) {
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+ const {
+ messages,
+ max_tokens = null,
+ seed = null,
+ temperature = 1,
+ top_p,
+ top_k,
+ user,
+ stream = false,
+ stop_reason,
+ } = args[0];
+
+ // Format 'messages' into a single string
+ const messagePrompt = messages || '';
+ const formattedMessages = [];
+
+ for (const message of messagePrompt) {
+ const role = message.role;
+ const content = message.content;
+
+ if (Array.isArray(content)) {
+ const contentStr = content
+ .map((item) => {
+ if ('type' in item) {
+ return `${item.type}: ${item.text ? item.text : item.image_url}`;
+ } else {
+ return `text: ${item.text}`;
+ }
+ })
+ .join(', ');
+ formattedMessages.push(`${role}: ${contentStr}`);
+ } else {
+ formattedMessages.push(`${role}: ${content}`);
+ }
+ }
+
+ const prompt = formattedMessages.join('\n');
+ span.setAttribute(SemanticConvention.GEN_AI_TYPE, SemanticConvention.GEN_AI_TYPE_CHAT);
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_ID, result.id);
+
+ const model = result.model || 'claude-3-sonnet-20240229';
+
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+
+ // Calculate cost of the operation
+ const cost = OpenLitHelper.getChatModelCost(
+ model,
+ pricingInfo,
+ result.usage.input_tokens,
+ result.usage.output_tokens
+ );
+
+ AnthropicWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ // Request Params attributes : Start
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TOP_P, top_p);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TOP_K, top_k);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_MAX_TOKENS, max_tokens);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TEMPERATURE, temperature);
+
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_FINISH_REASON, stop_reason);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IS_STREAM, stream);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_SEED, seed);
+ if (traceContent) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, prompt);
+ }
+ // Request Params attributes : End
+
+ span.setAttribute(SemanticConvention.GEN_AI_USAGE_PROMPT_TOKENS, result.usage.input_tokens);
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_COMPLETION_TOKENS,
+ result.usage.output_tokens
+ );
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_TOTAL_TOKENS,
+ result.usage.input_tokens + result.usage.output_tokens
+ );
+
+ if (result.stop_reason) {
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_FINISH_REASON, result.stop_reason);
+ }
+
+ if (traceContent) {
+ span.setAttribute(
+ SemanticConvention.GEN_AI_CONTENT_COMPLETION,
+ result.content?.[0]?.text || ''
+ );
+ }
+ }
+}
diff --git a/sdk/typescript/src/instrumentation/index.ts b/sdk/typescript/src/instrumentation/index.ts
new file mode 100644
index 00000000..c19d711b
--- /dev/null
+++ b/sdk/typescript/src/instrumentation/index.ts
@@ -0,0 +1,66 @@
+import { registerInstrumentations } from '@opentelemetry/instrumentation';
+import { InstrumentationType, OpenlitInstrumentations } from '../types';
+
+import { TracerProvider } from '@opentelemetry/api';
+import OpenAIInstrumentation from './openai';
+import AnthropicInstrumentation from './anthropic';
+
+export default class Instrumentations {
+ static availableInstrumentations: OpenlitInstrumentations = {
+ openai: new OpenAIInstrumentation(),
+ anthropic: new AnthropicInstrumentation(),
+ };
+
+ static setup(
+ tracerProvider: TracerProvider,
+ disabledInstrumentations: string[] = [],
+ instrumentations?: OpenlitInstrumentations
+ ) {
+ if (instrumentations === undefined) {
+ const filteredInstrumentations = this.getFilteredInstrumentations(disabledInstrumentations);
+ registerInstrumentations({
+ instrumentations: filteredInstrumentations.map(([_, instrumentation]) => instrumentation),
+ tracerProvider,
+ });
+ } else {
+ const filteredInstrumentations = this.getFilteredInstrumentations(
+ disabledInstrumentations,
+ instrumentations
+ );
+ filteredInstrumentations.forEach(([k, instrumentation]) => {
+ if (this.availableInstrumentations[k].setTracerProvider) {
+ this.availableInstrumentations[k].setTracerProvider(tracerProvider);
+ }
+ if (this.availableInstrumentations[k].manualPatch) {
+ this.availableInstrumentations[k].manualPatch(instrumentation);
+ }
+ });
+ registerInstrumentations({
+ tracerProvider,
+ });
+ }
+ }
+
+ static getFilteredInstrumentations(
+ disabledInstrumentations: string[],
+ instrumentations?: OpenlitInstrumentations
+ ): [InstrumentationType, any][] {
+ const availableInstrumentations = instrumentations || this.availableInstrumentations;
+ return Object.keys(availableInstrumentations)
+ .filter((k) => {
+ if (disabledInstrumentations.includes(k)) {
+ if (typeof availableInstrumentations[k as InstrumentationType].disable === 'function') {
+ availableInstrumentations[k as InstrumentationType].disable();
+ }
+ return false;
+ }
+
+ if (typeof availableInstrumentations[k as InstrumentationType].enable === 'function') {
+ availableInstrumentations[k as InstrumentationType].enable();
+ }
+
+ return true;
+ })
+ .map((k) => [k as InstrumentationType, availableInstrumentations[k as InstrumentationType]]);
+ }
+}
diff --git a/sdk/typescript/src/instrumentation/openai/index.ts b/sdk/typescript/src/instrumentation/openai/index.ts
new file mode 100644
index 00000000..fde8cb94
--- /dev/null
+++ b/sdk/typescript/src/instrumentation/openai/index.ts
@@ -0,0 +1,114 @@
+import {
+ InstrumentationBase,
+ InstrumentationModuleDefinition,
+ InstrumentationNodeModuleDefinition,
+ isWrapped,
+} from '@opentelemetry/instrumentation';
+import { InstrumentationConfig } from '@opentelemetry/instrumentation';
+import { INSTRUMENTATION_PREFIX } from '../../constant';
+import OpenAI from 'openai';
+import OpenAIWrapper from './wrapper';
+
+export interface OpenAIInstrumentationConfig extends InstrumentationConfig {}
+
+export default class OpenlitOpenAIInstrumentation extends InstrumentationBase {
+ constructor(config: OpenAIInstrumentationConfig = {}) {
+ super(`${INSTRUMENTATION_PREFIX}/instrumentation-openai`, '1.0.0', config);
+ }
+
+ protected init(): void | InstrumentationModuleDefinition | InstrumentationModuleDefinition[] {
+ const module = new InstrumentationNodeModuleDefinition(
+ 'openai',
+ ['>=3.1.0 <5'],
+ (moduleExports) => {
+ this._patch(moduleExports);
+ return moduleExports;
+ },
+ (moduleExports) => {
+ if (moduleExports !== undefined) {
+ this._unpatch(moduleExports);
+ }
+ }
+ );
+ return [module];
+ }
+
+ public manualPatch(openai: any): void {
+ this._patch(openai);
+ }
+
+ protected _patch(moduleExports: typeof OpenAI) {
+ try {
+ if (isWrapped(moduleExports.OpenAI.Chat.Completions.prototype.create)) {
+ this._unwrap(moduleExports.OpenAI.Chat.Completions.prototype, 'create');
+ }
+
+ if (isWrapped(moduleExports.OpenAI.Embeddings.prototype.create)) {
+ this._unwrap(moduleExports.OpenAI.Embeddings.prototype, 'create');
+ }
+
+ if (isWrapped(moduleExports.OpenAI.FineTuning.Jobs.prototype.create)) {
+ this._unwrap(moduleExports.OpenAI.FineTuning.Jobs.prototype, 'create');
+ }
+
+ if (isWrapped(moduleExports.OpenAI.Images.prototype.generate)) {
+ this._unwrap(moduleExports.OpenAI.Images.prototype, 'generate');
+ }
+
+ if (isWrapped(moduleExports.OpenAI.Images.prototype.createVariation)) {
+ this._unwrap(moduleExports.OpenAI.Images.prototype, 'createVariation');
+ }
+
+ if (isWrapped(moduleExports.OpenAI.Audio.Speech.prototype)) {
+ this._unwrap(moduleExports.OpenAI.Audio.Speech.prototype, 'create');
+ }
+
+ this._wrap(
+ moduleExports.OpenAI.Chat.Completions.prototype,
+ 'create',
+ OpenAIWrapper._patchChatCompletionCreate(this.tracer)
+ );
+
+ this._wrap(
+ moduleExports.OpenAI.Embeddings.prototype,
+ 'create',
+ OpenAIWrapper._patchEmbedding(this.tracer)
+ );
+
+ this._wrap(
+ moduleExports.OpenAI.FineTuning.Jobs.prototype,
+ 'create',
+ OpenAIWrapper._patchFineTune(this.tracer)
+ );
+
+ this._wrap(
+ moduleExports.OpenAI.Images.prototype,
+ 'generate',
+ OpenAIWrapper._patchImageGenerate(this.tracer)
+ );
+
+ this._wrap(
+ moduleExports.OpenAI.Images.prototype,
+ 'createVariation',
+ OpenAIWrapper._patchImageVariation(this.tracer)
+ );
+
+ this._wrap(
+ moduleExports.OpenAI.Audio.Speech.prototype,
+ 'create',
+ OpenAIWrapper._patchAudioCreate(this.tracer)
+ );
+ } catch (e) {
+ console.error('Error in _patch method:', e);
+ }
+ }
+
+ protected _unpatch(moduleExports: typeof OpenAI) {
+ this._unwrap(moduleExports.OpenAI.Chat.Completions.prototype, 'create');
+ this._unwrap(moduleExports.OpenAI.Embeddings.prototype, 'create');
+ this._unwrap(moduleExports.OpenAI.FineTuning.prototype, 'jobs');
+ this._unwrap(moduleExports.OpenAI.Images.prototype, 'generate');
+ this._unwrap(moduleExports.OpenAI.Images.prototype, 'createVariation');
+ this._unwrap(moduleExports.OpenAI.Audio.prototype, 'speech');
+ }
+}
diff --git a/sdk/typescript/src/instrumentation/openai/wrapper.ts b/sdk/typescript/src/instrumentation/openai/wrapper.ts
new file mode 100644
index 00000000..b370e149
--- /dev/null
+++ b/sdk/typescript/src/instrumentation/openai/wrapper.ts
@@ -0,0 +1,658 @@
+import { Span, SpanKind, SpanStatusCode, Tracer, context, trace } from '@opentelemetry/api';
+import OpenlitConfig from '../../config';
+import OpenLitHelper from '../../helpers';
+import SemanticConvention from '../../semantic-convention';
+import { SDK_NAME, TELEMETRY_SDK_NAME } from '../../constant';
+
+export default class OpenAIWrapper {
+ static setBaseSpanAttributes(
+ span: any,
+ { genAIEndpoint, model, user, cost, environment, applicationName }: any
+ ) {
+ span.setAttributes({
+ [TELEMETRY_SDK_NAME]: SDK_NAME,
+ });
+
+ span.setAttribute(TELEMETRY_SDK_NAME, SDK_NAME);
+ span.setAttribute(SemanticConvention.GEN_AI_SYSTEM, SemanticConvention.GEN_AI_SYSTEM_OPENAI);
+ span.setAttribute(SemanticConvention.GEN_AI_ENDPOINT, genAIEndpoint);
+ span.setAttribute(SemanticConvention.GEN_AI_ENVIRONMENT, environment);
+ span.setAttribute(SemanticConvention.GEN_AI_APPLICATION_NAME, applicationName);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_MODEL, model);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_USER, user);
+ if (cost !== undefined) span.setAttribute(SemanticConvention.GEN_AI_USAGE_COST, cost);
+
+ span.setStatus({ code: SpanStatusCode.OK });
+ }
+
+ static _patchChatCompletionCreate(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.chat.completions';
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context
+ .with(trace.setSpan(context.active(), span), async () => {
+ return originalMethod.apply(this, args);
+ })
+ .then((response) => {
+ const { stream = false } = args[0];
+
+ if (!!stream) {
+ return OpenLitHelper.createStreamProxy(
+ response,
+ OpenAIWrapper._chatCompletionGenerator({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ })
+ );
+ }
+
+ return OpenAIWrapper._chatCompletion({ args, genAIEndpoint, response, span });
+ })
+ .catch((e: any) => {
+ OpenLitHelper.handleException(span, e);
+ span.end();
+ });
+ };
+ };
+ }
+
+ static async _chatCompletion({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ response: any;
+ span: Span;
+ }): Promise<any> {
+ try {
+ await OpenAIWrapper._chatCompletionCommonSetter({
+ args,
+ genAIEndpoint,
+ result: response,
+ span,
+ });
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ }
+
+ static async *_chatCompletionGenerator({
+ args,
+ genAIEndpoint,
+ response,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ response: any;
+ span: Span;
+ }): AsyncGenerator<unknown, any, unknown> {
+ try {
+ const { messages } = args[0];
+ let { tools } = args[0];
+ const result = {
+ id: '0',
+ created: -1,
+ model: '',
+ choices: [
+ {
+ index: 0,
+ logprobs: null,
+ finish_reason: 'stop',
+ message: { role: 'assistant', content: '' },
+ },
+ ],
+ usage: {
+ prompt_tokens: 0,
+ completion_tokens: 0,
+ total_tokens: 0,
+ },
+ };
+ for await (const chunk of response) {
+ result.id = chunk.id;
+ result.created = chunk.created;
+ result.model = chunk.model;
+
+ if (chunk.choices[0]?.finish_reason) {
+ result.choices[0].finish_reason = chunk.choices[0].finish_reason;
+ }
+ if (chunk.choices[0]?.logprobs) {
+ result.choices[0].logprobs = chunk.choices[0].logprobs;
+ }
+ if (chunk.choices[0]?.delta.content) {
+ result.choices[0].message.content += chunk.choices[0].delta.content;
+ }
+
+ if (chunk.choices[0]?.delta.tool_calls) {
+ tools = true;
+ }
+
+ yield chunk;
+ }
+
+ let promptTokens = 0;
+ for (const message of messages || []) {
+ promptTokens += OpenLitHelper.openaiTokens(message.content as string, result.model) ?? 0;
+ }
+
+ const completionTokens = OpenLitHelper.openaiTokens(
+ result.choices[0].message.content ?? '',
+ result.model
+ );
+ if (completionTokens) {
+ result.usage = {
+ prompt_tokens: promptTokens,
+ completion_tokens: completionTokens,
+ total_tokens: promptTokens + completionTokens,
+ };
+ }
+
+ args[0].tools = tools;
+
+ await OpenAIWrapper._chatCompletionCommonSetter({
+ args,
+ genAIEndpoint,
+ result,
+ span,
+ });
+
+ return result;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ }
+
+ static async _chatCompletionCommonSetter({
+ args,
+ genAIEndpoint,
+ result,
+ span,
+ }: {
+ args: any[];
+ genAIEndpoint: string;
+ result: any;
+ span: Span;
+ }) {
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+ const {
+ messages,
+ frequency_penalty = 0,
+ max_tokens = null,
+ n = 1,
+ presence_penalty = 0,
+ seed = null,
+ temperature = 1,
+ top_p,
+ user,
+ stream = false,
+ tools,
+ } = args[0];
+
+ // Request Params attributes : Start
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TOP_P, top_p || 1);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_MAX_TOKENS, max_tokens);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TEMPERATURE, temperature);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_PRESENCE_PENALTY, presence_penalty);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_FREQUENCY_PENALTY, frequency_penalty);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_SEED, seed);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IS_STREAM, stream);
+
+ if (traceContent) {
+ // Format 'messages' into a single string
+ const messagePrompt = messages || [];
+ const formattedMessages = [];
+
+ for (const message of messagePrompt) {
+ const role = message.role;
+ const content = message.content;
+
+ if (Array.isArray(content)) {
+ const contentStr = content
+ .map((item) => {
+ if ('type' in item) {
+ return `${item.type}: ${item.text ? item.text : item.image_url}`;
+ } else {
+ return `text: ${item.text}`;
+ }
+ })
+ .join(', ');
+ formattedMessages.push(`${role}: ${contentStr}`);
+ } else {
+ formattedMessages.push(`${role}: ${content}`);
+ }
+ }
+
+ const prompt = formattedMessages.join('\n');
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, prompt);
+ }
+ // Request Params attributes : End
+
+ span.setAttribute(SemanticConvention.GEN_AI_TYPE, SemanticConvention.GEN_AI_TYPE_CHAT);
+
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_ID, result.id);
+
+ const model = result.model || 'gpt-3.5-turbo';
+
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+
+ // Calculate cost of the operation
+ const cost = OpenLitHelper.getChatModelCost(
+ model,
+ pricingInfo,
+ result.usage.prompt_tokens,
+ result.usage.completion_tokens
+ );
+
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ span.setAttribute(SemanticConvention.GEN_AI_USAGE_PROMPT_TOKENS, result.usage.prompt_tokens);
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_COMPLETION_TOKENS,
+ result.usage.completion_tokens
+ );
+ span.setAttribute(SemanticConvention.GEN_AI_USAGE_TOTAL_TOKENS, result.usage.total_tokens);
+
+ if (result.choices[0].finish_reason) {
+ span.setAttribute(
+ SemanticConvention.GEN_AI_RESPONSE_FINISH_REASON,
+ result.choices[0].finish_reason
+ );
+ }
+
+ if (tools) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_COMPLETION, 'Function called with tools');
+ } else {
+ if (traceContent) {
+ if (n === 1) {
+ span.setAttribute(
+ SemanticConvention.GEN_AI_CONTENT_COMPLETION,
+ result.choices[0].message.content
+ );
+ } else {
+ let i = 0;
+ while (i < n) {
+ const attribute_name = `${SemanticConvention.GEN_AI_CONTENT_COMPLETION}.[i]`;
+ span.setAttribute(attribute_name, result.choices[i].message.content);
+ i += 1;
+ }
+ }
+ }
+ }
+ }
+
+ static _patchEmbedding(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.embeddings';
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context.with(trace.setSpan(context.active(), span), async () => {
+ try {
+ const response = await originalMethod.apply(this, args);
+ span.setAttributes({
+ [TELEMETRY_SDK_NAME]: SDK_NAME,
+ });
+
+ const model = response.model || 'text-embedding-ada-002';
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+ const cost = OpenLitHelper.getEmbedModelCost(
+ model,
+ pricingInfo,
+ response.usage.prompt_tokens
+ );
+
+ span.setAttribute(
+ SemanticConvention.GEN_AI_TYPE,
+ SemanticConvention.GEN_AI_TYPE_EMBEDDING
+ );
+
+ const { dimensions, encoding_format = 'float', input, user } = args[0];
+ // Set base span attribues
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ // Request Params attributes : Start
+
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_EMBEDDING_FORMAT, encoding_format);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_EMBEDDING_DIMENSION, dimensions);
+ if (traceContent) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, input);
+ }
+ // Request Params attributes : End
+
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_PROMPT_TOKENS,
+ response.usage.prompt_tokens
+ );
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_TOTAL_TOKENS,
+ response.usage.total_tokens
+ );
+
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ });
+ };
+ };
+ }
+
+ static _patchFineTune(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.fine_tuning.jobs';
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context.with(trace.setSpan(context.active(), span), async () => {
+ try {
+ const response = await originalMethod.apply(this, args);
+ span.setAttributes({
+ [TELEMETRY_SDK_NAME]: SDK_NAME,
+ });
+
+ const model = response.model || 'gpt-3.5-turbo';
+ const {
+ hyperparameters = {},
+ suffix = '',
+ training_file,
+ user,
+ validation_file,
+ } = args[0];
+
+ // Set base span attribues
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ applicationName,
+ environment,
+ });
+
+ span.setAttribute(
+ SemanticConvention.GEN_AI_TYPE,
+ SemanticConvention.GEN_AI_TYPE_FINETUNING
+ );
+
+ // Request Params attributes : Start
+
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_TRAINING_FILE, training_file);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_VALIDATION_FILE, validation_file);
+ span.setAttribute(
+ SemanticConvention.GEN_AI_REQUEST_FINETUNE_BATCH_SIZE,
+ hyperparameters?.batch_size || 'auto'
+ );
+ span.setAttribute(
+ SemanticConvention.GEN_AI_REQUEST_FINETUNE_MODEL_LRM,
+ hyperparameters?.learning_rate_multiplier || 'auto'
+ );
+ span.setAttribute(
+ SemanticConvention.GEN_AI_REQUEST_FINETUNE_MODEL_EPOCHS,
+ hyperparameters?.n_epochs || 'auto'
+ );
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_FINETUNE_MODEL_SUFFIX, suffix);
+ // Request Params attributes : End
+
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_ID, response.id);
+ span.setAttribute(
+ SemanticConvention.GEN_AI_USAGE_PROMPT_TOKENS,
+ response.usage.prompt_tokens
+ );
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_FINETUNE_STATUS, response.status);
+
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ });
+ };
+ };
+ }
+
+ static _patchImageGenerate(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.images';
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context.with(trace.setSpan(context.active(), span), async () => {
+ try {
+ const response = await originalMethod.apply(this, args);
+
+ const {
+ prompt,
+ quality = 'standard',
+ response_format = 'url',
+ size = '1024x1024',
+ style = 'vivid',
+ user,
+ } = args[0];
+
+ span.setAttribute(SemanticConvention.GEN_AI_TYPE, SemanticConvention.GEN_AI_TYPE_IMAGE);
+
+ const model = response.model || 'dall-e-2';
+
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+
+ // Calculate cost of the operation
+ const cost =
+ (response.data?.length || 1) *
+ OpenLitHelper.getImageModelCost(model, pricingInfo, size, quality);
+
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ // Request Params attributes : Start
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_SIZE, size);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_QUALITY, quality);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_STYLE, style);
+
+ if (traceContent) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, prompt);
+ }
+ // Request Params attributes : End
+
+ let imagesCount = 0;
+
+ if (response.data) {
+ for (const items of response.data) {
+ span.setAttribute(
+ `${SemanticConvention.GEN_AI_CONTENT_REVISED_PROMPT}.${imagesCount}`,
+ items.revised_prompt || ''
+ );
+
+ const attributeName = `${SemanticConvention.GEN_AI_RESPONSE_IMAGE}.${imagesCount}`;
+ span.setAttribute(attributeName, items[response_format]);
+
+ imagesCount++;
+ }
+ }
+
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ });
+ };
+ };
+ }
+
+ static _patchImageVariation(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.images';
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context.with(trace.setSpan(context.active(), span), async () => {
+ try {
+ const response = await originalMethod.apply(this, args);
+
+ const {
+ prompt,
+ quality = 'standard',
+ response_format = 'url',
+ size = '1024x1024',
+ style = 'vivid',
+ user,
+ } = args[0];
+
+ span.setAttribute(SemanticConvention.GEN_AI_TYPE, SemanticConvention.GEN_AI_TYPE_IMAGE);
+ span.setAttribute(SemanticConvention.GEN_AI_RESPONSE_ID, response.created);
+
+ const model = response.model || 'dall-e-2';
+
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+
+ // Calculate cost of the operation
+ const cost =
+ (response.data?.length || 1) *
+ OpenLitHelper.getImageModelCost(model, pricingInfo, size, quality);
+
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ // Request Params attributes : Start
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_SIZE, size);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_QUALITY, quality);
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_IMAGE_STYLE, style);
+
+ if (traceContent) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, prompt);
+ }
+ // Request Params attributes : End
+
+ let imagesCount = 0;
+ if (response.data) {
+ for (const items of response.data) {
+ span.setAttribute(
+ `${SemanticConvention.GEN_AI_CONTENT_REVISED_PROMPT}.${imagesCount}`,
+ items.revised_prompt || ''
+ );
+
+ const attributeName = `${SemanticConvention.GEN_AI_RESPONSE_IMAGE}.${imagesCount}`;
+ span.setAttribute(attributeName, items[response_format]);
+
+ imagesCount++;
+ }
+ }
+
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ });
+ };
+ };
+ }
+
+ static _patchAudioCreate(tracer: Tracer): any {
+ const genAIEndpoint = 'openai.resources.audio.speech';
+ const applicationName = OpenlitConfig.applicationName;
+ const environment = OpenlitConfig.environment;
+ const traceContent = OpenlitConfig.traceContent;
+ return (originalMethod: (...args: any[]) => any) => {
+ return async function (this: any, ...args: any[]) {
+ const span = tracer.startSpan(genAIEndpoint, { kind: SpanKind.CLIENT });
+ return context.with(trace.setSpan(context.active(), span), async () => {
+ try {
+ const response = await originalMethod.apply(this, args);
+
+ const { input, user, voice, response_format = 'mp3', speed = 1 } = args[0];
+
+ span.setAttribute(SemanticConvention.GEN_AI_TYPE, SemanticConvention.GEN_AI_TYPE_AUDIO);
+
+ const model = response.model || 'tts-1';
+
+ const pricingInfo = await OpenlitConfig.updatePricingJson(OpenlitConfig.pricing_json);
+
+ // Calculate cost of the operation
+ const cost = OpenLitHelper.getAudioModelCost(model, pricingInfo, input);
+
+ OpenAIWrapper.setBaseSpanAttributes(span, {
+ genAIEndpoint,
+ model,
+ user,
+ cost,
+ applicationName,
+ environment,
+ });
+
+ // Request Params attributes : Start
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_AUDIO_VOICE, voice);
+ span.setAttribute(
+ SemanticConvention.GEN_AI_REQUEST_AUDIO_RESPONSE_FORMAT,
+ response_format
+ );
+ span.setAttribute(SemanticConvention.GEN_AI_REQUEST_AUDIO_SPEED, speed);
+
+ if (traceContent) {
+ span.setAttribute(SemanticConvention.GEN_AI_CONTENT_PROMPT, input);
+ }
+ // Request Params attributes : End
+
+ return response;
+ } catch (e: any) {
+ OpenLitHelper.handleException(span, e);
+ } finally {
+ span.end();
+ }
+ });
+ };
+ };
+ }
+}
diff --git a/sdk/typescript/src/semantic-convention.ts b/sdk/typescript/src/semantic-convention.ts
new file mode 100644
index 00000000..34e59357
--- /dev/null
+++ b/sdk/typescript/src/semantic-convention.ts
@@ -0,0 +1,113 @@
+export default class SemanticConvention {
+ // GenAI General
+ static GEN_AI_ENDPOINT = 'gen_ai.endpoint';
+ static GEN_AI_SYSTEM = 'gen_ai.system';
+ static GEN_AI_ENVIRONMENT = 'gen_ai.environment';
+ static GEN_AI_APPLICATION_NAME = 'gen_ai.application_name';
+ static GEN_AI_TYPE = 'gen_ai.type';
+ static GEN_AI_HUB_OWNER = 'gen_ai.hub.owner';
+ static GEN_AI_HUB_REPO = 'gen_ai.hub.repo';
+ static GEN_AI_RETRIEVAL_SOURCE = 'gen_ai.retrieval.source';
+ static GEN_AI_REQUESTS = 'gen_ai.total.requests';
+
+ // GenAI Request
+ static GEN_AI_REQUEST_MODEL = 'gen_ai.request.model';
+ static GEN_AI_REQUEST_TEMPERATURE = 'gen_ai.request.temperature';
+ static GEN_AI_REQUEST_TOP_P = 'gen_ai.request.top_p';
+ static GEN_AI_REQUEST_TOP_K = 'gen_ai.request.top_k';
+ static GEN_AI_REQUEST_MAX_TOKENS = 'gen_ai.request.max_tokens';
+ static GEN_AI_REQUEST_IS_STREAM = 'gen_ai.request.is_stream';
+ static GEN_AI_REQUEST_USER = 'gen_ai.request.user';
+ static GEN_AI_REQUEST_SEED = 'gen_ai.request.seed';
+ static GEN_AI_REQUEST_FREQUENCY_PENALTY = 'gen_ai.request.frequency_penalty';
+ static GEN_AI_REQUEST_PRESENCE_PENALTY = 'gen_ai.request.presence_penalty';
+ static GEN_AI_REQUEST_EMBEDDING_FORMAT = 'gen_ai.request.embedding_format';
+ static GEN_AI_REQUEST_EMBEDDING_DIMENSION = 'gen_ai.request.embedding_dimension';
+ static GEN_AI_REQUEST_TOOL_CHOICE = 'gen_ai.request.tool_choice';
+ static GEN_AI_REQUEST_AUDIO_VOICE = 'gen_ai.request.audio_voice';
+ static GEN_AI_REQUEST_AUDIO_RESPONSE_FORMAT = 'gen_ai.request.audio_response_format';
+ static GEN_AI_REQUEST_AUDIO_SPEED = 'gen_ai.request.audio_speed';
+ static GEN_AI_REQUEST_FINETUNE_STATUS = 'gen_ai.request.fine_tune_status';
+ static GEN_AI_REQUEST_FINETUNE_MODEL_SUFFIX = 'gen_ai.request.fine_tune_model_suffix';
+ static GEN_AI_REQUEST_FINETUNE_MODEL_EPOCHS = 'gen_ai.request.fine_tune_n_epochs';
+ static GEN_AI_REQUEST_FINETUNE_MODEL_LRM = 'gen_ai.request.learning_rate_multiplier';
+ static GEN_AI_REQUEST_FINETUNE_BATCH_SIZE = 'gen_ai.request.fine_tune_batch_size';
+ static GEN_AI_REQUEST_VALIDATION_FILE = 'gen_ai.request.validation_file';
+ static GEN_AI_REQUEST_TRAINING_FILE = 'gen_ai.request.training_file';
+
+ static GEN_AI_REQUEST_IMAGE_SIZE = 'gen_ai.request.image_size';
+ static GEN_AI_REQUEST_IMAGE_QUALITY = 'gen_ai.request.image_quality';
+ static GEN_AI_REQUEST_IMAGE_STYLE = 'gen_ai.request.image_style';
+
+ // GenAI Usage
+ static GEN_AI_USAGE_PROMPT_TOKENS = 'gen_ai.usage.input_tokens';
+ static GEN_AI_USAGE_COMPLETION_TOKENS = 'gen_ai.usage.output_tokens';
+ static GEN_AI_USAGE_TOTAL_TOKENS = 'gen_ai.usage.total_tokens';
+ static GEN_AI_USAGE_COST = 'gen_ai.usage.cost';
+
+ // GenAI Response
+ static GEN_AI_RESPONSE_ID = 'gen_ai.response.id';
+ static GEN_AI_RESPONSE_FINISH_REASON = 'gen_ai.response.finish_reason';
+ static GEN_AI_RESPONSE_IMAGE = 'gen_ai.response.image'; // Not used directly in code yet
+ static GEN_AI_RESPONSE_IMAGE_SIZE = 'gen_ai.request.image_size';
+ static GEN_AI_RESPONSE_IMAGE_QUALITY = 'gen_ai.request.image_quality';
+ static GEN_AI_RESPONSE_IMAGE_STYLE = 'gen_ai.request.image_style';
+
+ // GenAI Content
+ static GEN_AI_CONTENT_PROMPT = 'gen_ai.content.prompt';
+ static GEN_AI_CONTENT_COMPLETION = 'gen_ai.completion';
+ static GEN_AI_CONTENT_REVISED_PROMPT = 'gen_ai.content.revised_prompt';
+
+ static GEN_AI_TYPE_CHAT = 'chat';
+ static GEN_AI_TYPE_EMBEDDING = 'embedding';
+ static GEN_AI_TYPE_IMAGE = 'image';
+ static GEN_AI_TYPE_AUDIO = 'audio';
+ static GEN_AI_TYPE_FINETUNING = 'fine_tuning';
+ static GEN_AI_TYPE_VECTORDB = 'vectordb';
+ static GEN_AI_TYPE_FRAMEWORK = 'framework';
+
+ static GEN_AI_SYSTEM_HUGGING_FACE = 'huggingface';
+ static GEN_AI_SYSTEM_OPENAI = 'openai';
+ static GEN_AI_SYSTEM_AZURE_OPENAI = 'azure_openai';
+ static GEN_AI_SYSTEM_ANTHROPIC = 'anthropic';
+ static GEN_AI_SYSTEM_COHERE = 'cohere';
+ static GEN_AI_SYSTEM_MISTRAL = 'mistral';
+ static GEN_AI_SYSTEM_BEDROCK = 'bedrock';
+ static GEN_AI_SYSTEM_VERTEXAI = 'vertexai';
+ static GEN_AI_SYSTEM_LANGCHAIN = 'langchain';
+
+ // Vector DB
+ static DB_REQUESTS = 'db.total.requests';
+ static DB_SYSTEM = 'db.system';
+ static DB_SYSTEM_CHROMA = 'chroma';
+ static DB_SYSTEM_PINECONE = 'pinecone';
+ static DB_COLLECTION_NAME = 'db.collection.name';
+ static DB_OPERATION = 'db.operation';
+ static DB_OPERATION_CREATE_INDEX = 'create_index';
+ static DB_OPERATION_QUERY = 'query';
+ static DB_OPERATION_DELETE = 'delete';
+ static DB_OPERATION_UPDATE = 'update';
+ static DB_OPERATION_UPSERT = 'upsert';
+ static DB_OPERATION_GET = 'get';
+ static DB_OPERATION_ADD = 'add';
+ static DB_OPERATION_PEEK = 'peek';
+ static DB_ID_COUNT = 'db.ids_count';
+ static DB_VECTOR_COUNT = 'db.vector_count';
+ static DB_METADATA_COUNT = 'db.metadatas_count';
+ static DB_DOCUMENTS_COUNT = 'db.documents_count';
+ static DB_QUERY_LIMIT = 'db.limit';
+ static DB_OFFSET = 'db.offset';
+ static DB_WHERE_DOCUMENT = 'db.where_document';
+ static DB_FILTER = 'db.filter';
+ static DB_STATEMENT = 'db.statement';
+ static DB_N_RESULTS = 'db.n_results';
+ static DB_DELETE_ALL = 'db.delete_all';
+ static DB_INDEX_NAME = 'db.create_index.name';
+ static DB_INDEX_DIMENSION = 'db.create_index.dimensions';
+ static DB_INDEX_METRIC = 'db.create_index.metric';
+ static DB_INDEX_SPEC = 'db.create_index.spec';
+ static DB_NAMESPACE = 'db.query.namespace';
+ static DB_UPDATE_METADATA = 'db.update.metadata';
+ static DB_UPDATE_VALUES = 'db.update.values';
+ static DB_UPDATE_ID = 'db.update.id';
+}
diff --git a/sdk/typescript/src/tracing.ts b/sdk/typescript/src/tracing.ts
new file mode 100644
index 00000000..3f54466c
--- /dev/null
+++ b/sdk/typescript/src/tracing.ts
@@ -0,0 +1,59 @@
+import { SetupTracerOptions } from './types';
+import {
+ NodeTracerProvider,
+ BatchSpanProcessor,
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ SpanExporter,
+} from '@opentelemetry/sdk-trace-node';
+import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
+
+import Instrumentations from './instrumentation';
+import OpenlitConfig from './config';
+
+export default class Tracing {
+ static traceProvider: NodeTracerProvider;
+ static traceExporter: OTLPTraceExporter;
+ static async setup(options: SetupTracerOptions) {
+ if (options.tracer) return options.tracer;
+ try {
+ this.traceProvider = new NodeTracerProvider({
+ resource: options.resource,
+ });
+
+ OpenlitConfig.updateConfig({
+ ...options,
+ tracer: options.tracer || Tracing.traceProvider,
+ });
+
+ Instrumentations.setup(
+ Tracing.traceProvider,
+ options?.disabledInstrumentations,
+ options?.instrumentations
+ );
+
+ const consoleSpanExporter = new ConsoleSpanExporter();
+
+ // Adding span to console
+ this.traceProvider.addSpanProcessor(new SimpleSpanProcessor(consoleSpanExporter));
+
+ this.traceExporter = new OTLPTraceExporter({
+ url: options.otlpEndpoint,
+ headers: options.otlpHeaders as Record<string, unknown> | undefined,
+ });
+ if (options.disableBatch) {
+ this.traceProvider.addSpanProcessor(
+ new SimpleSpanProcessor(this.traceExporter as SpanExporter)
+ );
+ } else {
+ this.traceProvider.addSpanProcessor(
+ new BatchSpanProcessor(this.traceExporter as SpanExporter)
+ );
+ }
+
+ this.traceProvider.register();
+ } catch (e) {
+ return null;
+ }
+ }
+}
diff --git a/sdk/typescript/src/types.ts b/sdk/typescript/src/types.ts
new file mode 100644
index 00000000..196841d2
--- /dev/null
+++ b/sdk/typescript/src/types.ts
@@ -0,0 +1,48 @@
+// import { Instrumentation } from '@opentelemetry/instrumentation';
+import { Resource } from '@opentelemetry/resources';
+import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
+
+export type InstrumentationType = 'openai' | 'anthropic';
+
+export type OpenlitInstrumentations = Partial<Record<InstrumentationType, any>>;
+
+export type PricingObject = Record<string, Record<string, unknown>>;
+
+/**
+ * environment (string): Deployment environment of the application.
+ * applicationName (string): Name of the application using openLIT.
+ * pricingInfo (Object): Pricing information.
+ * tracer (any): Tracer instance for OpenTelemetry.
+ * otlpEndpoint (string): Endpoint for OTLP.
+ * otlpHeaders (Object): Headers for OTLP.
+ * disableBatch (boolean): Flag to disable batch span processing in tracing.
+ * traceContent (boolean): Flag to enable or disable tracing of content.
+ */
+export interface OpenlitConfigInterface {
+ environment?: string;
+ applicationName?: string;
+ pricingInfo?: PricingObject;
+ tracer: NodeTracerProvider;
+ otlpEndpoint?: string;
+ otlpHeaders?: Record<string, unknown>;
+ disableBatch?: boolean;
+ traceContent?: boolean;
+ pricing_json?: string | PricingObject;
+}
+
+export type OpenlitOptions = {
+ environment?: OpenlitConfigInterface['environment'];
+ applicationName?: OpenlitConfigInterface['applicationName'];
+ tracer?: OpenlitConfigInterface['tracer'];
+ otlpEndpoint?: OpenlitConfigInterface['otlpEndpoint'];
+ otlpHeaders?: OpenlitConfigInterface['otlpHeaders'];
+ disableBatch?: OpenlitConfigInterface['disableBatch'];
+ traceContent?: OpenlitConfigInterface['traceContent'];
+ disabledInstrumentations?: string[];
+ instrumentations?: OpenlitInstrumentations;
+ pricing_json?: OpenlitConfigInterface['pricing_json'];
+};
+
+export type SetupTracerOptions = OpenlitOptions & {
+ resource: Resource;
+};
diff --git a/sdk/typescript/tsconfig.json b/sdk/typescript/tsconfig.json
new file mode 100644
index 00000000..1d1330cb
--- /dev/null
+++ b/sdk/typescript/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "target": "es2016",
+ "module": "commonjs",
+ "resolveJsonModule": true,
+ "outDir": "./dist",
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "paths": {
+ "@/*": ["./src/*"]
+ },
+ "strict": true,
+ "skipLibCheck": true
+ }
+}