Skip to content

Commit

Permalink
Merge pull request #68 from Scale3-Labs/dylan/format-release
Browse files Browse the repository at this point in the history
Dylan/format release
  • Loading branch information
dylanzuber-scale3 authored Apr 23, 2024
2 parents 642f997 + 9e0f328 commit d526c6c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 14 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Build Docker Image"
run-name: "Version: ${{ inputs.imageTag }} --> Latest: ${{ inputs.isLatest }}"

on:
workflow_dispatch:
inputs:
imageTag:
description: Release version
required: true
default: example
isLatest:
description: Is this the latest version?
type: boolean
required: true
default: false

jobs:
docker-build:
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: scale3labs/langtrace-client
steps:
- name: Github Checkout
# v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Log in to Docker Hub
# v3.1.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image with latest tag
# v5.3.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }}
${{ env.DOCKER_REGISTRY }}:latest
labels: ${{ inputs.imageTag }}
if: ${{ inputs.isLatest }}

- name: Build and push Docker image without latest tag
# v5.3.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }}
if: ${{ !inputs.isLatest }}
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ To use the managed SaaS version of Langtrace, follow the steps below:

### If your application is built using **typescript/javascript**

``` typescript
```typescript
npm i @langtrase/typescript-sdk
```

``` typescript
```typescript
import * as Langtrace from '@langtrase/typescript-sdk' // Must precede any llm module imports
Langtrace.init({ api_key: <your_api_key> })
```

OR

``` typescript
import * as Langtrace from '@langtrase/typescript-sdk' // Must precede any llm module imports
LangTrace.init() // LANGTRACE_API_KEY as an ENVIRONMENT variable
```typescript
import * as Langtrace from "@langtrase/typescript-sdk"; // Must precede any llm module imports
LangTrace.init(); // LANGTRACE_API_KEY as an ENVIRONMENT variable
```

### If your application is built using **python**
Expand All @@ -62,8 +62,6 @@ from langtrace_python_sdk import langtrace
langtrace.init() # LANGTRACE_API_KEY as an ENVIRONMENT variable
```



### Langtrace self hosted

To run the Langtrace locally, you have to run three services:
Expand Down Expand Up @@ -101,12 +99,11 @@ The application will be available at `http://localhost:3000`.
#### Take down the setup
To delete containers and volumes
```bash
docker compose down -v
````
```
`-v` flag is used to delete volumes

Expand Down Expand Up @@ -139,11 +136,11 @@ The following are some commands that may come handy during setup and debugging.
docker logs langtrace
```

If you want to follow the logs
If you want to follow the logs

```bash
docker logs -f langtrace
```
```bash
docker logs -f langtrace
```

</details>

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function convertToDateTime64(dateTime: [number, number]): string {

// Append the microseconds part to the dateString, replacing the 'Z' at the end.
// This example results in a format with microseconds precision, assuming that's what's meant by DateTime64.
const dateTime64String = `${dateString.slice(0, -1)}.${String(
const dateTime64String = `${dateString.slice(0, -1)}${String(
microseconds
).padStart(3, "0")}Z`;

Expand Down

0 comments on commit d526c6c

Please sign in to comment.