Skip to content

Commit 5bf32dc

Browse files
committed
add recent_logs and error_rate endpoints, update readme
1 parent a170b53 commit 5bf32dc

File tree

16 files changed

+500
-1
lines changed

16 files changed

+500
-1
lines changed

.cursorrules

Lines changed: 324 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/tinybird-cd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
name: Tinybird - CD Workflow
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
10+
concurrency: ${{ github.workflow }}-${{ github.event.ref }}
11+
12+
env:
13+
TINYBIRD_HOST: ${{ secrets.TINYBIRD_HOST }}
14+
TINYBIRD_TOKEN: ${{ secrets.TINYBIRD_TOKEN }}
15+
16+
jobs:
17+
cd:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Install Tinybird CLI
22+
run: curl https://tinybird.co | sh
23+
- name: Deploy project
24+
run: tb --cloud --host ${{ env.TINYBIRD_HOST }} --token ${{ env.TINYBIRD_TOKEN }} deploy

.github/workflows/tinybird-ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
name: Tinybird - CI Workflow
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
types: [opened, reopened, labeled, unlabeled, synchronize]
11+
12+
concurrency: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
14+
env:
15+
TINYBIRD_HOST: ${{ secrets.TINYBIRD_HOST }}
16+
TINYBIRD_TOKEN: ${{ secrets.TINYBIRD_TOKEN }}
17+
18+
jobs:
19+
ci:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: '.'
24+
services:
25+
tinybird:
26+
image: tinybirdco/tinybird-local:latest
27+
ports:
28+
- 7181:7181
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Install Tinybird CLI
32+
run: curl https://tinybird.co | sh
33+
- name: Build project
34+
run: tb build
35+
- name: Test project
36+
run: tb test run
37+
- name: Deployment check
38+
run: tb --cloud --host ${{ env.TINYBIRD_HOST }} --token ${{ env.TINYBIRD_TOKEN }} deploy --check

.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
include:
3+
- local: .gitlab/tinybird/*.yml
4+
5+
stages:
6+
- tests
7+
- deploy

.gitlab/tinybird/tinybird-cd.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
tinybird_cd_workflow:
3+
image: ubuntu:latest
4+
stage: deploy
5+
resource_group: production
6+
needs: []
7+
rules:
8+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
9+
changes:
10+
- .gitlab/tinybird/*
11+
before_script:
12+
- apt update && apt install -y curl
13+
- curl https://tinybird.co | sh
14+
script:
15+
- export PATH="$HOME/.local/bin:$PATH"
16+
- cd $CI_PROJECT_DIR/.
17+
- tb --cloud --host "$TINYBIRD_HOST" --token "$TINYBIRD_TOKEN" deploy

.gitlab/tinybird/tinybird-ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
tinybird_ci_workflow:
3+
image: ubuntu:latest
4+
stage: tests
5+
interruptible: true
6+
needs: []
7+
rules:
8+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
9+
changes:
10+
- .gitlab/tinybird/*
11+
before_script:
12+
- apt update && apt install -y curl
13+
- curl https://tinybird.co | sh
14+
- for i in {1..10}; do curl -s -o /dev/null "http://$TB_LOCAL_HOST" && break; sleep 5; done
15+
script:
16+
- export PATH="$HOME/.local/bin:$PATH"
17+
- cd $CI_PROJECT_DIR/.
18+
- tb build
19+
- tb test run
20+
- tb --cloud --host "$TINYBIRD_HOST" --token "$TINYBIRD_TOKEN" deploy --check
21+
services:
22+
- name: tinybirdco/tinybird-local:latest
23+
alias: tinybird-local
24+
variables:
25+
TB_LOCAL_HOST: tinybird-local

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ingest from OpenTelemetry
1+
# Tinybird OpenTelemetry Template
22

33
[OpenTelemetry](https://opentelemetry.io/) is an open-source observability framework for collecting, processing, and exporting telemetry data (metrics, traces, and logs) from your applications and infrastructure.
44

@@ -29,6 +29,14 @@ You can find the latest release of the Tinybird OpenTelemetry Collector here:
2929

3030
To get started quickly, you can use the [Tinybird OpenTelemetry project template](https://github.com/tinybirdco/tinybird-otel-template). This template provides ready-to-use Data Sources and Pipes for storing and analyzing your telemetry data in Tinybird.
3131

32+
```bash
33+
# select or create a new workspace
34+
tb login
35+
36+
# deploy the template
37+
tb --cloud deploy --template https://github.com/tinybirdco/tinybird-otel-template/tree/main
38+
```
39+
3240
## Minimal OpenTelemetry Collector configuration
3341

3442
Below is a minimal example configuration for the Tinybird OpenTelemetry Collector to export metrics, traces, and logs to Tinybird:

connections/.gitkeep

Whitespace-only changes.

copies/.gitkeep

Whitespace-only changes.

endpoints/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)